move to new eslint configuration format
This commit is contained in:
parent
cb04cd3536
commit
bd1edbdc0a
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"es2022": true
|
|
||||||
},
|
|
||||||
"extends": "eslint:recommended",
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": 2022,
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"indent": ["error", 4],
|
|
||||||
"linebreak-style": ["error", "unix"],
|
|
||||||
"quotes": ["error", "double"],
|
|
||||||
"semi": ["error", "always"],
|
|
||||||
"no-var": ["error"]
|
|
||||||
}
|
|
||||||
}
|
|
22
eslint.config.js
Normal file
22
eslint.config.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import js from "@eslint/js";
|
||||||
|
import globals from "globals";
|
||||||
|
|
||||||
|
export default [
|
||||||
|
js.configs.recommended,
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser
|
||||||
|
},
|
||||||
|
ecmaVersion: 2022,
|
||||||
|
sourceType: "module"
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
indent: ["error", 4],
|
||||||
|
"linebreak-style": ["error", "unix"],
|
||||||
|
quotes: ["error", "double"],
|
||||||
|
semi: ["error", "always"],
|
||||||
|
"no-var": ["error"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
@ -7,5 +7,6 @@
|
|||||||
"stylelint-config-standard": "^36.0.0",
|
"stylelint-config-standard": "^36.0.0",
|
||||||
"terser": "^5.30.3",
|
"terser": "^5.30.3",
|
||||||
"vnu-jar": "^23.4.11"
|
"vnu-jar": "^23.4.11"
|
||||||
}
|
},
|
||||||
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
@ -1364,40 +1364,30 @@ rm android-cts-media-1.5.zip</pre>
|
|||||||
declare variables, unless they are reassigned in which case they should be declared
|
declare variables, unless they are reassigned in which case they should be declared
|
||||||
with <code>let</code> but never use <code>var</code> as it is effectively broken. Try
|
with <code>let</code> but never use <code>var</code> as it is effectively broken. Try
|
||||||
to prefer loops with <code>for..of</code>. JavaScript must pass verification with
|
to prefer loops with <code>for..of</code>. JavaScript must pass verification with
|
||||||
<code>eslint</code> using the following <code>.eslintrc.json</code> configuration:</p>
|
<code>eslint</code> using the following <code>eslint.config.js</code> configuration:</p>
|
||||||
|
|
||||||
<pre>{
|
<pre>import js from "@eslint/js";
|
||||||
"env": {
|
import globals from "globals";
|
||||||
"browser": true,
|
|
||||||
"es2022": true
|
export default [
|
||||||
},
|
js.configs.recommended,
|
||||||
"extends": "eslint:recommended",
|
{
|
||||||
"parserOptions": {
|
languageOptions: {
|
||||||
"ecmaVersion": 2022,
|
globals: {
|
||||||
"sourceType": "module"
|
...globals.browser
|
||||||
},
|
},
|
||||||
"rules": {
|
ecmaVersion: 2022,
|
||||||
"indent": [
|
sourceType: "module"
|
||||||
"error",
|
},
|
||||||
4
|
rules: {
|
||||||
],
|
indent: ["error", 4],
|
||||||
"linebreak-style": [
|
"linebreak-style": ["error", "unix"],
|
||||||
"error",
|
quotes: ["error", "double"],
|
||||||
"unix"
|
semi: ["error", "always"],
|
||||||
],
|
"no-var": ["error"]
|
||||||
"quotes": [
|
}
|
||||||
"error",
|
|
||||||
"double"
|
|
||||||
],
|
|
||||||
"semi": [
|
|
||||||
"error",
|
|
||||||
"always"
|
|
||||||
],
|
|
||||||
"no-var": [
|
|
||||||
"error"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}</pre>
|
];</pre>
|
||||||
|
|
||||||
<p>Cookies are only used for login sessions. Every cookie must have the
|
<p>Cookies are only used for login sessions. Every cookie must have the
|
||||||
<code>__Host</code> prefix to guarantee that it has the <code>Secure</code>
|
<code>__Host</code> prefix to guarantee that it has the <code>Secure</code>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user