-
Notifications
You must be signed in to change notification settings - Fork 31
/
eslint.config.mjs
42 lines (40 loc) · 1.35 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
import eslintPluginImport from "eslint-plugin-import";
import eslintPluginJs from "@eslint/js";
import eslintPluginJsonc from "eslint-plugin-jsonc";
import eslintPluginStylistic from "@stylistic/eslint-plugin";
import globals from "globals";
export default [
...eslintPluginJsonc.configs["flat/recommended-with-json"],
{
files: ["**/*.js", "**/*.mjs"],
languageOptions: {
globals: {
...globals.browser,
...globals.nodeBuiltin,
...globals.node
}
},
plugins: {
...eslintPluginStylistic.configs["all-flat"].plugins,
import: eslintPluginImport
},
rules: {
...eslintPluginJs.configs.all.rules,
...eslintPluginImport.configs.recommended.rules,
...eslintPluginStylistic.configs["all-flat"].rules,
"capitalized-comments": "off",
"consistent-this": "off",
"max-statements": ["error", 25],
"multiline-comment-style": "off",
"no-magic-numbers": "off",
"one-var": "off",
"sort-keys": "off",
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/dot-location": ["error", "property"],
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/indent": ["error", 2],
"@stylistic/quote-props": ["error", "as-needed"],
"@stylistic/padded-blocks": ["error", "never"]
}
}
];