Skip to content

Commit

Permalink
chore: add progress on the linter (#8645)
Browse files Browse the repository at this point in the history
* chore: add progress on the linter

when running lint:check there is no output so we don't know if it's hanging or parsing some files

add a plug-in for that

Signed-off-by: Florent Benoit <[email protected]>
  • Loading branch information
benoitf authored Aug 29, 2024
1 parent e820329 commit ccbdd9b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import etc from 'eslint-plugin-etc';
import svelte from 'eslint-plugin-svelte';
import redundantUndefined from 'eslint-plugin-redundant-undefined';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import fileProgress from 'eslint-plugin-file-progress';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down Expand Up @@ -88,6 +89,7 @@ export default [
plugins: {
// compliant v9 plug-ins
unicorn,
'file-progress': fileProgress,
// non-compliant v9 plug-ins
etc: fixupPluginRules(etc),
import: fixupPluginRules(importPlugin),
Expand All @@ -110,6 +112,12 @@ export default [
packages: ['packages/*', 'extensions/*'],
},
},
'file-progress/activate': {
progress: {
hide: false,
successMessage: 'Lint done...',
},
},
},
},
{
Expand Down Expand Up @@ -162,6 +170,8 @@ export default [
],
'@typescript-eslint/no-require-imports': 'off',

'file-progress/activate': 'warn',

// disabled import/namespace rule as the plug-in is not fully compatible using the compat mode
'import/namespace': 'off',
'import/no-duplicates': 'error',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
"eslint-import-resolver-custom-alias": "^1.3.2",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-etc": "^2.0.3",
"eslint-plugin-file-progress": "^1.5.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-redundant-undefined": "^1.0.0",
Expand Down
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11165,6 +11165,14 @@ eslint-plugin-etc@^2.0.3:
tslib "^2.0.0"
tsutils "^3.0.0"

eslint-plugin-file-progress@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-file-progress/-/eslint-plugin-file-progress-1.5.0.tgz#beceb622875d3cad8f2c05afe23d2426ffa80be8"
integrity sha512-get8oNfacIagP+igSzrEZhepPgodtdwACVeKQsE1fVvTL15tZvgCv8K4B2lKT4FZOZOyhxSkQGnWyjEOx1uoIw==
dependencies:
nanospinner "^1.1.0"
picocolors "^1.0.1"

eslint-plugin-import@^2.29.1:
version "2.29.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643"
Expand Down Expand Up @@ -15956,6 +15964,13 @@ nanoid@^3.3.7:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==

nanospinner@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/nanospinner/-/nanospinner-1.1.0.tgz#d17ff621cb1784b0a206b400da88a0ef6db39b97"
integrity sha512-yFvNYMig4AthKYfHFl1sLj7B2nkHL4lzdig4osvl9/LdGbXwrdFRoqBS98gsEsOakr0yH+r5NZ/1Y9gdVB8trA==
dependencies:
picocolors "^1.0.0"

natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz"
Expand Down

0 comments on commit ccbdd9b

Please sign in to comment.