Skip to content

Commit 7e6cee7

Browse files
authored
Build: align eslint config with 3.x branch as much as possible
Close jquerygh-5524
1 parent 55bc35b commit 7e6cee7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

build/release/dist.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const distRepoFolder = "tmp/release/dist";
2424

2525
// Files to be included in the dist repo.
2626
// README.md and bower.json are generated.
27+
// package.json is a simplified version of the original.
2728
const files = [
2829
"dist",
2930
"dist-module",

eslint.config.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default [
1010
// See https://github.com/eslint/eslint/discussions/17412
1111
ignores: [
1212
"external",
13-
"**/tmp",
13+
"tmp",
1414
"test/data/json_obj.js",
1515
"test/data/jquery-*.js"
1616
]
@@ -67,6 +67,10 @@ export default [
6767
}
6868
],
6969
"no-implicit-globals": "error",
70+
"no-unused-vars": [
71+
"error",
72+
{ caughtErrorsIgnorePattern: "^_" }
73+
],
7074
"one-var": [ "error", { var: "always" } ],
7175
strict: [ "error", "function" ]
7276
}
@@ -298,6 +302,10 @@ export default [
298302
rules: {
299303
...jqueryConfig.rules,
300304
"no-implicit-globals": "error",
305+
"no-unused-vars": [
306+
"error",
307+
{ caughtErrorsIgnorePattern: "^_" }
308+
],
301309
strict: [ "error", "global" ]
302310
}
303311
},
@@ -332,6 +340,11 @@ export default [
332340
// That is okay for the built version
333341
"no-multiple-empty-lines": "off",
334342

343+
"no-unused-vars": [
344+
"error",
345+
{ caughtErrorsIgnorePattern: "^_" }
346+
],
347+
335348
// When custom compilation is used, the version string
336349
// can get large. Accept that in the built version.
337350
"max-len": "off",

0 commit comments

Comments
 (0)