-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheslint.config.js
57 lines (55 loc) · 1.78 KB
/
eslint.config.js
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
const globals = require("globals");
const {configs: eslintConfigs} = require("@eslint/js");
const eslintPluginImport = require("eslint-plugin-import");
const eslintPluginStylistic = require("@stylistic/eslint-plugin");
const config = [
{
files: ["**/*.js"],
languageOptions: {
globals: {
Module: "readonly",
moment: "readonly",
...globals.browser,
...globals.node
}
},
plugins: {
...eslintPluginStylistic.configs["all-flat"].plugins,
import: eslintPluginImport
},
rules: {
...eslintConfigs.all.rules,
...eslintPluginImport.configs.recommended.rules,
...eslintPluginStylistic.configs["all-flat"].rules,
"capitalized-comments": "off",
"consistent-return": "off",
"consistent-this": "off",
"default-case": "off",
"func-style": "off",
"init-declarations": "off",
"line-comment-position": "off",
"max-lines": "off",
"max-lines-per-function": ["error", 100],
"max-params": "off",
"max-statements": ["error", 25],
"multiline-comment-style": "off",
"no-await-in-loop": "off",
"no-inline-comments": "off",
"no-magic-numbers": "off",
"no-undef": "warn",
"no-ternary": "off",
"one-var": "off",
"sort-keys": "off",
strict: "off",
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/dot-location": ["error", "property"],
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/indent": ["error", 2],
"@stylistic/lines-around-comment": "off",
"@stylistic/object-property-newline": "off",
"@stylistic/quote-props": ["error", "as-needed"],
"@stylistic/padded-blocks": ["error", "never"]
}
}
];
module.exports = config;