-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.mjs
More file actions
69 lines (68 loc) · 1.53 KB
/
Copy patheslint.config.mjs
File metadata and controls
69 lines (68 loc) · 1.53 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import js from "@eslint/js"
import globals from "globals"
import react from "eslint-plugin-react"
import reactHooks from "eslint-plugin-react-hooks"
import babelParser from "@babel/eslint-parser"
export default [
js.configs.recommended,
{
files: ["src/static/sw.js"],
languageOptions: {
globals: {
...globals.serviceworker,
},
},
},
{
files: ["test/**/*.js"],
languageOptions: {
globals: {
...globals.mocha,
chai: "readonly",
assert: "readonly",
expect: "readonly",
},
},
},
{
plugins: {
react,
"react-hooks": reactHooks,
},
languageOptions: {
sourceType: "module",
parser: babelParser,
parserOptions: {
requireConfigFile: false,
babelOptions: {
configFile: "./babel.config.json",
},
},
globals: {
...globals.browser,
...globals.node,
...globals.es2015,
},
},
rules: {
"quotes": 0,
"no-console": 1,
"no-debugger": 1,
"no-var": 1,
"semi": [2, "never"],
"comma-dangle": ["error", "always-multiline"],
"no-trailing-spaces": 0,
"eol-last": 0,
"no-unused-vars": 1,
"no-underscore-dangle": 0,
"no-unexpected-multiline": 1,
"no-alert": 2,
"no-lone-blocks": 0,
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"jsx-quotes": 1,
},
},
]