@open-turo/eslint-config-typescript 11.0.6 → 12.0.0
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/.pre-commit-config.yaml +1 -1
- package/docs/breaking-changes/v12.md +27 -0
- package/index.js +3 -3
- package/legacy.js +3 -3
- package/pack/open-turo-eslint-config-typescript-12.0.0.tgz +0 -0
- package/package.json +7 -7
- package/test/__snapshots__/test.spec.js.snap +2378 -0
- package/test/sample.ts +0 -0
- package/{test.js → test/test.spec.js} +10 -1
- package/pack/open-turo-eslint-config-typescript-11.0.6.tgz +0 -0
package/.pre-commit-config.yaml
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Breaking changes in v12
|
|
2
|
+
|
|
3
|
+
Several rules from `eslint-plugin-sonarjs` have changed their name. If you were reconfiguring some of them in your eslint
|
|
4
|
+
config you might have to update them to their new name.
|
|
5
|
+
|
|
6
|
+
The affected rules are the following:
|
|
7
|
+
|
|
8
|
+
- `sonarjs/sonar-block-scoped-var`
|
|
9
|
+
- `sonarjs/sonar-jsx-no-leaked-render`
|
|
10
|
+
- `sonarjs/sonar-max-lines`
|
|
11
|
+
- `sonarjs/sonar-max-lines-per-function`
|
|
12
|
+
- `sonarjs/sonar-max-params`
|
|
13
|
+
- `sonarjs/sonar-no-control-regex`
|
|
14
|
+
- `sonarjs/sonar-no-dupe-keys`
|
|
15
|
+
- `sonarjs/sonar-no-empty-character-class`
|
|
16
|
+
- `sonarjs/sonar-no-fallthrough`
|
|
17
|
+
- `sonarjs/sonar-no-invalid-regexp`
|
|
18
|
+
- `sonarjs/sonar-no-magic-numbers`
|
|
19
|
+
- `sonarjs/sonar-no-misleading-character-class`
|
|
20
|
+
- `sonarjs/sonar-no-regex-spaces`
|
|
21
|
+
- `sonarjs/sonar-no-unused-class-component-methods`
|
|
22
|
+
- `sonarjs/sonar-no-unused-vars`
|
|
23
|
+
- `sonarjs/sonar-prefer-optional-chain`
|
|
24
|
+
- `sonarjs/sonar-prefer-read-only-props`
|
|
25
|
+
|
|
26
|
+
See more details in https://community.sonarsource.com/t/eslint-plugin-sonarjs-prepending-rules-with-sonar-is-redundant-and-inconsistant/127330
|
|
27
|
+
and https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/CHANGELOG.md#2024-12-02-version-300.
|
package/index.js
CHANGED
|
@@ -83,11 +83,11 @@ module.exports = {
|
|
|
83
83
|
// Overlaps with @typescript-eslint/prefer-nullish-coalescing
|
|
84
84
|
"sonarjs/prefer-nullish-coalescing": "off",
|
|
85
85
|
// Overlaps with @typescript-eslint/no-unused-vars
|
|
86
|
-
"sonarjs/
|
|
86
|
+
"sonarjs/no-unused-vars": "off",
|
|
87
87
|
// Overlaps with @typescript-eslint/prefer-optional-chain
|
|
88
|
-
"sonarjs/
|
|
88
|
+
"sonarjs/prefer-optional-chain": "off",
|
|
89
89
|
// Useful for guarding against prop mutation in React, but too much of a lift as very rarely do we apply readonly/ReadonlyArray<T> to type definitions
|
|
90
|
-
"sonarjs/
|
|
90
|
+
"sonarjs/prefer-read-only-props": "off",
|
|
91
91
|
// Noisy rule: if we wanted stricter linting of TODOs, we could use unicorn/expiring-todo-comments
|
|
92
92
|
"sonarjs/todo-tag": "off",
|
|
93
93
|
// A useful rule to consider for libraries to better document (and export) type definitions, but noisy in app usages (especially around redux type definitions)
|
package/legacy.js
CHANGED
|
@@ -83,11 +83,11 @@ module.exports = {
|
|
|
83
83
|
// Overlaps with @typescript-eslint/prefer-nullish-coalescing
|
|
84
84
|
"sonarjs/prefer-nullish-coalescing": "off",
|
|
85
85
|
// Overlaps with @typescript-eslint/no-unused-vars
|
|
86
|
-
"sonarjs/
|
|
86
|
+
"sonarjs/no-unused-vars": "off",
|
|
87
87
|
// Overlaps with @typescript-eslint/prefer-optional-chain
|
|
88
|
-
"sonarjs/
|
|
88
|
+
"sonarjs/prefer-optional-chain": "off",
|
|
89
89
|
// Useful for guarding against prop mutation in React, but too much of a lift as very rarely do we apply readonly/ReadonlyArray<T> to type definitions
|
|
90
|
-
"sonarjs/
|
|
90
|
+
"sonarjs/prefer-read-only-props": "off",
|
|
91
91
|
// Noisy rule: if we wanted stricter linting of TODOs, we could use unicorn/expiring-todo-comments
|
|
92
92
|
"sonarjs/todo-tag": "off",
|
|
93
93
|
// A useful rule to consider for libraries to better document (and export) type definitions, but noisy in app usages (especially around redux type definitions)
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"author": "Turo engineering",
|
|
3
3
|
"description": "Turo eslint configuration for typescript",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
6
|
-
"@typescript-eslint/parser": "8.
|
|
5
|
+
"@typescript-eslint/eslint-plugin": "8.17.0",
|
|
6
|
+
"@typescript-eslint/parser": "8.17.0",
|
|
7
7
|
"eslint-config-prettier": "9.1.0",
|
|
8
|
-
"eslint-import-resolver-typescript": "3.
|
|
8
|
+
"eslint-import-resolver-typescript": "3.7.0",
|
|
9
9
|
"eslint-plugin-import": "2.31.0",
|
|
10
10
|
"eslint-plugin-jest": "28.9.0",
|
|
11
11
|
"eslint-plugin-json": "4.0.1",
|
|
12
12
|
"eslint-plugin-node": "11.1.0",
|
|
13
13
|
"eslint-plugin-prettier": "5.2.1",
|
|
14
14
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
15
|
-
"eslint-plugin-sonarjs": "
|
|
15
|
+
"eslint-plugin-sonarjs": "3.0.0",
|
|
16
16
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
17
17
|
"eslint-plugin-typescript-sort-keys": "3.3.0",
|
|
18
18
|
"eslint-plugin-unicorn": "56.0.1"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"eslint": "8.57.1",
|
|
22
22
|
"jest": "29.7.0",
|
|
23
|
-
"prettier": "3.
|
|
23
|
+
"prettier": "3.4.2"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">= 14"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "echo noop",
|
|
34
34
|
"lint": "echo noop",
|
|
35
|
-
"test": "jest test.js"
|
|
35
|
+
"test": "jest ./test/test.spec.js"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"eslint": "^8.18.0",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"repository": "https://github.com/open-turo/eslint-config-typescript",
|
|
45
|
-
"version": "
|
|
45
|
+
"version": "12.0.0"
|
|
46
46
|
}
|