eslint-plugin-functype 1.0.0 → 1.1.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/dist/configs/recommended.d.ts +8 -2
- package/dist/configs/recommended.js +16 -11
- package/dist/configs/strict.d.ts +8 -2
- package/dist/configs/strict.js +2 -0
- package/dist/index.d.ts +20 -4
- package/dist/index.js +6 -0
- package/package.json +11 -5
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
extends: string[];
|
|
2
|
+
name: string;
|
|
4
3
|
rules: {
|
|
5
4
|
"prefer-const": string;
|
|
6
5
|
"no-var": string;
|
|
@@ -18,6 +17,13 @@ declare const _default: {
|
|
|
18
17
|
"functional/no-conditional-statements": string;
|
|
19
18
|
"functional/no-expression-statements": string;
|
|
20
19
|
"functional/no-return-void": string;
|
|
20
|
+
"prettier/prettier": (string | {
|
|
21
|
+
usePrettierrc?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
usePrettierrc: boolean;
|
|
24
|
+
})[];
|
|
25
|
+
"simple-import-sort/imports": string;
|
|
26
|
+
"simple-import-sort/exports": string;
|
|
21
27
|
};
|
|
22
28
|
};
|
|
23
29
|
export default _default;
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//
|
|
3
|
+
// ESLint 9.x Flat Config Format
|
|
4
|
+
// Complete functional TypeScript config with formatting and import organization
|
|
4
5
|
exports.default = {
|
|
5
|
-
|
|
6
|
-
"@typescript-eslint",
|
|
7
|
-
"functional"
|
|
8
|
-
],
|
|
9
|
-
extends: [
|
|
10
|
-
"eslint:recommended",
|
|
11
|
-
"@typescript-eslint/recommended"
|
|
12
|
-
],
|
|
6
|
+
name: "functype/recommended",
|
|
13
7
|
rules: {
|
|
14
8
|
// Core JavaScript immutability
|
|
15
9
|
"prefer-const": "error",
|
|
16
10
|
"no-var": "error",
|
|
17
|
-
// TypeScript functional patterns
|
|
11
|
+
// TypeScript functional patterns (when @typescript-eslint is available)
|
|
18
12
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
19
13
|
"@typescript-eslint/no-explicit-any": "error",
|
|
20
14
|
"@typescript-eslint/no-unused-vars": [
|
|
21
15
|
"error",
|
|
22
16
|
{ argsIgnorePattern: "^_" }
|
|
23
17
|
],
|
|
24
|
-
// Functional programming rules
|
|
18
|
+
// Functional programming rules (when eslint-plugin-functional is available)
|
|
25
19
|
"functional/no-let": "error",
|
|
26
20
|
"functional/immutable-data": "warn",
|
|
27
21
|
"functional/no-loop-statements": "off", // Start disabled, can enable later
|
|
@@ -32,5 +26,16 @@ exports.default = {
|
|
|
32
26
|
"functional/no-conditional-statements": "off",
|
|
33
27
|
"functional/no-expression-statements": "off",
|
|
34
28
|
"functional/no-return-void": "off",
|
|
29
|
+
// Code formatting (when eslint-plugin-prettier is available)
|
|
30
|
+
"prettier/prettier": [
|
|
31
|
+
"error",
|
|
32
|
+
{},
|
|
33
|
+
{
|
|
34
|
+
usePrettierrc: true,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
// Import organization (when eslint-plugin-simple-import-sort is available)
|
|
38
|
+
"simple-import-sort/imports": "error",
|
|
39
|
+
"simple-import-sort/exports": "error",
|
|
35
40
|
},
|
|
36
41
|
};
|
package/dist/configs/strict.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
name: string;
|
|
2
3
|
rules: {
|
|
3
4
|
"functional/no-loop-statements": string;
|
|
4
5
|
"functional/immutable-data": string;
|
|
@@ -18,8 +19,13 @@ declare const _default: {
|
|
|
18
19
|
"functional/no-conditional-statements": string;
|
|
19
20
|
"functional/no-expression-statements": string;
|
|
20
21
|
"functional/no-return-void": string;
|
|
22
|
+
"prettier/prettier": (string | {
|
|
23
|
+
usePrettierrc?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
usePrettierrc: boolean;
|
|
26
|
+
})[];
|
|
27
|
+
"simple-import-sort/imports": string;
|
|
28
|
+
"simple-import-sort/exports": string;
|
|
21
29
|
};
|
|
22
|
-
plugins: string[];
|
|
23
|
-
extends: string[];
|
|
24
30
|
};
|
|
25
31
|
export default _default;
|
package/dist/configs/strict.js
CHANGED
|
@@ -4,8 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const recommended_1 = __importDefault(require("./recommended"));
|
|
7
|
+
// ESLint 9.x Flat Config Format - Strict rules overlay
|
|
7
8
|
exports.default = {
|
|
8
9
|
...recommended_1.default,
|
|
10
|
+
name: "functype/strict",
|
|
9
11
|
rules: {
|
|
10
12
|
...recommended_1.default.rules,
|
|
11
13
|
// Enable stricter functional rules
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
declare const plugin: {
|
|
2
2
|
configs: {
|
|
3
3
|
recommended: {
|
|
4
|
-
|
|
5
|
-
extends: string[];
|
|
4
|
+
name: string;
|
|
6
5
|
rules: {
|
|
7
6
|
"prefer-const": string;
|
|
8
7
|
"no-var": string;
|
|
@@ -20,9 +19,17 @@ declare const plugin: {
|
|
|
20
19
|
"functional/no-conditional-statements": string;
|
|
21
20
|
"functional/no-expression-statements": string;
|
|
22
21
|
"functional/no-return-void": string;
|
|
22
|
+
"prettier/prettier": (string | {
|
|
23
|
+
usePrettierrc?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
usePrettierrc: boolean;
|
|
26
|
+
})[];
|
|
27
|
+
"simple-import-sort/imports": string;
|
|
28
|
+
"simple-import-sort/exports": string;
|
|
23
29
|
};
|
|
24
30
|
};
|
|
25
31
|
strict: {
|
|
32
|
+
name: string;
|
|
26
33
|
rules: {
|
|
27
34
|
"functional/no-loop-statements": string;
|
|
28
35
|
"functional/immutable-data": string;
|
|
@@ -42,10 +49,19 @@ declare const plugin: {
|
|
|
42
49
|
"functional/no-conditional-statements": string;
|
|
43
50
|
"functional/no-expression-statements": string;
|
|
44
51
|
"functional/no-return-void": string;
|
|
52
|
+
"prettier/prettier": (string | {
|
|
53
|
+
usePrettierrc?: undefined;
|
|
54
|
+
} | {
|
|
55
|
+
usePrettierrc: boolean;
|
|
56
|
+
})[];
|
|
57
|
+
"simple-import-sort/imports": string;
|
|
58
|
+
"simple-import-sort/exports": string;
|
|
45
59
|
};
|
|
46
|
-
plugins: string[];
|
|
47
|
-
extends: string[];
|
|
48
60
|
};
|
|
49
61
|
};
|
|
62
|
+
meta: {
|
|
63
|
+
name: string;
|
|
64
|
+
version: string;
|
|
65
|
+
};
|
|
50
66
|
};
|
|
51
67
|
export = plugin;
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
const recommended_1 = __importDefault(require("./configs/recommended"));
|
|
6
6
|
const strict_1 = __importDefault(require("./configs/strict"));
|
|
7
|
+
// ESLint 9.x Flat Config Plugin
|
|
7
8
|
const plugin = {
|
|
8
9
|
configs: {
|
|
9
10
|
recommended: recommended_1.default,
|
|
10
11
|
strict: strict_1.default,
|
|
11
12
|
},
|
|
13
|
+
// Meta information
|
|
14
|
+
meta: {
|
|
15
|
+
name: "eslint-plugin-functype",
|
|
16
|
+
version: "1.2.0",
|
|
17
|
+
},
|
|
12
18
|
};
|
|
13
19
|
module.exports = plugin;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-functype",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Curated ESLint
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Curated ESLint flat config bundle for functional TypeScript programming (ESLint 9.x+)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -21,10 +21,13 @@
|
|
|
21
21
|
"immutable"
|
|
22
22
|
],
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
|
25
|
-
"@typescript-eslint/parser": "^8.39.0",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0 || ^8.39.0 || ^9.0.0",
|
|
25
|
+
"@typescript-eslint/parser": "^8.38.0 || ^8.39.0 || ^9.0.0",
|
|
26
26
|
"eslint": "^9.32.0",
|
|
27
|
-
"eslint-plugin-functional": "^9.0.2"
|
|
27
|
+
"eslint-plugin-functional": "^9.0.2",
|
|
28
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
29
|
+
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
30
|
+
"prettier": "^3.0.0"
|
|
28
31
|
},
|
|
29
32
|
"dependencies": {
|
|
30
33
|
"@eslint/eslintrc": "^3.3.1",
|
|
@@ -36,6 +39,9 @@
|
|
|
36
39
|
"@typescript-eslint/parser": "^8.39.0",
|
|
37
40
|
"eslint": "^9.32.0",
|
|
38
41
|
"eslint-plugin-functional": "^9.0.2",
|
|
42
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
43
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
44
|
+
"prettier": "^3.6.2",
|
|
39
45
|
"typescript": "^5.9.2"
|
|
40
46
|
},
|
|
41
47
|
"author": "",
|