eslint-plugin-functype 2.123.0 → 2.124.1
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 +3 -1
- package/dist/configs/tests.d.ts +12 -0
- package/dist/configs/tests.js +2 -0
- package/dist/configs/tests.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -532,9 +532,11 @@ import recommended from "eslint-config-functype/recommended"
|
|
|
532
532
|
import testOverrides from "eslint-config-functype/test-overrides"
|
|
533
533
|
import functype from "eslint-plugin-functype"
|
|
534
534
|
|
|
535
|
-
export default [recommended, functype.configs.recommended, testOverrides]
|
|
535
|
+
export default [recommended, functype.configs.recommended, testOverrides, functype.configs.tests]
|
|
536
536
|
```
|
|
537
537
|
|
|
538
|
+
`functype.configs.tests` turns off `prefer-option`, `prefer-either` and `prefer-try` for the same test files as `test-overrides`: tests call plain `T | undefined` APIs and assert on thrown errors. It changes no other rule. `no-let` and `no-imperative-loops` already skip test files themselves, unless you set their `allowInTests: false`. Put both after the recommended configs, so they win.
|
|
539
|
+
|
|
538
540
|
## License
|
|
539
541
|
|
|
540
542
|
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/configs/tests.d.ts
|
|
2
|
+
/** The same files as eslint-config-functype's `test-overrides`. A test in tests/configs.test.ts keeps the two equal. */
|
|
3
|
+
export declare const testFiles: string[];
|
|
4
|
+
/** Tests call plain `T | undefined` APIs and assert on thrown errors. */
|
|
5
|
+
declare const _default: {
|
|
6
|
+
"functype/prefer-option": string;
|
|
7
|
+
"functype/prefer-either": string;
|
|
8
|
+
"functype/prefer-try": string;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { _default as default };
|
|
12
|
+
//# sourceMappingURL=tests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests.js","names":["testFiles","tests_default"],"sources":["../../src/configs/tests.ts"],"sourcesContent":["/** The same files as eslint-config-functype's `test-overrides`. A test in tests/configs.test.ts keeps the two equal. */\nexport const testFiles = [\"**/*.{test,spec}.{ts,tsx,mts,cts}\", \"**/test/**\", \"**/tests/**\", \"**/__tests__/**\"]\n\n/** Tests call plain `T | undefined` APIs and assert on thrown errors. */\nexport default {\n \"functype/prefer-option\": \"off\",\n \"functype/prefer-either\": \"off\",\n \"functype/prefer-try\": \"off\",\n}\n"],"mappings":"AACA,MAAaA,EAAY,CAAC,oCAAqC,aAAc,cAAe,iBAAiB,EAG7G,IAAAC,EAAe,CACb,yBAA0B,MAC1B,yBAA0B,MAC1B,sBAAuB,KACzB"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"./configs/recommended.js";import t from"./configs/strict.js";import n from"./configs/agent.js";import r from"./rules/index.js";const
|
|
1
|
+
import e from"./configs/recommended.js";import t from"./configs/strict.js";import n from"./configs/agent.js";import r,{testFiles as i}from"./configs/tests.js";import a from"./rules/index.js";const o={rules:a,meta:{name:`eslint-plugin-functype`,version:`2.0.0`},configs:{}};o.configs={recommended:{name:`functype-plugin/recommended`,plugins:{functype:o},rules:e},strict:{name:`functype-plugin/strict`,plugins:{functype:o},rules:t},agent:{name:`functype-plugin/agent`,plugins:{functype:o},rules:n},tests:{name:`functype-plugin/tests`,plugins:{functype:o},files:i,rules:r}};export{o as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["recommendedRules","strictRules","agentRules","rules_default","plugin"],"sources":["../src/index.ts"],"sourcesContent":["import agentRules from \"./configs/agent\"\nimport recommendedRules from \"./configs/recommended\"\nimport strictRules from \"./configs/strict\"\nimport rules from \"./rules\"\n\nconst plugin = {\n rules,\n meta: {\n name: \"eslint-plugin-functype\",\n version: \"2.0.0\",\n },\n configs: {} as Record<string, unknown>,\n}\n\n// Self-referencing plugin in configs (ESLint flat config pattern)\nplugin.configs = {\n recommended: {\n name: \"functype-plugin/recommended\",\n plugins: { functype: plugin },\n rules: recommendedRules,\n },\n strict: {\n name: \"functype-plugin/strict\",\n plugins: { functype: plugin },\n rules: strictRules,\n },\n agent: {\n name: \"functype-plugin/agent\",\n plugins: { functype: plugin },\n rules: agentRules,\n },\n}\n\nexport default plugin\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["testRules","recommendedRules","strictRules","agentRules","tests_default","rules_default","plugin","testFiles"],"sources":["../src/index.ts"],"sourcesContent":["import agentRules from \"./configs/agent\"\nimport recommendedRules from \"./configs/recommended\"\nimport strictRules from \"./configs/strict\"\nimport testRules, { testFiles } from \"./configs/tests\"\nimport rules from \"./rules\"\n\nconst plugin = {\n rules,\n meta: {\n name: \"eslint-plugin-functype\",\n version: \"2.0.0\",\n },\n configs: {} as Record<string, unknown>,\n}\n\n// Self-referencing plugin in configs (ESLint flat config pattern)\nplugin.configs = {\n recommended: {\n name: \"functype-plugin/recommended\",\n plugins: { functype: plugin },\n rules: recommendedRules,\n },\n strict: {\n name: \"functype-plugin/strict\",\n plugins: { functype: plugin },\n rules: strictRules,\n },\n agent: {\n name: \"functype-plugin/agent\",\n plugins: { functype: plugin },\n rules: agentRules,\n },\n tests: {\n name: \"functype-plugin/tests\",\n plugins: { functype: plugin },\n files: testFiles,\n rules: testRules,\n },\n}\n\nexport default plugin\n"],"mappings":"+LAMA,MAAMM,EAAS,CACb,MAAAD,EACA,KAAM,CACJ,KAAM,yBACN,QAAS,OACX,EACA,QAAS,CAAC,CACZ,EAGA,EAAO,QAAU,CACf,YAAa,CACX,KAAM,8BACN,QAAS,CAAE,SAAUC,CAAO,EAC5B,MAAOL,CACT,EACA,OAAQ,CACN,KAAM,yBACN,QAAS,CAAE,SAAUK,CAAO,EAC5B,MAAOJ,CACT,EACA,MAAO,CACL,KAAM,wBACN,QAAS,CAAE,SAAUI,CAAO,EAC5B,MAAOH,CACT,EACA,MAAO,CACL,KAAM,wBACN,QAAS,CAAE,SAAUG,CAAO,EAC5B,MAAOC,EACP,MAAOP,CACT,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-functype",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.124.1",
|
|
4
4
|
"description": "Custom ESLint rules for functional TypeScript programming with functype library patterns including Do notation (ESLint 10+)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/node": "^24.19.1",
|
|
43
43
|
"@typescript-eslint/rule-tester": "^8.71.0",
|
|
44
44
|
"eslint-config-prettier": "^10.1.8",
|
|
45
|
-
"functype": "^1.
|
|
45
|
+
"functype": "^1.24.1",
|
|
46
46
|
"ts-builds": "^3.4.3",
|
|
47
47
|
"tsdown": "^0.23.0"
|
|
48
48
|
},
|