move to new eslint configuration format

This commit is contained in:
Daniel Micay
2024-04-08 01:38:56 -04:00
parent cb04cd3536
commit bd1edbdc0a
4 changed files with 46 additions and 51 deletions

View File

@@ -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
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
<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>{
"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"
]
<pre>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"]
}
}
}</pre>
];</pre>
<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>