-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 * chore: sync lockfile * chore: bump knip * ci: run knip in ci workflow * ci: run knip as part of lint job * refactor: replace `testRegex` with `testMatch` * refactor: use satisfies in knip config * chore: fix path to rule-tester fixtures * chore: add dummypkg as knip workspace * chore: get rid of json-schema * chore: fix knip issues in packages/website * chore: sync lockfile * chore: add missed merge stuff * chore: install @jest/types in the root workspace * chore: partially fix issues for website-eslint * chore: fix knip issues for packages/website-eslint * chore: add ncp resolution to the root package.json * chore: wip wip wip * chore: fix misspelling + handle few knip issues * chore: finally (?) * chore: expand ignoreDependencies regular expressions * chore: revert unrelated changes * chore: try to minimise docusaurus-related changes * chore: remove extra entry * chore: bump knip to 4.0.2 * wip * add types to jest config * yarn lint --fix * add knip to ci * !!! * Revert "!!!" This reverts commit 36fa481. * revert yarn dedupe * sed -i 's| -p tsconfig.json||g' * update todo comment in eslint.config.js * Update knip.ts Co-authored-by: Josh Goldberg ✨ <[email protected]> * oops --------- Co-authored-by: Josh Goldberg ✨ <[email protected]>
- Loading branch information
1 parent
8acb8d4
commit f53fece
Showing
27 changed files
with
642 additions
and
213 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
'use strict'; | ||
|
||
// @ts-check | ||
const { getJestProjects } = require('@nx/jest'); | ||
|
||
/** @type {import('@jest/types').Config.InitialOptions} */ | ||
module.exports = { | ||
projects: getJestProjects(), | ||
}; |
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,128 @@ | ||
import type { KnipConfig } from 'knip'; | ||
|
||
export default { | ||
rules: { | ||
classMembers: 'off', | ||
duplicates: 'off', | ||
enumMembers: 'off', | ||
exports: 'off', | ||
nsExports: 'off', | ||
nsTypes: 'off', | ||
types: 'off', | ||
unresolved: 'off', | ||
}, | ||
workspaces: { | ||
'.': { | ||
ignoreDependencies: [ | ||
'@babel/code-frame', | ||
'@babel/core', | ||
'@babel/eslint-parser', | ||
'@babel/parser', | ||
'@babel/types', | ||
'@nx/workspace', | ||
'cross-fetch', | ||
'glob', | ||
'husky', | ||
'jest-specific-snapshot', | ||
'make-dir', | ||
'ncp', | ||
'tmp', | ||
|
||
// imported in eslint.config.js | ||
'@typescript-eslint/utils', | ||
// imported in eslint.config.mjs | ||
'@typescript-eslint/eslint-plugin-internal', | ||
], | ||
entry: ['tools/release/changelog-renderer.js'], | ||
ignoreBinaries: [ | ||
// https://github.com/webpro/knip/issues/433 | ||
'stylelint', | ||
], | ||
}, | ||
'packages/ast-spec': { | ||
ignore: [ | ||
'src/**/fixtures/**', | ||
'tests/*.type-test.ts', | ||
// @typescript-eslint/typescript-estree is not listed in dependencies to avoid circular dependency errors | ||
// You can check a more detailed explanation in this file | ||
'tests/util/parsers/typescript-estree-import.ts', | ||
], | ||
}, | ||
'packages/eslint-plugin': { | ||
ignore: ['tests/fixtures/**'], | ||
}, | ||
'packages/eslint-plugin-internal': { | ||
ignore: ['tests/fixtures/**'], | ||
}, | ||
'packages/integration-tests': { | ||
ignore: ['fixtures/**'], | ||
}, | ||
'packages/parser': { | ||
ignore: ['tests/fixtures/**'], | ||
}, | ||
'packages/scope-manager': { | ||
ignore: ['tests/fixtures/**'], | ||
}, | ||
'packages/type-utils': { | ||
ignore: ['tests/fixtures/**'], | ||
}, | ||
'packages/typescript-estree': { | ||
entry: ['src/use-at-your-own-risk.ts'], | ||
ignore: ['tests/fixtures/**'], | ||
}, | ||
'packages/website': { | ||
entry: [ | ||
'docusaurus.config.mts', | ||
'src/pages/**/*.tsx', | ||
|
||
// imported in MDX docs | ||
'src/components/**/*.tsx', | ||
|
||
// used by Docusaurus | ||
'src/theme/**/*.tsx', | ||
'src/theme/prism-include-languages.js', | ||
], | ||
ignoreDependencies: [ | ||
// used in MDX docs | ||
'raw-loader', | ||
|
||
// it's imported only as type (esquery types are forked and defined in packages/website/typings/esquery.d.ts) | ||
'esquery', | ||
|
||
'@babel/runtime', | ||
'@docusaurus/mdx-loader', | ||
'@docusaurus/types', | ||
'@docusaurus/plugin-content-docs', | ||
'@docusaurus/theme-search-algolia', | ||
'@docusaurus/ExecutionEnvironment', | ||
'@docusaurus/Link', | ||
'@docusaurus/router', | ||
'@docusaurus/useDocusaurusContext', | ||
'@docusaurus/useBaseUrl', | ||
'@docusaurus/BrowserOnly', | ||
'@docusaurus/theme-classic', | ||
'@generated/docusaurus.config', | ||
'^@theme/.*', | ||
'^@theme-original/.*', | ||
], | ||
}, | ||
'packages/website-eslint': { | ||
ignoreDependencies: [ | ||
// virtual module | ||
'vt', | ||
], | ||
entry: [ | ||
'src/index.js', | ||
'src/mock/assert.js', | ||
'src/mock/empty.js', | ||
'src/mock/eslint-rules.js', | ||
'src/mock/eslint.js', | ||
'src/mock/lru-cache.js', | ||
'src/mock/path.js', | ||
'src/mock/typescript.js', | ||
'src/mock/util.js', | ||
], | ||
}, | ||
'tools/dummypkg': {}, | ||
}, | ||
} satisfies KnipConfig; |
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
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
Oops, something went wrong.