Skip to content

Commit cd49130

Browse files
committed
Add eslint with rules based on the existing project coding style
1 parent 733da57 commit cd49130

File tree

24 files changed

+970
-65
lines changed

24 files changed

+970
-65
lines changed

.eslintrc.js

+278
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
module.exports = {
2+
"env": {
3+
"commonjs": true,
4+
"es2021": true,
5+
"node": true
6+
},
7+
"extends": "eslint:recommended",
8+
"parserOptions": {
9+
"ecmaVersion": 13
10+
},
11+
"rules": {
12+
"accessor-pairs": "error",
13+
"array-bracket-newline": "off",
14+
"array-bracket-spacing": "off",
15+
"array-callback-return": "off",
16+
"array-element-newline": "off",
17+
"arrow-body-style": "off",
18+
"arrow-parens": "off",
19+
"arrow-spacing": "off",
20+
"block-scoped-var": "error",
21+
"block-spacing": "off",
22+
"brace-style": "off",
23+
"camelcase": "off",
24+
"capitalized-comments": "off",
25+
"class-methods-use-this": "error",
26+
"comma-dangle": "off",
27+
"comma-spacing": "off",
28+
"comma-style": [
29+
"error",
30+
"last"
31+
],
32+
"complexity": "off",
33+
"computed-property-spacing": [
34+
"error",
35+
"never"
36+
],
37+
"consistent-return": "off",
38+
"consistent-this": "error",
39+
"curly": "off",
40+
"default-case": "off",
41+
"default-case-last": "error",
42+
"default-param-last": "off",
43+
"dot-location": [
44+
"error",
45+
"property"
46+
],
47+
"dot-notation": "off",
48+
"eol-last": "off",
49+
"eqeqeq": "off",
50+
"func-call-spacing": "error",
51+
"func-name-matching": "error",
52+
"func-names": "off",
53+
"func-style": [
54+
"error",
55+
"declaration",
56+
{
57+
"allowArrowFunctions": true
58+
}
59+
],
60+
"function-call-argument-newline": "off",
61+
"function-paren-newline": "off",
62+
"generator-star-spacing": "error",
63+
"grouped-accessor-pairs": "error",
64+
"guard-for-in": "error",
65+
"id-denylist": "error",
66+
"id-length": "off",
67+
"id-match": "error",
68+
"implicit-arrow-linebreak": "off",
69+
"indent": "off",
70+
"init-declarations": "off",
71+
"jsx-quotes": "error",
72+
"key-spacing": "off",
73+
"keyword-spacing": "off",
74+
"line-comment-position": "off",
75+
"linebreak-style": [
76+
"error",
77+
"unix"
78+
],
79+
"lines-around-comment": "off",
80+
"lines-between-class-members": "error",
81+
"max-classes-per-file": "error",
82+
"max-depth": "off",
83+
"max-len": "off",
84+
"max-lines": "off",
85+
"max-lines-per-function": "off",
86+
"max-nested-callbacks": "error",
87+
"max-params": "off",
88+
"max-statements": "off",
89+
"max-statements-per-line": "off",
90+
"multiline-comment-style": "off",
91+
"multiline-ternary": [
92+
"error",
93+
"always-multiline"
94+
],
95+
"new-cap": "off",
96+
"new-parens": "error",
97+
"newline-per-chained-call": "off",
98+
"no-alert": "error",
99+
"no-array-constructor": "error",
100+
"no-await-in-loop": "off",
101+
"no-bitwise": "error",
102+
"no-caller": "error",
103+
"no-case-declarations": "off",
104+
"no-confusing-arrow": "off",
105+
"no-console": "off",
106+
"no-constructor-return": "error",
107+
"no-continue": "off",
108+
"no-div-regex": "error",
109+
"no-duplicate-imports": "error",
110+
"no-else-return": "off",
111+
"no-empty-function": "off",
112+
"no-eq-null": "error",
113+
"no-eval": "error",
114+
"no-extend-native": "error",
115+
"no-extra-bind": "error",
116+
"no-extra-label": "error",
117+
"no-extra-parens": "off",
118+
"no-floating-decimal": "error",
119+
"no-implicit-globals": "off",
120+
"no-implied-eval": "error",
121+
"no-inline-comments": "off",
122+
"no-inner-declarations": [
123+
"error",
124+
"functions"
125+
],
126+
"no-invalid-this": "error",
127+
"no-iterator": "error",
128+
"no-label-var": "error",
129+
"no-labels": "error",
130+
"no-lone-blocks": "off",
131+
"no-lonely-if": "off",
132+
"no-loop-func": "error",
133+
"no-magic-numbers": "off",
134+
"no-mixed-operators": "off",
135+
"no-multi-assign": "error",
136+
"no-multi-spaces": "off",
137+
"no-multi-str": "error",
138+
"no-multiple-empty-lines": "off",
139+
"no-negated-condition": "off",
140+
"no-nested-ternary": "error",
141+
"no-new": "error",
142+
"no-new-func": "error",
143+
"no-new-object": "error",
144+
"no-new-wrappers": "error",
145+
"no-octal-escape": "error",
146+
"no-param-reassign": "off",
147+
"no-plusplus": "off",
148+
"no-promise-executor-return": "off",
149+
"no-proto": "error",
150+
"no-prototype-builtins": "off",
151+
"no-restricted-exports": "error",
152+
"no-restricted-globals": "error",
153+
"no-restricted-imports": "error",
154+
"no-restricted-properties": "error",
155+
"no-restricted-syntax": "error",
156+
"no-return-assign": "off",
157+
"no-return-await": "off",
158+
"no-script-url": "error",
159+
"no-self-compare": "error",
160+
"no-sequences": "error",
161+
"no-shadow": "off",
162+
"no-tabs": "error",
163+
"no-template-curly-in-string": "off",
164+
"no-ternary": "off",
165+
"no-throw-literal": "error",
166+
"no-trailing-spaces": [
167+
"error",
168+
{
169+
"ignoreComments": true,
170+
"skipBlankLines": true
171+
}
172+
],
173+
"no-undef-init": "off",
174+
"no-undefined": "off",
175+
"no-underscore-dangle": "off",
176+
"no-unmodified-loop-condition": "off",
177+
"no-unneeded-ternary": "off",
178+
"no-unreachable-loop": "error",
179+
"no-unused-expressions": "off",
180+
"no-unused-private-class-members": "error",
181+
"no-use-before-define": "error",
182+
"no-useless-call": "error",
183+
"no-useless-computed-key": "error",
184+
"no-useless-concat": "error",
185+
"no-useless-constructor": "error",
186+
"no-useless-rename": "error",
187+
"no-useless-return": "error",
188+
"no-var": "off",
189+
"no-void": "error",
190+
"no-warning-comments": "off",
191+
"no-whitespace-before-property": "error",
192+
"nonblock-statement-body-position": [
193+
"error",
194+
"any"
195+
],
196+
"object-curly-newline": "error",
197+
"object-curly-spacing": "off",
198+
"object-shorthand": "off",
199+
"one-var": "off",
200+
"one-var-declaration-per-line": "error",
201+
"operator-assignment": [
202+
"error",
203+
"always"
204+
],
205+
"operator-linebreak": "off",
206+
"padded-blocks": "off",
207+
"padding-line-between-statements": "error",
208+
"prefer-arrow-callback": "off",
209+
"prefer-const": "off",
210+
"prefer-destructuring": "off",
211+
"prefer-exponentiation-operator": "off",
212+
"prefer-named-capture-group": "off",
213+
"prefer-numeric-literals": "error",
214+
"prefer-object-has-own": "error",
215+
"prefer-object-spread": "off",
216+
"prefer-promise-reject-errors": "off",
217+
"prefer-regex-literals": [
218+
"error",
219+
{
220+
"disallowRedundantWrapping": false
221+
}
222+
],
223+
"prefer-rest-params": "error",
224+
"prefer-spread": "error",
225+
"prefer-template": "off",
226+
"quote-props": "off",
227+
"quotes": "off",
228+
"radix": "off",
229+
"require-atomic-updates": "off",
230+
"require-await": "off",
231+
"require-unicode-regexp": "off",
232+
"rest-spread-spacing": [
233+
"error",
234+
"never"
235+
],
236+
"semi": "off",
237+
"semi-spacing": [
238+
"error",
239+
{
240+
"after": true,
241+
"before": false
242+
}
243+
],
244+
"semi-style": [
245+
"error",
246+
"last"
247+
],
248+
"sort-imports": "error",
249+
"sort-keys": "off",
250+
"sort-vars": "error",
251+
"space-before-blocks": "off",
252+
"space-before-function-paren": "off",
253+
"space-in-parens": "off",
254+
"space-infix-ops": "off",
255+
"space-unary-ops": "error",
256+
"spaced-comment": "off",
257+
"strict": "off",
258+
"switch-colon-spacing": "error",
259+
"symbol-description": "error",
260+
"template-curly-spacing": "off",
261+
"template-tag-spacing": [
262+
"error",
263+
"never"
264+
],
265+
"unicode-bom": [
266+
"error",
267+
"never"
268+
],
269+
"vars-on-top": "off",
270+
"wrap-iife": "error",
271+
"wrap-regex": "error",
272+
"yield-star-spacing": "error",
273+
"yoda": [
274+
"error",
275+
"never"
276+
]
277+
}
278+
};

misc/job-design.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line no-unused-vars
12
const job = {
23
uid: 'string',
34
type: 'default',
@@ -69,7 +70,7 @@ const job = {
6970
module: '@nexrender/action-webhook',
7071
success: 'http://example.com/api/render-callback',
7172
failure: 'http://example.com/api/render-callback',
72-
header: { 'Authorization: sometoken' }
73+
header: { Authorization: 'sometoken' }
7374
}
7475
]
7576
}

0 commit comments

Comments
 (0)