Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eslint-plugin-import npm warning #27094

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import js from '@eslint/js';
import ts from 'typescript-eslint';
import prettier from 'eslint-plugin-prettier/recommended';
import chai from 'eslint-plugin-chai-friendly';
import importRecommented from 'eslint-plugin-import/config/recommended.js';
import jhipster from './lib/eslint/index.js';

export default ts.config(
Expand Down Expand Up @@ -43,33 +42,6 @@ export default ts.config(
'@typescript-eslint/no-unused-expressions': 'off',
},
},
{
languageOptions: {
// import plugin does not use ecmaVersion and sourceType from languageOptions object
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
},
settings: {
'import/parsers': {
espree: ['.js', '.cjs', '.mjs'],
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
node: true,
typescript: true,
},
},
rules: {
...importRecommented.rules,
'import/no-named-as-default-member': 'off',
'import/named': 'off',
'import/extensions': [0, { pattern: { '{c,m,}{js,ts}': 'always' } }],
'import/prefer-default-export': 'off',
'import/namespace': 'off',
},
},
{
files: ['bin/**/*', '**/*.spec.ts', 'testing/**/*', 'test/**/*'],
rules: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import dayjs from 'dayjs/esm';
import { FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
import { provideRouter } from '@angular/router';
import { registerLocaleData } from '@angular/common';
import locale from '@angular/common/locales/<%= angularLocaleId %>';
import { FaIconLibrary } from '@fortawesome/angular-fontawesome';
import dayjs from 'dayjs/esm';
import appRoutes from './app.routes';
// jhipster-needle-angular-add-module-import JHipster will add new module here

Expand Down
1 change: 0 additions & 1 deletion generators/react/templates/eslint.config.js.jhi.react.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
-%>
<&_ if (fragment.importsSection) { -&>
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import react from 'eslint-plugin-react/configs/recommended.js';
<&_ } -&>
<&_ if (fragment.configSection) { -&>
Expand Down
5 changes: 0 additions & 5 deletions lib/eslint/base.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import unusedImports from 'eslint-plugin-unused-imports';
import imports from 'eslint-plugin-import';
import { fixupPluginRules } from '@eslint/compat';

/**
* @type {import('typescript-eslint').ConfigWithExtends}
Expand All @@ -11,7 +9,6 @@ import { fixupPluginRules } from '@eslint/compat';
const baseConfig = {
plugins: {
'unused-imports': unusedImports,
import: fixupPluginRules(imports),
},
rules: {
'dot-notation': 'error',
Expand All @@ -31,8 +28,6 @@ const baseConfig = {

// Configure unused-imports rule
'no-unused-vars': 'off',
'import/no-duplicates': 'error',
'import/order': 'error',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
Expand Down
Loading
Loading