forked from darkskyapp/translations
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
57 lines (56 loc) · 2.03 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 pluginPromise = require("eslint-plugin-promise");
const nodePlugin = require("eslint-plugin-n");
module.exports = [
nodePlugin.configs["flat/recommended-script"],
pluginPromise.configs["flat/recommended"],
{
languageOptions: {
ecmaVersion: 2024,
sourceType: "module",
},
ignores: ["/node_modules/*"],
rules: {
"n/exports-style": ["error", "module.exports"],
"n/no-unpublished-require": "off",
"brace-style": ["error", "stroustrup", {"allowSingleLine": true}],
"comma-dangle": ["error", "always-multiline"],
"dot-location": ["error", "object"],
"eol-last": ["error", "always"],
"eqeqeq": ["error", "always"],
"global-require": "off",
"indent": ["error", 2, {"SwitchCase": 1}],
"max-len": "off",
"new-parens": ["error"],
"no-alert": ["error"],
"no-buffer-constructor": ["error"],
"no-caller": ["error"],
"no-else-return": ["error", {"allowElseIf": false}],
"no-empty": ["error", {"allowEmptyCatch": true}],
"no-eval": ["error"],
"no-extend-native": ["error"],
"no-floating-decimal": ["error"],
"no-implied-eval": ["error"],
"no-loop-func": ["error"],
"no-multi-assign": ["error"],
"no-multi-spaces": ["error", { "exceptions": { "Property": true, "VariableDeclarator": true, "ImportDeclaration": true } } ],
"no-new": ["error"],
"no-new-func": ["error"],
"no-new-wrappers": ["error"],
"no-tabs": ["error"],
"no-throw-literal": ["error"],
"no-trailing-spaces": ["error"],
"no-var": ["error"],
"no-with": ["error"],
"linebreak-style": ["error", "unix"],
"one-var": ["error", "never"],
"prefer-const": ["error"],
"prefer-numeric-literals": ["error"],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"spaced-comment": ["warn", "always"],
"strict": ["error", "global"],
"multiline-comment-style": ["error", "separate-lines"],
"no-unused-vars": ["error", {"args": "none"}],
},
},
];