Skip to content

Commit 621666b

Browse files
chore(eslint): update eslint no-unused-vars rules
1 parent 2ffe3d5 commit 621666b

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.eslintrc.cjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ module.exports = {
99
plugins: ['jest'],
1010
rules: {
1111
'no-debugger': 'error',
12-
'no-unused-vars': [
13-
'error',
14-
// we are only using this rule to check for unused arguments since TS
15-
// catches unused variables but not args.
16-
{ varsIgnorePattern: '.*', args: 'none' }
17-
],
1812
// most of the codebase are expected to be env agnostic
1913
'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
2014

@@ -72,6 +66,13 @@ module.exports = {
7266
'no-restricted-syntax': 'off'
7367
}
7468
},
69+
// JavaScript files
70+
{
71+
files: ['*.js'],
72+
rules: {
73+
'no-unused-vars': ['error', { vars: 'all', args: 'none' }]
74+
}
75+
},
7576
// Node scripts
7677
{
7778
files: ['scripts/**', '*.{js,ts}', 'packages/**/index.js'],

scripts/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ nr build core --formats cjs
1717
*/
1818

1919
import fs from 'node:fs/promises'
20-
import { existsSync, readFileSync } from 'node:fs'
20+
import { existsSync } from 'node:fs'
2121
import path from 'node:path'
2222
import minimist from 'minimist'
2323
import { gzipSync, brotliCompressSync } from 'node:zlib'

0 commit comments

Comments
 (0)