eslint-config-functype 2.122.0 → 2.124.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/README.md
CHANGED
|
@@ -46,7 +46,12 @@ Everything in `recommended` plus:
|
|
|
46
46
|
|
|
47
47
|
### `test-overrides`
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
For test files (`*.test.ts`, `*.spec.ts` and their `.tsx`, `.mts`, `.cts` forms, `test/**`, `tests/**`, `__tests__/**`). Put it after `recommended` or `strict`, so it wins. It turns off the two rules that misread a test's shape:
|
|
50
|
+
|
|
51
|
+
- `@typescript-eslint/require-await`: tests stub async contracts with async functions that never await.
|
|
52
|
+
- `@typescript-eslint/no-unnecessary-condition`: tests probe values the types say are present, with `?.` and `??` in assertions.
|
|
53
|
+
|
|
54
|
+
It changes nothing else. `eslint-plugin-functype` has a `tests` config for its own rules.
|
|
50
55
|
|
|
51
56
|
## Pairing with eslint-plugin-functype
|
|
52
57
|
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
var test_overrides_default = {
|
|
3
3
|
name: "functype/test-overrides",
|
|
4
4
|
files: [
|
|
5
|
-
"**/*.test.ts",
|
|
6
|
-
"**/*.spec.ts",
|
|
5
|
+
"**/*.{test,spec}.{ts,tsx,mts,cts}",
|
|
7
6
|
"**/test/**",
|
|
8
7
|
"**/tests/**",
|
|
9
8
|
"**/__tests__/**"
|
|
10
9
|
],
|
|
11
|
-
rules: {
|
|
10
|
+
rules: {
|
|
11
|
+
"@typescript-eslint/require-await": "off",
|
|
12
|
+
"@typescript-eslint/no-unnecessary-condition": "off"
|
|
13
|
+
}
|
|
12
14
|
};
|
|
13
15
|
//#endregion
|
|
14
16
|
export { test_overrides_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-overrides.js","names":[],"sources":["../../src/configs/test-overrides.ts"],"sourcesContent":["export default {\n name: \"functype/test-overrides\",\n files: [\"**/*.test
|
|
1
|
+
{"version":3,"file":"test-overrides.js","names":[],"sources":["../../src/configs/test-overrides.ts"],"sourcesContent":["export default {\n name: \"functype/test-overrides\",\n files: [\"**/*.{test,spec}.{ts,tsx,mts,cts}\", \"**/test/**\", \"**/tests/**\", \"**/__tests__/**\"],\n rules: {\n // Tests stub async contracts with async functions that never await.\n \"@typescript-eslint/require-await\": \"off\",\n // Tests probe values the types say are present: `?.` and `??` in assertions.\n \"@typescript-eslint/no-unnecessary-condition\": \"off\",\n },\n}\n"],"mappings":";AAAA,IAAA,yBAAe;CACb,MAAM;CACN,OAAO;EAAC;EAAqC;EAAc;EAAe;CAAiB;CAC3F,OAAO;EAEL,oCAAoC;EAEpC,+CAA+C;CACjD;AACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -102,7 +102,10 @@ declare const plugin: {
|
|
|
102
102
|
testOverrides: {
|
|
103
103
|
name: string;
|
|
104
104
|
files: string[];
|
|
105
|
-
rules: {
|
|
105
|
+
rules: {
|
|
106
|
+
"@typescript-eslint/require-await": string;
|
|
107
|
+
"@typescript-eslint/no-unnecessary-condition": string;
|
|
108
|
+
};
|
|
106
109
|
};
|
|
107
110
|
};
|
|
108
111
|
meta: {
|