Skip to content

Commit ab25a99

Browse files
committed
Addpy eslint and prettier to the codebase
PR-URL: #193
1 parent 9430faf commit ab25a99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+270
-341
lines changed

.eslintrc.json

Lines changed: 44 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,38 @@
99
"ecmaVersion": 2020
1010
},
1111
"rules": {
12-
"indent": [
13-
"error",
14-
2
15-
],
16-
"linebreak-style": [
17-
"error",
18-
"unix"
19-
],
12+
"indent": ["error", 2],
13+
"linebreak-style": ["error", "unix"],
2014
"quotes": [
2115
"error",
2216
"single",
2317
{
2418
"allowTemplateLiterals": true
2519
}
2620
],
27-
"semi": [
28-
"error",
29-
"always"
30-
],
31-
"no-loop-func": [
32-
"error"
33-
],
34-
"block-spacing": [
35-
"error",
36-
"always"
37-
],
38-
"camelcase": [
39-
"error"
40-
],
41-
"eqeqeq": [
42-
"error",
43-
"always"
44-
],
45-
"strict": [
46-
"error",
47-
"global"
48-
],
21+
"semi": ["error", "always"],
22+
"no-loop-func": ["error"],
23+
"block-spacing": ["error", "always"],
24+
"camelcase": ["error"],
25+
"eqeqeq": ["error", "always"],
26+
"strict": ["error", "global"],
4927
"brace-style": [
5028
"error",
5129
"1tbs",
5230
{
5331
"allowSingleLine": true
5432
}
5533
],
56-
"comma-style": [
57-
"error",
58-
"last"
59-
],
34+
"comma-style": ["error", "last"],
6035
"comma-spacing": [
6136
"error",
6237
{
6338
"before": false,
6439
"after": true
6540
}
6641
],
67-
"eol-last": [
68-
"error"
69-
],
70-
"func-call-spacing": [
71-
"error",
72-
"never"
73-
],
42+
"eol-last": ["error"],
43+
"func-call-spacing": ["error", "never"],
7444
"key-spacing": [
7545
"error",
7646
{
@@ -112,44 +82,22 @@
11282
"properties": true
11383
}
11484
],
115-
"new-parens": [
116-
"error"
117-
],
118-
"no-lonely-if": [
119-
"error"
120-
],
121-
"no-trailing-spaces": [
122-
"error"
123-
],
124-
"no-unneeded-ternary": [
125-
"error"
126-
],
127-
"no-whitespace-before-property": [
128-
"error"
129-
],
130-
"object-curly-spacing": [
131-
"error",
132-
"always"
133-
],
134-
"operator-assignment": [
135-
"error",
136-
"always"
137-
],
138-
"operator-linebreak": [
139-
"error",
140-
"after"
141-
],
85+
"new-parens": ["error"],
86+
"no-lonely-if": ["error"],
87+
"no-trailing-spaces": ["error"],
88+
"no-unneeded-ternary": ["error"],
89+
"no-whitespace-before-property": ["error"],
90+
"object-curly-spacing": ["error", "always"],
91+
"operator-assignment": ["error", "always"],
92+
"operator-linebreak": ["error", "after"],
14293
"semi-spacing": [
14394
"error",
14495
{
14596
"before": false,
14697
"after": true
14798
}
14899
],
149-
"space-before-blocks": [
150-
"error",
151-
"always"
152-
],
100+
"space-before-blocks": ["error", "always"],
153101
"space-before-function-paren": [
154102
"error",
155103
{
@@ -158,13 +106,8 @@
158106
"asyncArrow": "always"
159107
}
160108
],
161-
"space-in-parens": [
162-
"error",
163-
"never"
164-
],
165-
"space-infix-ops": [
166-
"error"
167-
],
109+
"space-in-parens": ["error", "never"],
110+
"space-infix-ops": ["error"],
168111
"space-unary-ops": [
169112
"error",
170113
{
@@ -175,94 +118,45 @@
175118
}
176119
}
177120
],
178-
"no-unreachable": [
179-
"error"
180-
],
181-
"no-global-assign": [
182-
"error"
183-
],
184-
"no-self-compare": [
185-
"error"
186-
],
187-
"no-unmodified-loop-condition": [
188-
"error"
189-
],
121+
"no-unreachable": ["error"],
122+
"no-global-assign": ["error"],
123+
"no-self-compare": ["error"],
124+
"no-unmodified-loop-condition": ["error"],
190125
"no-constant-condition": [
191126
"error",
192127
{
193128
"checkLoops": false
194129
}
195130
],
196-
"no-console": [
197-
"off"
198-
],
199-
"no-useless-concat": [
200-
"error"
201-
],
202-
"no-useless-escape": [
203-
"error"
204-
],
205-
"no-shadow-restricted-names": [
206-
"error"
207-
],
131+
"no-console": ["off"],
132+
"no-useless-concat": ["error"],
133+
"no-useless-escape": ["error"],
134+
"no-shadow-restricted-names": ["error"],
208135
"no-use-before-define": [
209136
"error",
210137
{
211138
"functions": false
212139
}
213140
],
214-
"arrow-parens": [
215-
"error",
216-
"as-needed"
217-
],
218-
"arrow-body-style": [
219-
"error",
220-
"as-needed"
221-
],
222-
"arrow-spacing": [
223-
"error"
224-
],
141+
"arrow-parens": ["error", "as-needed"],
142+
"arrow-body-style": ["error", "as-needed"],
143+
"arrow-spacing": ["error"],
225144
"no-confusing-arrow": [
226145
"error",
227146
{
228147
"allowParens": true
229148
}
230149
],
231-
"no-useless-computed-key": [
232-
"error"
233-
],
234-
"no-useless-rename": [
235-
"error"
236-
],
237-
"no-var": [
238-
"error"
239-
],
240-
"object-shorthand": [
241-
"error",
242-
"always"
243-
],
244-
"prefer-arrow-callback": [
245-
"error"
246-
],
247-
"prefer-const": [
248-
"error"
249-
],
250-
"prefer-numeric-literals": [
251-
"error"
252-
],
253-
"prefer-rest-params": [
254-
"error"
255-
],
256-
"prefer-spread": [
257-
"error"
258-
],
259-
"rest-spread-spacing": [
260-
"error",
261-
"never"
262-
],
263-
"template-curly-spacing": [
264-
"error",
265-
"never"
266-
]
150+
"no-useless-computed-key": ["error"],
151+
"no-useless-rename": ["error"],
152+
"no-var": ["error"],
153+
"object-shorthand": ["error", "always"],
154+
"prefer-arrow-callback": ["error"],
155+
"prefer-const": ["error"],
156+
"prefer-numeric-literals": ["error"],
157+
"prefer-rest-params": ["error"],
158+
"prefer-spread": ["error"],
159+
"rest-spread-spacing": ["error", "never"],
160+
"template-curly-spacing": ["error", "never"]
267161
}
268162
}

