From adf4f9b75af2d39e35551c4d10a56e05eb9e7aa0 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 9 Nov 2020 15:26:48 -0500 Subject: [PATCH] update documentation to use eslint --- static/build.html | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/static/build.html b/static/build.html index a7f0581f..6a22d5f5 100644 --- a/static/build.html +++ b/static/build.html @@ -1188,18 +1188,36 @@ rm android-cts-media-1.5.zip declare variables, unless they are reassigned in which case they should be declared with let but never use var as it is effectively broken. Try to prefer loops with for..of. JavaScript must pass verification with - jshint using the following .jslintrc configuration:

+ eslint using the following .eslintrc.json configuration:

{
-    "browser": true,
-    "module": true,
-    "curly": true,
-    "devel": true,
-    "esversion": 6,
-    "freeze": true,
-    "futurehostile": true,
-    "strict": "global",
-    "varstmt": true
+    "env": {
+        "browser": true,
+        "es2021": true
+    },
+    "extends": "eslint:recommended",
+    "parserOptions": {
+        "ecmaVersion": 12,
+        "sourceType": "module"
+    },
+    "rules": {
+        "indent": [
+            "error",
+            4
+        ],
+        "linebreak-style": [
+            "error",
+            "unix"
+        ],
+        "quotes": [
+            "error",
+            "double"
+        ],
+        "semi": [
+            "error",
+            "always"
+        ]
+    }
 }

Cookies are only used for login sessions. The only other use case considered valid