Skip to content

Commit

Permalink
Remove (for now) eslint-plugin-import
Browse files Browse the repository at this point in the history
It's got some in-the-weeds issues with passing around data internally
that makes the plugin incompatible with flat config:

- import-js/eslint-plugin-import#2556
- import-js/eslint-plugin-import#2829
  • Loading branch information
jgarber623 committed Oct 5, 2023
1 parent c1d68dc commit 9c47ec1
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 74 deletions.
24 changes: 0 additions & 24 deletions lib/compat/eslint-plugin-import.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/compat/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports.arrayFunc = require('./eslint-plugin-array-func');
module.exports.import = require('./eslint-plugin-import');
module.exports.promise = require('./eslint-plugin-promise');
module.exports.regexp = require('./eslint-plugin-regexp');
module.exports.sortClassMembers = require('./eslint-plugin-sort-class-members');
Expand Down
19 changes: 11 additions & 8 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ const n = require('eslint-plugin-n');
const compat = require('./compat');

module.exports = [
{
ignores: ['coverage']
},

// https://www.npmjs.com/package/eslint-plugin-jsdoc
jsdoc.configs['flat/recommended-error'],

Expand All @@ -23,9 +19,6 @@ module.exports = [
// https://www.npmjs.com/package/eslint-plugin-array-func
compat.arrayFunc.configs['flat/all'],

// https://www.npmjs.com/package/eslint-plugin-import
compat.import.configs['flat/recommended'],

// https://www.npmjs.com/package/eslint-plugin-promise
compat.promise.configs['flat/recommended'],

Expand All @@ -44,7 +37,17 @@ module.exports = [
...js.configs.recommended.rules,

// https://www.npmjs.com/package/eslint-config-standard
...standard.rules,
//
// Remove eslint-plugin-import rules until the following "flat" config-
// related issues are resolved.
//
// https://github.com/import-js/eslint-plugin-import/issues/2556
// https://github.com/import-js/eslint-plugin-import/pull/2829
...Object.fromEntries(
Object.entries(standard.rules).filter(([key]) => {
return !key.startsWith('import/');
})
),

// https://eslint.org/docs/latest/rules/semi
semi: ['error', 'always'],
Expand Down
Loading

0 comments on commit 9c47ec1

Please sign in to comment.