Skip to content

Commit

Permalink
ci: add knip linter fp-125 (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
what1s1ove authored Dec 17, 2023
1 parent bdbbf2b commit 0e02950
Show file tree
Hide file tree
Showing 6 changed files with 1,834 additions and 72 deletions.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ const overridesConfigs = [
'prettier.config.js',
'lint-staged.config.js',
'eslint.config.js',
'knip.config.js',
],
rules: {
'import/no-default-export': ['off'],
Expand Down
8 changes: 8 additions & 0 deletions knip.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @typedef {import('knip/dist').KnipConfig} KnipConfig */

/** @type {KnipConfig} */
const config = {
entry: ['src/index.js'],
};

export default config;
6 changes: 5 additions & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

/** @type {Config} */
const config = {
'*': ['npm run ci:lint:fs', 'npm run ci:lint:editor'],
'*': [
'npm run ci:lint:fs',
'npm run ci:lint:editor',
"bash -c 'npm run ci:lint:trash'",
],
'*.{json,md,yml,js}': ['npm run ci:lint:format'],
'*.js': ['npm run ci:lint:js', "bash -c 'npm run ci:lint:type'"],
};
Expand Down
Loading

0 comments on commit 0e02950

Please sign in to comment.