Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add Knip + config * chore: use named exports consistently (only shorthands) * chore: update Knip & reduce config (by improved 11ty plugin) * chore: rename `lint:knip` → `lint:imports` Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com> * chore: upgrade Knip to v4.3.0 * chore: fix createCoreRuleConfigs import in test * chore: annotate default export for runtime-info (to satisfy both proxyquire and knip) * chore: update knip.jsonc Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com> * chore: add comment to export/import hint * chore: upgrade Knip to v5.0.1 (no breaking changes) * chore: remove unused files, dependencies & exports * chore: fix whitespace in ci.yml * chore: add Knip to CI job * Remove tools/update-rule-types.js from knip.jsonc Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Add corrected shared/types Rule import to lazy-loading-rule-map.js * Added back eslint-plugin-* devDependencies * Rename to lint:unused * Fix introduced prism-eslint-hook complaints --------- Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com> Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com> Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
- Loading branch information
1 parent
ba89c73
commit acc2e06
Showing
23 changed files
with
153 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"workspaces": { | ||
".": { | ||
// These entries are complementary to the ones found in package.json | ||
"entry": [ | ||
"lib/rules/index.js", | ||
"tools/internal-rules/index.js", | ||
// https://github.com/webpro/knip/issues/464 | ||
// Remove when Knip has a wdio plugin | ||
"wdio.conf.js" | ||
], | ||
"project": ["{conf,lib,tools}/**/*.js"], | ||
"mocha": { | ||
"entry": [ | ||
"tests/{bin,conf,lib,tools}/**/*.js", // see Makefile.js | ||
"tests/_utils/test-lazy-loading-rules.js" | ||
], | ||
"project": ["tests/**/*.js"] | ||
}, | ||
"ignore": [ | ||
// If Knip would consider exports as named, their usage is too dynamic: globals[`es${ecmaVersion}`] | ||
// An alternative is to add `__esModule: true` to the export and we can remove it here from the ignores: | ||
"conf/globals.js", | ||
// These contain unresolved imports and other oddities: | ||
"tests/bench/large.js", | ||
"tests/lib/rule-tester/rule-tester.js", | ||
"tests/performance/jshint.js", | ||
// Many are required using dynamic paths such as `fs.readFileSync(path.join())`: | ||
"tests/fixtures/**" | ||
], | ||
"ignoreDependencies": [ | ||
"c8", | ||
|
||
// These will be removed in https://github.com/eslint/eslint/pull/18011 | ||
"eslint-plugin-eslint-comments", | ||
"eslint-plugin-jsdoc", | ||
"eslint-plugin-n", | ||
"eslint-plugin-unicorn", | ||
|
||
// Ignore until Knip has a wdio plugin: | ||
"@wdio/*", | ||
"rollup-plugin-node-polyfills" | ||
] | ||
}, | ||
"docs": { | ||
"ignore": ["src/assets/js/search.js", "_examples/**"] | ||
}, | ||
// Workspaces with default configs: | ||
"packages/*": {}, | ||
"tools/internal-rules": {} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
"use strict"; | ||
|
||
const { Linter } = require("./linter"); | ||
const { interpolate } = require("./interpolate"); | ||
const SourceCodeFixer = require("./source-code-fixer"); | ||
|
||
module.exports = { | ||
Linter, | ||
|
||
// For testers. | ||
SourceCodeFixer, | ||
interpolate | ||
SourceCodeFixer | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
"use strict"; | ||
|
||
const RuleTester = require("./rule-tester"); | ||
|
||
module.exports = { | ||
RuleTester: require("./rule-tester") | ||
RuleTester | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.