mirror of
https://github.com/jquery/jquery.git
synced 2024-12-09 08:04:24 +00:00
Build: align eslint config with 3.x branch as much as possible
Close gh-5524
This commit is contained in:
parent
55bc35bcd4
commit
7e6cee72e2
@ -24,6 +24,7 @@ const distRepoFolder = "tmp/release/dist";
|
|||||||
|
|
||||||
// Files to be included in the dist repo.
|
// Files to be included in the dist repo.
|
||||||
// README.md and bower.json are generated.
|
// README.md and bower.json are generated.
|
||||||
|
// package.json is a simplified version of the original.
|
||||||
const files = [
|
const files = [
|
||||||
"dist",
|
"dist",
|
||||||
"dist-module",
|
"dist-module",
|
||||||
|
@ -10,7 +10,7 @@ export default [
|
|||||||
// See https://github.com/eslint/eslint/discussions/17412
|
// See https://github.com/eslint/eslint/discussions/17412
|
||||||
ignores: [
|
ignores: [
|
||||||
"external",
|
"external",
|
||||||
"**/tmp",
|
"tmp",
|
||||||
"test/data/json_obj.js",
|
"test/data/json_obj.js",
|
||||||
"test/data/jquery-*.js"
|
"test/data/jquery-*.js"
|
||||||
]
|
]
|
||||||
@ -67,6 +67,10 @@ export default [
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"no-implicit-globals": "error",
|
"no-implicit-globals": "error",
|
||||||
|
"no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{ caughtErrorsIgnorePattern: "^_" }
|
||||||
|
],
|
||||||
"one-var": [ "error", { var: "always" } ],
|
"one-var": [ "error", { var: "always" } ],
|
||||||
strict: [ "error", "function" ]
|
strict: [ "error", "function" ]
|
||||||
}
|
}
|
||||||
@ -298,6 +302,10 @@ export default [
|
|||||||
rules: {
|
rules: {
|
||||||
...jqueryConfig.rules,
|
...jqueryConfig.rules,
|
||||||
"no-implicit-globals": "error",
|
"no-implicit-globals": "error",
|
||||||
|
"no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{ caughtErrorsIgnorePattern: "^_" }
|
||||||
|
],
|
||||||
strict: [ "error", "global" ]
|
strict: [ "error", "global" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -332,6 +340,11 @@ export default [
|
|||||||
// That is okay for the built version
|
// That is okay for the built version
|
||||||
"no-multiple-empty-lines": "off",
|
"no-multiple-empty-lines": "off",
|
||||||
|
|
||||||
|
"no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{ caughtErrorsIgnorePattern: "^_" }
|
||||||
|
],
|
||||||
|
|
||||||
// When custom compilation is used, the version string
|
// When custom compilation is used, the version string
|
||||||
// can get large. Accept that in the built version.
|
// can get large. Accept that in the built version.
|
||||||
"max-len": "off",
|
"max-len": "off",
|
||||||
|
Loading…
Reference in New Issue
Block a user