-
Notifications
You must be signed in to change notification settings - Fork 20
/
common.json
133 lines (133 loc) · 4.6 KB
/
common.json
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
"extends": [
"eslint:recommended",
"plugin:security/recommended",
"./jsdoc"
],
"env": {},
"globals": {},
"settings": { "es-x": { "aggressive": true } },
"reportUnusedDisableDirectives": true,
"ignorePatterns": [ "!.*.*", ".*/*", "node_modules/*" ],
"overrides": [
{
"files": [ "**/*.json", "**/*.jsonc" ],
"parser": "eslint-plugin-json-es",
"extends": "./json"
},
{
"files": [ "**/*.yaml", "**/*.yml" ],
"parser": "yaml-eslint-parser",
"extends": "./yaml"
}
],
"plugins": [ "security", "unicorn" ],
"rules": {
"array-bracket-spacing": [ "error", "always" ],
"array-callback-return": "error",
"block-scoped-var": "error",
"block-spacing": "error",
"brace-style": [ "error", "1tbs" ],
"camelcase": [ "error", { "properties": "always" } ],
"comma-dangle": [ "error", "never" ],
"comma-spacing": [ "error", { "before": false, "after": true } ],
"comma-style": [ "error", "last" ],
"computed-property-spacing": [ "error", "always" ],
"curly": [ "error", "all" ],
"dot-location": [ "error", "property" ],
"dot-notation": [ "error" ],
"eol-last": "error",
"eqeqeq": "error",
"func-call-spacing": "error",
"indent": [ "error", "tab", { "SwitchCase": 1 } ],
"key-spacing": [ "error", { "beforeColon": false, "afterColon": true } ],
"keyword-spacing": "error",
"linebreak-style": [ "error", "unix" ],
"max-len": [ "warn", {
"code": 100,
"tabWidth": 4,
"ignorePattern": "^[\\s]*(//|<!--) (es|style)lint-.+",
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
} ],
"max-statements-per-line": [ "error", { "max": 1 } ],
"new-cap": [ "error", { "newIsCap": true, "capIsNew": false, "properties": true } ],
"new-parens": "error",
"no-array-constructor": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": [ "error", { "checkLoops": false } ],
"no-empty": [ "error", { "allowEmptyCatch": true } ],
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": [ "error", { "string": true, "boolean": false, "number": false } ],
"no-implicit-globals": "error",
"no-label-var": "error",
"no-loop-func": "error",
"no-loss-of-precision": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": [ "error", { "max": 1, "maxBOF": 0, "maxEOF": 0 } ],
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-wrappers": "error",
"no-nonoctal-decimal-escape": "error",
"no-octal-escape": "error",
"no-proto": "error",
"no-prototype-builtins": "error",
"no-return-assign": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": [ "error", { "hoist": "all" } ],
"no-shadow-restricted-names": "error",
"no-tabs": [ "error", { "allowIndentationTabs": true } ],
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": [ "error", { "defaultAssignment": false } ],
"no-unreachable-loop": "error",
"no-unused-expressions": "error",
"no-use-before-define": [ "error", "nofunc" ],
"no-useless-call": "error",
"no-useless-concat": "error",
"no-void": "error",
"no-whitespace-before-property": "error",
"no-with": "error",
"object-curly-spacing": [ "error", "always" ],
"operator-linebreak": [ "error", "after" ],
"prefer-numeric-literals": "error",
"prefer-regex-literals": "error",
"quote-props": [ "error", "as-needed" ],
"quotes": [ "error", "single", { "avoidEscape": true } ],
"semi": [ "error", "always" ],
"semi-spacing": [ "error", { "before": false, "after": true } ],
"semi-style": [ "error", "last" ],
"space-before-blocks": [ "error", "always" ],
"space-before-function-paren": [ "error", { "anonymous": "always", "named": "never" } ],
"space-in-parens": [ "error", "always", { "exceptions": [ "empty" ] } ],
"space-infix-ops": "error",
"space-unary-ops": [ "error", { "words": true, "nonwords": false } ],
"spaced-comment": [ "error", "always", {
"exceptions": [ "*", "!" ],
"block": { "balanced": true }
} ],
"switch-colon-spacing": [ "error", { "after": true, "before": false } ],
"unicode-bom": [ "error" ],
"wrap-iife": "error",
"yoda": [ "error", "never" ],
"security/detect-object-injection": "off",
"unicorn/prefer-date-now": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/throw-new-error": "error"
}
}