@open-turo/eslint-config-typescript 23.1.7 → 23.1.8
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/index.js
CHANGED
|
@@ -124,6 +124,8 @@ const sonarJsConfig = () =>
|
|
|
124
124
|
eslintConfig.defineConfig({
|
|
125
125
|
extends: [sonarjsPlugin.configs.recommended],
|
|
126
126
|
rules: {
|
|
127
|
+
/** Some of our specs as written trigger on this rule even though they would error as written (e.g. `await findBy*` errors) */
|
|
128
|
+
"sonarjs/assertions-in-tests": "off",
|
|
127
129
|
// Noisy rule - we may have helpers/methods that we mark as @deprecated but aren't planning to remove in the near future. This rule also significantly adds to eslint running time, which slows down both local development and CI.
|
|
128
130
|
"sonarjs/deprecation": "off",
|
|
129
131
|
// 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.
|
|
@@ -132,6 +134,8 @@ const sonarJsConfig = () =>
|
|
|
132
134
|
"sonarjs/no-async-constructor": "off",
|
|
133
135
|
// Performance issues, inconsistent behavior, and primarily catches edge cases rather than common issues
|
|
134
136
|
"sonarjs/no-dead-store": "off",
|
|
137
|
+
/** This rule only triggers in our test suite, and is noisy. */
|
|
138
|
+
"sonarjs/no-floating-point-equality": "off",
|
|
135
139
|
// We may want to catch errors but not use the error object directly, just trigger error handling fallbacks within the catch block.
|
|
136
140
|
"sonarjs/no-ignored-exceptions": "off",
|
|
137
141
|
"sonarjs/no-nested-functions": ["warn", { threshold: 5 }],
|
|
@@ -144,6 +148,8 @@ const sonarJsConfig = () =>
|
|
|
144
148
|
"sonarjs/prefer-optional-chain": "off",
|
|
145
149
|
// 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
|
|
146
150
|
"sonarjs/prefer-read-only-props": "off",
|
|
151
|
+
/** This rule errors on assertions that are already easy to read. It's unnecessary friction. */
|
|
152
|
+
"sonarjs/prefer-specific-assertions": "off",
|
|
147
153
|
// Noisy rule: if we wanted stricter linting of TODOs, we could use unicorn/expiring-todo-comments
|
|
148
154
|
"sonarjs/todo-tag": "off",
|
|
149
155
|
// 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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"@eslint/js": "9.39.4",
|
|
7
7
|
"@typescript-eslint/eslint-plugin": "8.62.1",
|
|
8
8
|
"@typescript-eslint/parser": "8.62.1",
|
|
9
|
-
"@vitest/eslint-plugin": "1.6.
|
|
9
|
+
"@vitest/eslint-plugin": "1.6.21",
|
|
10
10
|
"eslint-config-prettier": "10.1.8",
|
|
11
11
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
12
12
|
"eslint-plugin-import": "2.32.0",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"repository": "https://github.com/open-turo/eslint-config-typescript",
|
|
60
|
-
"version": "23.1.
|
|
60
|
+
"version": "23.1.8",
|
|
61
61
|
"packageManager": "npm@11.18.0"
|
|
62
62
|
}
|
|
@@ -1848,7 +1848,7 @@ exports[`validate config the flat config is correct for index.js 1`] = `
|
|
|
1848
1848
|
},
|
|
1849
1849
|
],
|
|
1850
1850
|
"sonarjs/assertions-in-tests": [
|
|
1851
|
-
|
|
1851
|
+
0,
|
|
1852
1852
|
],
|
|
1853
1853
|
"sonarjs/async-test-assertions": [
|
|
1854
1854
|
2,
|
|
@@ -2257,7 +2257,7 @@ exports[`validate config the flat config is correct for index.js 1`] = `
|
|
|
2257
2257
|
2,
|
|
2258
2258
|
],
|
|
2259
2259
|
"sonarjs/no-floating-point-equality": [
|
|
2260
|
-
|
|
2260
|
+
0,
|
|
2261
2261
|
],
|
|
2262
2262
|
"sonarjs/no-for-in-iterable": [
|
|
2263
2263
|
0,
|
|
@@ -2578,7 +2578,7 @@ exports[`validate config the flat config is correct for index.js 1`] = `
|
|
|
2578
2578
|
2,
|
|
2579
2579
|
],
|
|
2580
2580
|
"sonarjs/prefer-specific-assertions": [
|
|
2581
|
-
|
|
2581
|
+
0,
|
|
2582
2582
|
],
|
|
2583
2583
|
"sonarjs/prefer-type-guard": [
|
|
2584
2584
|
2,
|
|
@@ -5135,7 +5135,7 @@ exports[`validate config the flat config is correct for index.mjs 1`] = `
|
|
|
5135
5135
|
},
|
|
5136
5136
|
],
|
|
5137
5137
|
"sonarjs/assertions-in-tests": [
|
|
5138
|
-
|
|
5138
|
+
0,
|
|
5139
5139
|
],
|
|
5140
5140
|
"sonarjs/async-test-assertions": [
|
|
5141
5141
|
2,
|
|
@@ -5544,7 +5544,7 @@ exports[`validate config the flat config is correct for index.mjs 1`] = `
|
|
|
5544
5544
|
2,
|
|
5545
5545
|
],
|
|
5546
5546
|
"sonarjs/no-floating-point-equality": [
|
|
5547
|
-
|
|
5547
|
+
0,
|
|
5548
5548
|
],
|
|
5549
5549
|
"sonarjs/no-for-in-iterable": [
|
|
5550
5550
|
0,
|
|
@@ -5865,7 +5865,7 @@ exports[`validate config the flat config is correct for index.mjs 1`] = `
|
|
|
5865
5865
|
2,
|
|
5866
5866
|
],
|
|
5867
5867
|
"sonarjs/prefer-specific-assertions": [
|
|
5868
|
-
|
|
5868
|
+
0,
|
|
5869
5869
|
],
|
|
5870
5870
|
"sonarjs/prefer-type-guard": [
|
|
5871
5871
|
2,
|
|
@@ -8422,7 +8422,7 @@ exports[`validate config the flat config with vitest is correct for index.js 1`]
|
|
|
8422
8422
|
},
|
|
8423
8423
|
],
|
|
8424
8424
|
"sonarjs/assertions-in-tests": [
|
|
8425
|
-
|
|
8425
|
+
0,
|
|
8426
8426
|
],
|
|
8427
8427
|
"sonarjs/async-test-assertions": [
|
|
8428
8428
|
2,
|
|
@@ -8831,7 +8831,7 @@ exports[`validate config the flat config with vitest is correct for index.js 1`]
|
|
|
8831
8831
|
2,
|
|
8832
8832
|
],
|
|
8833
8833
|
"sonarjs/no-floating-point-equality": [
|
|
8834
|
-
|
|
8834
|
+
0,
|
|
8835
8835
|
],
|
|
8836
8836
|
"sonarjs/no-for-in-iterable": [
|
|
8837
8837
|
0,
|
|
@@ -9152,7 +9152,7 @@ exports[`validate config the flat config with vitest is correct for index.js 1`]
|
|
|
9152
9152
|
2,
|
|
9153
9153
|
],
|
|
9154
9154
|
"sonarjs/prefer-specific-assertions": [
|
|
9155
|
-
|
|
9155
|
+
0,
|
|
9156
9156
|
],
|
|
9157
9157
|
"sonarjs/prefer-type-guard": [
|
|
9158
9158
|
2,
|
|
@@ -11796,7 +11796,7 @@ exports[`validate config the flat config with vitest is correct for index.mjs 1`
|
|
|
11796
11796
|
},
|
|
11797
11797
|
],
|
|
11798
11798
|
"sonarjs/assertions-in-tests": [
|
|
11799
|
-
|
|
11799
|
+
0,
|
|
11800
11800
|
],
|
|
11801
11801
|
"sonarjs/async-test-assertions": [
|
|
11802
11802
|
2,
|
|
@@ -12205,7 +12205,7 @@ exports[`validate config the flat config with vitest is correct for index.mjs 1`
|
|
|
12205
12205
|
2,
|
|
12206
12206
|
],
|
|
12207
12207
|
"sonarjs/no-floating-point-equality": [
|
|
12208
|
-
|
|
12208
|
+
0,
|
|
12209
12209
|
],
|
|
12210
12210
|
"sonarjs/no-for-in-iterable": [
|
|
12211
12211
|
0,
|
|
@@ -12526,7 +12526,7 @@ exports[`validate config the flat config with vitest is correct for index.mjs 1`
|
|
|
12526
12526
|
2,
|
|
12527
12527
|
],
|
|
12528
12528
|
"sonarjs/prefer-specific-assertions": [
|
|
12529
|
-
|
|
12529
|
+
0,
|
|
12530
12530
|
],
|
|
12531
12531
|
"sonarjs/prefer-type-guard": [
|
|
12532
12532
|
2,
|
|
Binary file
|