Skip to content

Commit

Permalink
Disable e1061c5 as it might be unexpected/breaking with eslint v8
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 1, 2024
1 parent 0021ff0 commit 9e67622
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/knip/src/plugins/eslint/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const getDependencies = (config: ESLintConfig | OverrideConfig) => {
? getDependenciesFromConfig(config.parserOptions.babelOptions)
: [];
const settings = config.settings ? getDependenciesFromSettings(config.settings) : [];
const rules = getDependenciesFromRules(config.rules);
// const rules = getDependenciesFromRules(config.rules); // TODO enable in next major? Unexpected/breaking in certain cases w/ eslint v8
const rules = getDependenciesFromRules({});
const overrides: string[] = config.overrides ? [config.overrides].flat().flatMap(getDependencies) : [];

return compact([...extendsSpecifiers, ...plugins, parser, ...babelDependencies, ...settings, ...rules, ...overrides]);
Expand Down
4 changes: 2 additions & 2 deletions packages/knip/test/plugins/eslint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test('Find dependencies with the ESLint plugin', async () => {
assert(issues.unlisted['.eslintrc.js']['eslint-plugin-eslint-plugin']);
assert(issues.unlisted['.eslintrc.js']['eslint-plugin-import']);
assert(issues.unlisted['.eslintrc.js']['@org/eslint-plugin-name/typescript']);
assert(issues.unlisted['.eslintrc.js']['@other-org/eslint-plugin']);
// assert(issues.unlisted['.eslintrc.js']['@other-org/eslint-plugin']);

assert(issues.unlisted['.eslintrc.json']['@babel/plugin-syntax-import-assertions']);
assert(issues.unlisted['.eslintrc.json']['eslint-config-airbnb']);
Expand All @@ -45,7 +45,7 @@ test('Find dependencies with the ESLint plugin', async () => {

assert.deepEqual(counters, {
...baseCounters,
unlisted: 26,
unlisted: 25,
processed: 4,
total: 4,
});
Expand Down

0 comments on commit 9e67622

Please sign in to comment.