aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimmy Willison <timmywil@users.noreply.github.com>2024-08-08 21:39:11 -0400
committerGitHub <noreply@github.com>2024-08-08 21:39:11 -0400
commit7e6cee72e2e4d144f4e3fc6d46db9251d38c6fc2 (patch)
treeee3df1ab74a672b512e5497ff66b02a0bbf69c7d
parent55bc35bcd453e1aefb9e893e7e6ebc665b3fbb11 (diff)
downloadjquery-7e6cee72e2e4d144f4e3fc6d46db9251d38c6fc2.tar.gz
jquery-7e6cee72e2e4d144f4e3fc6d46db9251d38c6fc2.zip
Build: align eslint config with 3.x branch as much as possible
Close gh-5524
-rw-r--r--build/release/dist.js1
-rw-r--r--eslint.config.js15
2 files changed, 15 insertions, 1 deletions
diff --git a/build/release/dist.js b/build/release/dist.js
index 5f1545b71..19892b8b7 100644
--- a/build/release/dist.js
+++ b/build/release/dist.js
@@ -24,6 +24,7 @@ const distRepoFolder = "tmp/release/dist";
// Files to be included in the dist repo.
// README.md and bower.json are generated.
+// package.json is a simplified version of the original.
const files = [
"dist",
"dist-module",
diff --git a/eslint.config.js b/eslint.config.js
index b377cd5f9..ceb943dbb 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -10,7 +10,7 @@ export default [
// See https://github.com/eslint/eslint/discussions/17412
ignores: [
"external",
- "**/tmp",
+ "tmp",
"test/data/json_obj.js",
"test/data/jquery-*.js"
]
@@ -67,6 +67,10 @@ export default [
}
],
"no-implicit-globals": "error",
+ "no-unused-vars": [
+ "error",
+ { caughtErrorsIgnorePattern: "^_" }
+ ],
"one-var": [ "error", { var: "always" } ],
strict: [ "error", "function" ]
}
@@ -298,6 +302,10 @@ export default [
rules: {
...jqueryConfig.rules,
"no-implicit-globals": "error",
+ "no-unused-vars": [
+ "error",
+ { caughtErrorsIgnorePattern: "^_" }
+ ],
strict: [ "error", "global" ]
}
},
@@ -332,6 +340,11 @@ export default [
// That is okay for the built version
"no-multiple-empty-lines": "off",
+ "no-unused-vars": [
+ "error",
+ { caughtErrorsIgnorePattern: "^_" }
+ ],
+
// When custom compilation is used, the version string
// can get large. Accept that in the built version.
"max-len": "off",