-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy patheslint.config.mjs
More file actions
executable file
·71 lines (70 loc) · 2.76 KB
/
Copy patheslint.config.mjs
File metadata and controls
executable file
·71 lines (70 loc) · 2.76 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
70
71
import js from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
import { defineConfig } from "eslint/config";
import globals from "globals";
export default defineConfig([
{
files: [
"./src/**/*.{js,mjs,cjs}",
"./test/**/*.{js,mjs,cjs}",
],
plugins: {
js,
"@stylistic": stylistic
},
extends: ["js/recommended"],
languageOptions: {
globals: globals.browser
},
rules: {
"@stylistic/array-bracket-newline": ["error", "consistent"],
"@stylistic/array-bracket-spacing": ["error", "never"],
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/arrow-parens": ["error", "as-needed"],
"@stylistic/arrow-spacing": "error",
"@stylistic/comma-dangle": ["error", "never"],
"@stylistic/comma-spacing": ["error", { "before": false, "after": true }],
"@stylistic/comma-style": ["error", "last"],
"@stylistic/computed-property-spacing": ["error", "never"],
"@stylistic/function-call-spacing": ["error", "never"],
"@stylistic/function-paren-newline": ["error", "consistent"],
"@stylistic/indent": ["error", "tab", { "SwitchCase": 1 }],
"@stylistic/key-spacing": "error",
"@stylistic/keyword-spacing": "error",
"@stylistic/line-comment-position": "off",
"@stylistic/lines-around-comment": "off",
"@stylistic/lines-between-class-members": ["error", "always"],
"@stylistic/no-extra-parens": ["error", "all", { "nestedBinaryExpressions": false }],
"@stylistic/no-extra-semi": "error",
"@stylistic/no-floating-decimal": "error",
"@stylistic/no-mixed-operators": "error",
"@stylistic/no-multi-spaces": "error",
"@stylistic/no-trailing-spaces": "error",
"@stylistic/no-whitespace-before-property": "error",
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/quote-props": ["error", "consistent"],
"@stylistic/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": "avoidEscape" }],
"@stylistic/rest-spread-spacing": ["error", "never"],
"@stylistic/semi-spacing": "error",
"@stylistic/semi-style": ["error", "last"],
"@stylistic/semi": ["error", "always"],
"@stylistic/space-before-blocks": "error",
"@stylistic/space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
"@stylistic/space-in-parens": ["error", "never"],
"@stylistic/space-infix-ops": "error",
"@stylistic/space-unary-ops": "error",
"@stylistic/spaced-comment": ["error", "always"],
"@stylistic/switch-colon-spacing": "error",
"@stylistic/template-curly-spacing": "error",
"@stylistic/template-tag-spacing": "error",
"no-undef": "off",
"no-unused-vars": ["warn", { "ignoreRestSiblings": true }],
"prefer-const": ["warn", { "destructuring": "all" }]
}
},
{
ignores: [
"./foundry.js"
]
}
]);