-
-
Notifications
You must be signed in to change notification settings - Fork 303
Expand file tree
/
Copy patheslint.config.cjs
More file actions
33 lines (32 loc) · 1.13 KB
/
Copy patheslint.config.cjs
File metadata and controls
33 lines (32 loc) · 1.13 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
const js = require("@eslint/js")
const globals = require("globals")
module.exports = [
{
ignores: ["dist/**", "node_modules/**", "packages/**/dist/**"]
},
js.configs.recommended,
{
files: ["__tests__/**/*.js","src/**/*.js"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
WebKitCSSMatrix: "readonly"
}
},
rules: {
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 0 }],
"eol-last": ["error", "always"],
"no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
"arrow-spacing": ["error", { before: true, after: true }],
"no-trailing-spaces": "error",
"quotes": ["error", "single", { avoidEscape: true }],
"semi": ["error", "never"],
"no-empty": ["error", { allowEmptyCatch: true }],
// esbuild lowers block-level function declarations to a hoisted `var` of the same
// name; two same-named ones in one scope then silently clobber each other.
"no-inner-declarations": ["error", "functions", { blockScopedFunctions: "disallow" }]
}
}
]