@open-turo/eslint-config-typescript 9.0.16 → 9.0.18
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
repos:
|
|
2
2
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
-
rev:
|
|
3
|
+
rev: v5.0.0
|
|
4
4
|
hooks:
|
|
5
5
|
- id: check-json
|
|
6
6
|
- id: check-yaml
|
|
@@ -18,6 +18,6 @@ repos:
|
|
|
18
18
|
stages: [commit-msg]
|
|
19
19
|
additional_dependencies: ["@open-turo/commitlint-config-conventional"]
|
|
20
20
|
- repo: https://github.com/rhysd/actionlint
|
|
21
|
-
rev: v1.7.
|
|
21
|
+
rev: v1.7.3
|
|
22
22
|
hooks:
|
|
23
23
|
- id: actionlint
|
package/index.js
CHANGED
|
@@ -72,22 +72,22 @@ module.exports = {
|
|
|
72
72
|
"simple-import-sort/imports": "error",
|
|
73
73
|
"simple-import-sort/exports": "error",
|
|
74
74
|
"sort-destructure-keys/sort-destructure-keys": "error",
|
|
75
|
-
|
|
76
|
-
* List of sonarjs rules we turned off after release of eslint-plugin-sonarjs v2
|
|
77
|
-
* Some rules are too restrictive for common use cases,
|
|
78
|
-
* and others are already covered by other plugins used here.
|
|
79
|
-
*/
|
|
80
|
-
"sonarjs/different-types-comparison": "off",
|
|
75
|
+
// This rule is not helpful in TypeScript files, and in JavaScript we often return different types from functions, so this is not a strictness level we want to enforce.
|
|
81
76
|
"sonarjs/function-return-type": "off",
|
|
82
|
-
|
|
77
|
+
// We may want to catch errors but not use the error object directly, just trigger error handling fallbacks within the catch block.
|
|
83
78
|
"sonarjs/no-ignored-exceptions": "off",
|
|
84
|
-
"sonarjs/no-
|
|
85
|
-
|
|
79
|
+
"sonarjs/no-nested-functions": ["warn", { threshold: 5 }],
|
|
80
|
+
// Overlaps with @typescript-eslint/prefer-nullish-coalescing
|
|
86
81
|
"sonarjs/prefer-nullish-coalescing": "off",
|
|
82
|
+
// Overlaps with @typescript-eslint/no-unused-vars
|
|
87
83
|
"sonarjs/sonar-no-unused-vars": "off",
|
|
84
|
+
// Overlaps with @typescript-eslint/prefer-optional-chain
|
|
88
85
|
"sonarjs/sonar-prefer-optional-chain": "off",
|
|
86
|
+
// 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
|
|
89
87
|
"sonarjs/sonar-prefer-read-only-props": "off",
|
|
88
|
+
// Noisy rule: if we wanted stricter linting of TODOs, we could use unicorn/expiring-todo-comments
|
|
90
89
|
"sonarjs/todo-tag": "off",
|
|
90
|
+
// A useful rule to consider for libraries to better document (and export) type definitions, but noisy in app usages (especially around redux type definitions)
|
|
91
91
|
"sonarjs/use-type-alias": "off",
|
|
92
92
|
/**
|
|
93
93
|
* {@link https://typescript-eslint.io/rules/consistent-type-imports | TypeScript ESLint: consistent-type-imports docs}
|
package/legacy.js
CHANGED
|
@@ -73,22 +73,22 @@ module.exports = {
|
|
|
73
73
|
"simple-import-sort/imports": "error",
|
|
74
74
|
"simple-import-sort/exports": "error",
|
|
75
75
|
"sort-destructure-keys/sort-destructure-keys": "error",
|
|
76
|
-
|
|
77
|
-
* List of sonarjs rules we turned off after release of eslint-plugin-sonarjs v2
|
|
78
|
-
* Some rules are too restrictive for common use cases,
|
|
79
|
-
* and others are already covered by other plugins used here.
|
|
80
|
-
*/
|
|
81
|
-
"sonarjs/different-types-comparison": "off",
|
|
76
|
+
// This rule is not helpful in TypeScript files, and in JavaScript we often return different types from functions, so this is not a strictness level we want to enforce.
|
|
82
77
|
"sonarjs/function-return-type": "off",
|
|
83
|
-
|
|
78
|
+
// We may want to catch errors but not use the error object directly, just trigger error handling fallbacks within the catch block.
|
|
84
79
|
"sonarjs/no-ignored-exceptions": "off",
|
|
85
|
-
"sonarjs/no-
|
|
86
|
-
|
|
80
|
+
"sonarjs/no-nested-functions": ["warn", { threshold: 5 }],
|
|
81
|
+
// Overlaps with @typescript-eslint/prefer-nullish-coalescing
|
|
87
82
|
"sonarjs/prefer-nullish-coalescing": "off",
|
|
83
|
+
// Overlaps with @typescript-eslint/no-unused-vars
|
|
88
84
|
"sonarjs/sonar-no-unused-vars": "off",
|
|
85
|
+
// Overlaps with @typescript-eslint/prefer-optional-chain
|
|
89
86
|
"sonarjs/sonar-prefer-optional-chain": "off",
|
|
87
|
+
// 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
88
|
"sonarjs/sonar-prefer-read-only-props": "off",
|
|
89
|
+
// Noisy rule: if we wanted stricter linting of TODOs, we could use unicorn/expiring-todo-comments
|
|
91
90
|
"sonarjs/todo-tag": "off",
|
|
91
|
+
// A useful rule to consider for libraries to better document (and export) type definitions, but noisy in app usages (especially around redux type definitions)
|
|
92
92
|
"sonarjs/use-type-alias": "off",
|
|
93
93
|
"@typescript-eslint/no-unused-vars": [
|
|
94
94
|
"error",
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"eslint-plugin-sonarjs": "2.0.2",
|
|
16
16
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
17
17
|
"eslint-plugin-typescript-sort-keys": "3.2.0",
|
|
18
|
-
"eslint-plugin-unicorn": "
|
|
18
|
+
"eslint-plugin-unicorn": "56.0.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"eslint": "8.57.
|
|
21
|
+
"eslint": "8.57.1",
|
|
22
22
|
"jest": "29.7.0",
|
|
23
23
|
"prettier": "3.3.3"
|
|
24
24
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"repository": "https://github.com/open-turo/eslint-config-typescript",
|
|
45
|
-
"version": "9.0.
|
|
45
|
+
"version": "9.0.18"
|
|
46
46
|
}
|
|
Binary file
|