eslint-config-beslogic 2.4.6 → 2.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/javascript.js +0 -6
- package/package.json +1 -1
- package/typescript.js +6 -0
package/CHANGELOG.md
CHANGED
package/javascript.js
CHANGED
|
@@ -31,12 +31,6 @@ const noRestrictedSyntax = [
|
|
|
31
31
|
"message":
|
|
32
32
|
"Prefer `Promise.resolve().then()` instead of `setTimeout` without a specified delay. " +
|
|
33
33
|
"See: https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#reasons_for_delays_longer_than_specified and https://angular.io/guide/change-detection-zone-pollution"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"selector":
|
|
37
|
-
"ArrowFunctionExpression[body.body.length=1][body.body.0.type=\"ExpressionStatement\"]:not([returnType.typeAnnotation.type=\"TSVoidKeyword\"])",
|
|
38
|
-
"message": "Consider removing braces around the arrow function's body. " +
|
|
39
|
-
"If it really needs to return `void` you can mark its return type explicitely with `(param): void => { statement }` to disable this warning."
|
|
40
34
|
}
|
|
41
35
|
]
|
|
42
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-beslogic",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.7",
|
|
4
4
|
"description": "ESLint rules, plugins and configs used at Beslogic",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"// dependencies": "Run for ourselves when we install dependencies w/o running npm i afterward",
|
package/typescript.js
CHANGED
|
@@ -12,6 +12,12 @@ const hasTotalFunctions = !!resolveModuleLocation("eslint-plugin-total-functions
|
|
|
12
12
|
const commaDangleDefault = "always-multiline"
|
|
13
13
|
const noRestrictedSyntax = [
|
|
14
14
|
...javascriptConfig.rules?.["no-restricted-syntax"] ?? {},
|
|
15
|
+
{
|
|
16
|
+
"selector":
|
|
17
|
+
"ArrowFunctionExpression[body.body.length=1][body.body.0.type=\"ExpressionStatement\"]:not([returnType.typeAnnotation.type=\"TSVoidKeyword\"])",
|
|
18
|
+
"message": "Consider removing braces around the arrow function's body. " +
|
|
19
|
+
"If it really needs to return `void` you can mark its return type explicitely with `(param): void => { statement }` to disable this warning."
|
|
20
|
+
},
|
|
15
21
|
// @typescript-eslint won't make this a rule
|
|
16
22
|
// https://github.com/typescript-eslint/typescript-eslint/issues/4247
|
|
17
23
|
{
|