-
-
Notifications
You must be signed in to change notification settings - Fork 166
Expand file tree
/
Copy patheslint.config.mjs
More file actions
51 lines (50 loc) · 1.49 KB
/
Copy patheslint.config.mjs
File metadata and controls
51 lines (50 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import js from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import globals from "globals";
export default [
{
ignores: ["src/vendor/", "dist/", "public/", "test/"],
},
js.configs.recommended,
eslintConfigPrettier,
{
files: ["src/**/*.js"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
THREE: "readonly", // vendored three.min.js (r70, loaded via <script>)
L: "readonly", // Leaflet (loaded via <script>)
chrome: "readonly", // Chrome/Electron extension APIs (pref_storage.js)
__APP_VERSION__: "readonly", // Vite define
},
},
rules: {
"no-var": "error",
"no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
"no-undef": "error",
"no-redeclare": "error",
"no-prototype-builtins": "error",
"no-empty": "error",
"no-inner-declarations": "error",
"no-fallthrough": "error",
"no-useless-escape": "error",
"no-constant-condition": "error",
"no-unreachable": "error",
"no-duplicate-case": "error",
"no-dupe-keys": "error",
"no-irregular-whitespace": "error",
"no-case-declarations": "error",
eqeqeq: ["error", "smart"],
"prefer-const": "error",
"prefer-template": "error",
radix: "error",
"comma-dangle": ["error", "always-multiline"],
semi: ["error", "always"],
},
},
];