application/api/auth.1/signIn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
if (!user || !valid) throw new Error('Incorrect login or password');
88
console.log(`Logged user: ${login}`);
99
return { result: 'success', userId: user.id };
10-
}
10+
},
1111
});

application/api/cms.1/.eslintrc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"rules": {
3-
"strict": [
4-
"error",
5-
"never"
6-
]
3+
"strict": ["error", "never"]
74
},
85
"globals": {
96
"application": "readonly",

application/api/cms.1/about.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ async () => [
2424
'programming including C, C++, JavaScript, Rust, Go, Swift, Java,',
2525
'Objective-C, Kotlin, C#, Delphi, Assembler, Python, Haskell, etc.',
2626
'We provide solutions for Unix/Linux, Windows, OSX, Android, Internet',
27-
'solutions and Embedded systems.'
27+
'solutions and Embedded systems.',
2828
];

application/api/example.1/remoteMethod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
method: async ({ ...args }) => {
44
console.debug({ remoteMethod: args });
55
return { result: 'success' };
6-
}
6+
},
77
});

application/api/example.1/wait.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
async ({ delay }) => new Promise(resolve => {
2-
setTimeout(resolve, delay, 'done');
3-
});
1+
async ({ delay }) =>
2+
new Promise((resolve) => {
3+
setTimeout(resolve, delay, 'done');
4+
});

application/api/example.1/webHook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
method: async ({ ...args }) => {
44
console.debug({ webHook: args });
55
return { result: 'success' };
6-
}
6+
},
77
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
({
22
access: 'public',
3-
method: application.introspect
3+
method: application.introspect,
44
});

application/config/.eslintrc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"rules": {
3-
"strict": [
4-
"error",
5-
"never"
6-
]
3+
"strict": ["error", "never"]
74
}
85
}

application/domain/.eslintrc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"rules": {
3-
"strict": [
4-
"error",
5-
"never"
6-
]
3+
"strict": ["error", "never"]
74
},
85
"globals": {
96
"application": "readonly",

0 commit comments

Comments
 (0)