-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy patheslint.config.mjs
75 lines (67 loc) · 2.16 KB
/
eslint.config.mjs
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
72
73
74
75
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import neostandard from 'neostandard'
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default [...neostandard({semi: true}), {
languageOptions: {
globals: {
...globals.browser,
_: true,
$: true,
},
ecmaVersion: 2020,
sourceType: "module",
parserOptions: {
ecmaFeatures: {
modules: true,
impliedStrict: true,
},
},
},
rules: {
'@stylistic/indent': ["error", 4, {
SwitchCase: 1,
}],
// semi: ["error", "always"],
"one-var": "off",
"@stylistic/space-before-function-paren": "off",
"no-throw-literal": "off",
camelcase: ["error", {
properties: "always",
}],
"no-console": "error",
"no-alert": "error",
"no-debugger": "error",
"prefer-arrow-callback": "error",
"@stylistic/object-property-newline": "off",
"no-useless-escape": "off",
"no-var": "error",
"prefer-const": "error",
"no-unused-expressions": "error",
strict: ["error", "never"],
"@stylistic/no-mixed-operators": "off",
"prefer-promise-reject-errors": "off",
"standard/no-callback-literal": "off",
"import/no-webpack-loader-syntax": "off",
"@stylistic/object-curly-spacing": "off",
"@stylistic/object-curly-newline": "off",
"@stylistic/quote-props": "off",
"no-case-declarations": "off",
"dot-notation": "off",
"no-prototype-builtins": "off",
"@stylistic/multiline-ternary": "off",
"node/no-callback-literal": "off",
"n/no-callback-literal": "off",
"object-shorthand": "off",
"import-x/no-webpack-loader-syntax": "off",
},
}];