ts-builds 2.3.0 → 2.3.2
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/eslint.config.fp.mjs +73 -3
- package/eslint.config.functype.mjs +80 -18
- package/package.json +2 -1
package/eslint.config.fp.mjs
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
1
|
+
// ESLint FP config: Base + functional programming rules from eslint-config-functype
|
|
2
|
+
// Includes: no-let, immutable-data, prefer-immutable-types, etc.
|
|
3
|
+
import path from "node:path"
|
|
4
|
+
import { fileURLToPath } from "node:url"
|
|
5
|
+
|
|
6
|
+
import { FlatCompat } from "@eslint/eslintrc"
|
|
7
|
+
import js from "@eslint/js"
|
|
8
|
+
import typescriptEslint from "@typescript-eslint/eslint-plugin"
|
|
9
|
+
import tsParser from "@typescript-eslint/parser"
|
|
3
10
|
import functypeConfig from "eslint-config-functype"
|
|
11
|
+
import functional from "eslint-plugin-functional"
|
|
12
|
+
import prettier from "eslint-plugin-prettier"
|
|
13
|
+
import simpleImportSort from "eslint-plugin-simple-import-sort"
|
|
14
|
+
import globals from "globals"
|
|
15
|
+
|
|
16
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
17
|
+
const __dirname = path.dirname(__filename)
|
|
18
|
+
const compat = new FlatCompat({
|
|
19
|
+
baseDirectory: __dirname,
|
|
20
|
+
recommendedConfig: js.configs.recommended,
|
|
21
|
+
allConfig: js.configs.all,
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
export default [
|
|
25
|
+
{
|
|
26
|
+
ignores: [
|
|
27
|
+
"**/.gitignore",
|
|
28
|
+
"**/.eslintignore",
|
|
29
|
+
"**/node_modules",
|
|
30
|
+
"**/.DS_Store",
|
|
31
|
+
"**/dist-ssr",
|
|
32
|
+
"**/*.local",
|
|
33
|
+
"**/tsconfig.json",
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"),
|
|
37
|
+
{
|
|
38
|
+
plugins: {
|
|
39
|
+
"@typescript-eslint": typescriptEslint,
|
|
40
|
+
"simple-import-sort": simpleImportSort,
|
|
41
|
+
functional,
|
|
42
|
+
prettier,
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
languageOptions: {
|
|
46
|
+
globals: {
|
|
47
|
+
...globals.browser,
|
|
48
|
+
...globals.amd,
|
|
49
|
+
...globals.node,
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
parser: tsParser,
|
|
53
|
+
ecmaVersion: 2020,
|
|
54
|
+
sourceType: "module",
|
|
55
|
+
|
|
56
|
+
parserOptions: {
|
|
57
|
+
projectService: true,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
settings: {
|
|
62
|
+
"import/resolver": {
|
|
63
|
+
node: {
|
|
64
|
+
paths: ["'src'"],
|
|
65
|
+
extensions: [".js", ".ts"],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
4
69
|
|
|
5
|
-
|
|
70
|
+
rules: {
|
|
71
|
+
// Include all rules from eslint-config-functype recommended
|
|
72
|
+
...functypeConfig.configs.recommended.rules,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
]
|
|
@@ -1,23 +1,85 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Full functype support:
|
|
1
|
+
// ESLint Functype config: Base + FP rules + eslint-plugin-functype rules
|
|
2
|
+
// Full functype support: prefer-option, prefer-either, prefer-fold, etc.
|
|
3
|
+
import path from "node:path"
|
|
4
|
+
import { fileURLToPath } from "node:url"
|
|
5
|
+
|
|
6
|
+
import { FlatCompat } from "@eslint/eslintrc"
|
|
7
|
+
import js from "@eslint/js"
|
|
8
|
+
import typescriptEslint from "@typescript-eslint/eslint-plugin"
|
|
9
|
+
import tsParser from "@typescript-eslint/parser"
|
|
3
10
|
import functypeConfig from "eslint-config-functype"
|
|
11
|
+
import functional from "eslint-plugin-functional"
|
|
4
12
|
import functypePlugin from "eslint-plugin-functype"
|
|
13
|
+
import prettier from "eslint-plugin-prettier"
|
|
14
|
+
import simpleImportSort from "eslint-plugin-simple-import-sort"
|
|
15
|
+
import globals from "globals"
|
|
16
|
+
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
18
|
+
const __dirname = path.dirname(__filename)
|
|
19
|
+
const compat = new FlatCompat({
|
|
20
|
+
baseDirectory: __dirname,
|
|
21
|
+
recommendedConfig: js.configs.recommended,
|
|
22
|
+
allConfig: js.configs.all,
|
|
23
|
+
})
|
|
5
24
|
|
|
6
|
-
export default
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
25
|
+
export default [
|
|
26
|
+
{
|
|
27
|
+
ignores: [
|
|
28
|
+
"**/.gitignore",
|
|
29
|
+
"**/.eslintignore",
|
|
30
|
+
"**/node_modules",
|
|
31
|
+
"**/.DS_Store",
|
|
32
|
+
"**/dist-ssr",
|
|
33
|
+
"**/*.local",
|
|
34
|
+
"**/tsconfig.json",
|
|
35
|
+
],
|
|
11
36
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"),
|
|
38
|
+
{
|
|
39
|
+
plugins: {
|
|
40
|
+
"@typescript-eslint": typescriptEslint,
|
|
41
|
+
"simple-import-sort": simpleImportSort,
|
|
42
|
+
functional,
|
|
43
|
+
functype: functypePlugin,
|
|
44
|
+
prettier,
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
languageOptions: {
|
|
48
|
+
globals: {
|
|
49
|
+
...globals.browser,
|
|
50
|
+
...globals.amd,
|
|
51
|
+
...globals.node,
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
parser: tsParser,
|
|
55
|
+
ecmaVersion: 2020,
|
|
56
|
+
sourceType: "module",
|
|
57
|
+
|
|
58
|
+
parserOptions: {
|
|
59
|
+
projectService: true,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
settings: {
|
|
64
|
+
"import/resolver": {
|
|
65
|
+
node: {
|
|
66
|
+
paths: ["'src'"],
|
|
67
|
+
extensions: [".js", ".ts"],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
rules: {
|
|
73
|
+
// Include all rules from eslint-config-functype recommended
|
|
74
|
+
...functypeConfig.configs.recommended.rules,
|
|
75
|
+
// Functype library-specific rules
|
|
76
|
+
"functype/prefer-option": "warn",
|
|
77
|
+
"functype/prefer-either": "warn",
|
|
78
|
+
"functype/prefer-fold": "warn",
|
|
79
|
+
"functype/prefer-map": "warn",
|
|
80
|
+
"functype/prefer-flatmap": "warn",
|
|
81
|
+
"functype/no-imperative-loops": "warn",
|
|
82
|
+
"functype/prefer-do-notation": "warn",
|
|
83
|
+
},
|
|
22
84
|
},
|
|
23
|
-
|
|
85
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-builds",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Shared TypeScript configuration files for library templates. Provides standardized ESLint, Prettier, Vitest, TypeScript, and build configs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"eslint-config-functype": "^1.3.0",
|
|
66
66
|
"eslint-config-prettier": "^10.1.8",
|
|
67
67
|
"eslint-plugin-functype": "^1.4.0",
|
|
68
|
+
"eslint-plugin-functional": "^9.0.0",
|
|
68
69
|
"eslint-plugin-import": "^2.32.0",
|
|
69
70
|
"eslint-plugin-prettier": "^5.5.5",
|
|
70
71
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|