eslint-config-beslogic 2.3.0 → 2.3.2
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/.gitignore.npmignore +1 -0
- package/CHANGELOG.md +13 -1
- package/angular.js +22 -1
- package/javascript.js +3 -1
- package/package.json +9 -1
- package/storybook.js +1 -1
- package/typescript.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
static-tests
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 2.3.2
|
|
4
|
+
|
|
5
|
+
- Added "data-service", "interceptor" and "guard" as valid suffix for `angular-file-naming/service-filename-suffix`.
|
|
6
|
+
|
|
7
|
+
## 2.3.1
|
|
8
|
+
|
|
9
|
+
- Fixed the following error when parsing `typescript` config:
|
|
10
|
+
`Configuration for rule "@typescript-eslint/prefer-string-starts-ends-with" is invalid: Value true should be string.`
|
|
11
|
+
- Added `no-restricted-syntax` rules to ensure that Angular optional dependencies are marked as optional in TypeScript and vice-versa
|
|
12
|
+
- Fixed Storybook custom `.ts` configuration not being applied
|
|
13
|
+
- Disabled `autofix/indent-legacy`
|
|
14
|
+
|
|
15
|
+
<!-- TODO: Validate that static-tests are not published -->
|
|
4
16
|
|
|
5
17
|
## 2.3.0
|
|
6
18
|
|
package/angular.js
CHANGED
|
@@ -31,6 +31,17 @@ const noRestrictedSyntax = [
|
|
|
31
31
|
"message":
|
|
32
32
|
"Forbidden non-null property assertion. https://typescript-eslint.io/rules/no-non-null-assertion . " +
|
|
33
33
|
"This is only allowed on required component @Input({ required:true }). https://angular.io/api/core/Input#required"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"selector":
|
|
37
|
+
"MethodDefinition[key.name=\"constructor\"]:has(TSParameterProperty:has(Decorator[expression.callee.name=\"Optional\"]):not(:has(Identifier[optional=true])))",
|
|
38
|
+
"message":
|
|
39
|
+
"Constructor parameter with @Optional decorator should be marked as optional using `?`."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"selector":
|
|
43
|
+
"ClassDeclaration:has(Decorator :matches([name=\"Component\"], [name=\"Injectable\"], [name=\"Directive\"], [name=\"Pipe\"])) MethodDefinition[key.name=\"constructor\"]:has(TSParameterProperty:has(Identifier[optional=true]):not(:has(Decorator[expression.callee.name=\"Optional\"])))",
|
|
44
|
+
"message": "Optional constructor parameter should have @Optional decorator."
|
|
34
45
|
}
|
|
35
46
|
]
|
|
36
47
|
|
|
@@ -191,7 +202,17 @@ module.exports = {
|
|
|
191
202
|
"angular-file-naming/directive-filename-suffix": "error",
|
|
192
203
|
"angular-file-naming/module-filename-suffix": "error",
|
|
193
204
|
"angular-file-naming/pipe-filename-suffix": "error",
|
|
194
|
-
"angular-file-naming/service-filename-suffix":
|
|
205
|
+
"angular-file-naming/service-filename-suffix": [
|
|
206
|
+
"error",
|
|
207
|
+
{
|
|
208
|
+
"suffixes": [
|
|
209
|
+
"service",
|
|
210
|
+
"data-service",
|
|
211
|
+
"interceptor",
|
|
212
|
+
"guard"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
],
|
|
195
216
|
|
|
196
217
|
/*
|
|
197
218
|
* rxjs-angular rules
|
package/javascript.js
CHANGED
|
@@ -90,7 +90,6 @@ module.exports = {
|
|
|
90
90
|
"ignorePatterns": ["node_modules/"],
|
|
91
91
|
// Useful when using experimental features and code transpiled by Babel
|
|
92
92
|
"parser": "@babel/eslint-parser",
|
|
93
|
-
"reportUnusedDisableDirectives": true,
|
|
94
93
|
"overrides": [
|
|
95
94
|
{
|
|
96
95
|
"files": [
|
|
@@ -301,6 +300,9 @@ module.exports = {
|
|
|
301
300
|
}
|
|
302
301
|
],
|
|
303
302
|
|
|
303
|
+
// indent-legacy is deprecated in favor of indent
|
|
304
|
+
"autofix/indent-legacy": "off",
|
|
305
|
+
|
|
304
306
|
// Using simple-import-sort instead
|
|
305
307
|
"autofix/sort-imports": "off",
|
|
306
308
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-beslogic",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
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",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"lint:fix": "node ./node_modules/dprint/bin fmt && npm run eslint -- --fix",
|
|
11
11
|
"upgrade": "npx npm-check-updates -u & npm i",
|
|
12
12
|
"yalc": "yalc publish",
|
|
13
|
+
"prepack": "type .gitignore* > .npmignore",
|
|
13
14
|
"postinstall": "node ./lib/patch-dependencies.js",
|
|
14
15
|
"dependencies": "node ./lib/patch-dependencies.js"
|
|
15
16
|
},
|
|
@@ -81,10 +82,17 @@
|
|
|
81
82
|
"eslint-plugin-testing-library": "^6.0",
|
|
82
83
|
"eslint-plugin-total-functions": ">=6.0"
|
|
83
84
|
},
|
|
85
|
+
"// plugins": "Test against highest supported version to catch new breaking changes",
|
|
84
86
|
"devDependencies": {
|
|
87
|
+
"@angular-eslint/eslint-plugin": ">=16.2",
|
|
88
|
+
"@angular-eslint/eslint-plugin-template": ">=16.2",
|
|
89
|
+
"@angular-eslint/template-parser": ">=16.2",
|
|
90
|
+
"@angular/core": ">=16.2",
|
|
85
91
|
"@types/eslint": "^8.37.0",
|
|
86
92
|
"@types/node": "^17.0",
|
|
87
93
|
"eslint-plugin-eslint-plugin": "^4.1",
|
|
94
|
+
"eslint-plugin-storybook": "^0.6.10",
|
|
95
|
+
"eslint-plugin-total-functions": ">=6.0",
|
|
88
96
|
"yalc": "^1.0.0-pre.53"
|
|
89
97
|
}
|
|
90
98
|
}
|
package/storybook.js
CHANGED
package/typescript.js
CHANGED
|
@@ -398,7 +398,7 @@ module.exports = {
|
|
|
398
398
|
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
399
399
|
"@typescript-eslint/prefer-string-starts-ends-with": [
|
|
400
400
|
"error",
|
|
401
|
-
{ "allowSingleElementEquality":
|
|
401
|
+
{ "allowSingleElementEquality": "always" }
|
|
402
402
|
],
|
|
403
403
|
"@typescript-eslint/promise-function-async": [
|
|
404
404
|
"error",
|