-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
eslint-plugin-import upgrade issues on no-cycle #3113
Comments
What happens if you set ignoreExternal to true? |
@ljharb : Facing same issue after setting |
cc @soryy708 |
Possible duplicate of #3060 |
@saravanakumar2504 Can you please share some metadata about the project in which As it is it's difficult to pin-point what causes some projects to benefit from SCC and others to be hindered. In a perfect world, a reproduction repository would be great, but practically those are usually proprietary. |
@soryy708 : I undersrand your query. Since we are using mono-repo and our project files is very huge(1 lakh file) its difficult for me to mimic it. |
(i believe a lakh is 100K) |
I found the minimal config to replicate my issue. Kindly find my
const path = require('path');
const babelParser = require('@babel/eslint-parser');
const tsParser = require('@typescript-eslint/parser');
const js = require('@eslint/js');
const globals = require('globals');
const { FlatCompat } = require('@eslint/eslintrc');
const resolverPath = path.resolve(`${__dirname}/build/monorepo-utils/resolvers/eslint-resolver.js`);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});
const config = [
...compat.extends(
'airbnb-base',
'airbnb/rules/react',
'prettier',
'prettier/react',
'plugin:compat/recommended',
),
...compat.plugins(
'jest',
'react',
'react-hooks',
'json',
'import',
'formatjs',
'@emotion',
),
{
files: ['**/*.{js,jsx,ts,tsx,json}'],
name: 'base config',
plugins: {
jsdoc: require('eslint-plugin-jsdoc'),
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
},
languageOptions: {
parser: babelParser,
globals: {
...globals.browser,
},
},
settings: {
'import/extensions': ['.js', '.ts', '.tsx'],
'import/resolver': {
// node needs to be declared first. see https://github.com/benmosher/eslint-plugin-import/issues/1396
node: {},
[resolverPath]: {
debug: false,
},
},
'import/parsers': {
'@babel/eslint-parser': ['.js'],
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
},
{
name: 'typescript',
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tsParser,
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
},
rules: {
'import/no-cycle': 2,
},
},
];
module.exports = config; |
The upgrade of
eslint-plugin-import
from version2.26.0 to 2.31.0
(to support flat config) has resulted in increased processing time for ESLint, primarily due to the import/no-cycle rule. Included screenshot as wellI followed this github thread and played with those configs(like toggling
disableScc
), but no luck. Can someone assit on this ?The text was updated successfully, but these errors were encountered: