Skip to content

Commit

Permalink
fix: disable eslint-plugin-import
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed May 17, 2024
1 parent 050026e commit c672eea
Showing 1 changed file with 91 additions and 89 deletions.
180 changes: 91 additions & 89 deletions configurations/canonical.js
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
const importRules = {
'import/consistent-type-specifier-style': [2, 'prefer-inline'],
'import/default': 2,
'import/dynamic-import-chunkname': 0,
'import/export': 2,
'import/exports-last': 0,
'import/extensions': [
2,
'never',
{
ignorePackages: true,
pattern: {
graphql: 'always',
json: 'always',
svg: 'always',
},
},
],
'import/first': 2,
'import/group-exports': 0,
'import/max-dependencies': 0,
'import/named': 0,
'import/namespace': 0,
// TODO broke after ESLint upgrade to v9
// 'import/newline-after-import': 2,
'import/no-absolute-path': 2,
// TODO broke after ESLint upgrade to v9
// 'import/no-amd': 2,
'import/no-anonymous-default-export': 0,
'import/no-commonjs': 0,
'import/no-cycle': 2,
'import/no-default-export': 0,
'import/no-deprecated': 1,
// TODO broke after ESLint upgrade to v9
// 'import/no-duplicates': [
// 2,
// {
// 'prefer-inline': true,
// },
// ],
'import/no-dynamic-require': 2,
'import/no-extraneous-dependencies': [
2,
{
devDependencies: true,
optionalDependencies: true,
peerDependencies: true,
},
],
'import/no-import-module-exports': 0,
'import/no-internal-modules': 0,
// TODO broke after ESLint upgrade to v9
// 'import/no-mutable-exports': 2,
// 'import/no-named-as-default': 2,
// 'import/no-named-as-default-member': 2,
'import/no-named-default': 2,
'import/no-named-export': 0,
'import/no-namespace': 0,
'import/no-nodejs-modules': 0,
'import/no-relative-packages': 0,
'import/no-relative-parent-imports': 0,
'import/no-restricted-paths': 0,
'import/no-self-import': 2,
'import/no-unassigned-import': 2,
'import/no-unresolved': 0,
'import/no-unused-modules': 0,
'import/no-useless-path-segments': [
2,
{
noUselessIndex: true,
},
],
'import/no-webpack-loader-syntax': 2,
'import/order': 0,
'import/prefer-default-export': 0,
'import/unambiguous': 0,
};
// const importRules = {
// 'import/consistent-type-specifier-style': [2, 'prefer-inline'],
// 'import/default': 2,
// 'import/dynamic-import-chunkname': 0,
// 'import/export': 2,
// 'import/exports-last': 0,
// 'import/extensions': [
// 2,
// 'never',
// {
// ignorePackages: true,
// pattern: {
// graphql: 'always',
// json: 'always',
// svg: 'always',
// },
// },
// ],
// 'import/first': 2,
// 'import/group-exports': 0,
// 'import/max-dependencies': 0,
// 'import/named': 0,
// 'import/namespace': 0,
// // TODO broke after ESLint upgrade to v9
// // 'import/newline-after-import': 2,
// 'import/no-absolute-path': 2,
// // TODO broke after ESLint upgrade to v9
// // 'import/no-amd': 2,
// 'import/no-anonymous-default-export': 0,
// 'import/no-commonjs': 0,
// 'import/no-cycle': 2,
// 'import/no-default-export': 0,
// 'import/no-deprecated': 1,
// // TODO broke after ESLint upgrade to v9
// // 'import/no-duplicates': [
// // 2,
// // {
// // 'prefer-inline': true,
// // },
// // ],
// 'import/no-dynamic-require': 2,
// 'import/no-extraneous-dependencies': [
// 2,
// {
// devDependencies: true,
// optionalDependencies: true,
// peerDependencies: true,
// },
// ],
// 'import/no-import-module-exports': 0,
// 'import/no-internal-modules': 0,
// // TODO broke after ESLint upgrade to v9
// // 'import/no-mutable-exports': 2,
// // 'import/no-named-as-default': 2,
// // 'import/no-named-as-default-member': 2,
// 'import/no-named-default': 2,
// 'import/no-named-export': 0,
// 'import/no-namespace': 0,
// 'import/no-nodejs-modules': 0,
// 'import/no-relative-packages': 0,
// 'import/no-relative-parent-imports': 0,
// 'import/no-restricted-paths': 0,
// 'import/no-self-import': 2,
// 'import/no-unassigned-import': 2,
// 'import/no-unresolved': 0,
// 'import/no-unused-modules': 0,
// 'import/no-useless-path-segments': [
// 2,
// {
// noUselessIndex: true,
// },
// ],
// 'import/no-webpack-loader-syntax': 2,
// 'import/order': 0,
// 'import/prefer-default-export': 0,
// 'import/unambiguous': 0,
// };

const unicornRules = {
'unicorn/better-regex': 2,
Expand Down Expand Up @@ -209,13 +209,14 @@ module.exports.recommended = {
'@babel': require('@babel/eslint-plugin'),
canonical: require('eslint-plugin-canonical'),
'eslint-comments': require('eslint-plugin-eslint-comments'),
import: require('eslint-plugin-import'),
// import: require('eslint-plugin-import'),
promise: require('eslint-plugin-promise'),
'simple-import-sort': require('eslint-plugin-simple-import-sort'),
unicorn: require('eslint-plugin-unicorn'),
},
rules: {
...importRules,
// TODO https://github.com/import-js/eslint-plugin-import/issues/2556

Check warning on line 218 in configurations/canonical.js

View workflow job for this annotation

GitHub Actions / Test

Unexpected 'todo' comment: 'TODO...'
// ...importRules,
...unicornRules,
'@babel/new-cap': 0,
'@babel/no-invalid-this': 2,
Expand Down Expand Up @@ -266,13 +267,14 @@ module.exports.recommended = {
],
'canonical/export-specifier-newline': 2,
'canonical/filename-match-exported': 2,
'canonical/filename-match-regex': [
1,
{
ignoreExporting: false,
regex: '^(?:.?[A-Z]?[a-z]+(?:[A-Z][a-z]+)*)*$',
},
],
// TODO this is causing unexpected issues in v9

Check warning on line 270 in configurations/canonical.js

View workflow job for this annotation

GitHub Actions / Test

Unexpected 'todo' comment: 'TODO this is causing unexpected issues...'
// 'canonical/filename-match-regex': [
// 1,
// {
// ignoreExporting: false,
// regex: '^(?:.?[A-Z]?[a-z]+(?:[A-Z][a-z]+)*)*$',
// },
// ],
'canonical/filename-no-index': 0,
'canonical/id-match': [
2,
Expand Down Expand Up @@ -736,7 +738,7 @@ module.exports.recommended = {
],
yoda: [2, 'never'],
},
settings: {
'import/extensions': ['.js', '.jsx', '.mjs', '.ts', '.tsx'],
},
// settings: {
// 'import/extensions': ['.js', '.jsx', '.mjs', '.ts', '.tsx'],
// },
};

0 comments on commit c672eea

Please sign in to comment.