eslint-config-functype 2.123.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
- Extension point for test files (`*.test.ts`, `*.spec.ts`, `test/**`, `tests/**`, `__tests__/**`).
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,7 +2,10 @@
2
2
  declare const _default: {
3
3
  name: string;
4
4
  files: string[];
5
- rules: {};
5
+ rules: {
6
+ "@typescript-eslint/require-await": string;
7
+ "@typescript-eslint/no-unnecessary-condition": string;
8
+ };
6
9
  };
7
10
  //#endregion
8
11
  export { _default as default };
@@ -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.ts\", \"**/*.spec.ts\", \"**/test/**\", \"**/tests/**\", \"**/__tests__/**\"],\n rules: {},\n}\n"],"mappings":";AAAA,IAAA,yBAAe;CACb,MAAM;CACN,OAAO;EAAC;EAAgB;EAAgB;EAAc;EAAe;CAAiB;CACtF,OAAO,CAAC;AACV"}
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-functype",
3
- "version": "2.123.0",
3
+ "version": "2.124.0",
4
4
  "type": "module",
5
5
  "description": "Curated ESLint flat config bundle for functional TypeScript programming (ESLint 9.x+)",
6
6
  "main": "dist/index.js",