-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
54 lines (52 loc) · 1.26 KB
/
Copy patheslint.config.js
File metadata and controls
54 lines (52 loc) · 1.26 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
52
53
54
import globals from "globals";
export default [
{
ignores: [
"coverage/**",
"frontend/**",
"node_modules/**",
"build/**",
"tests/**",
"web/static/vendor/**",
"web/static/**/*.test.js",
],
},
{
files: ["web/static/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
// Mitto-specific globals injected by the server
mittoApiPrefix: "readonly",
mittoIsExternal: "readonly",
},
},
rules: {
// Catch real errors
"no-dupe-keys": "error",
"no-dupe-args": "error",
"no-duplicate-case": "error",
"no-unreachable": "error",
"valid-typeof": "error",
"no-constant-condition": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"use-isnan": "error",
"no-sparse-arrays": "error",
"no-template-curly-in-string": "warn",
"no-loss-of-precision": "error",
// Code quality
"eqeqeq": ["error", "always", { null: "ignore" }],
"no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
},
},
];