@theholocron/eslint-config 6.1.0 → 7.0.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/bundles/library.d.ts +1213 -0
- package/dist/bundles/library.js +17 -0
- package/dist/bundles/next-app.d.ts +5 -0
- package/dist/bundles/next-app.js +21 -0
- package/dist/bundles/node-app.d.ts +1213 -0
- package/dist/bundles/node-app.js +15 -0
- package/dist/bundles/react-app.d.ts +1213 -0
- package/dist/bundles/react-app.js +17 -0
- package/dist/configs/base.d.ts +1213 -0
- package/dist/configs/base.js +14 -0
- package/dist/configs/cypress.d.ts +5 -0
- package/dist/configs/cypress.js +11 -0
- package/dist/configs/next.d.ts +5 -0
- package/dist/configs/next.js +14 -0
- package/dist/configs/node.d.ts +5 -0
- package/dist/configs/node.js +14 -0
- package/dist/configs/react.d.ts +5 -0
- package/{configs → dist/configs}/react.js +4 -4
- package/dist/configs/storybook.d.ts +5 -0
- package/dist/configs/storybook.js +7 -0
- package/dist/configs/typescript.d.ts +5 -0
- package/dist/configs/typescript.js +13 -0
- package/dist/configs/vitest.d.ts +206 -0
- package/dist/configs/vitest.js +15 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/package.json +50 -31
- package/bundles/library.js +0 -21
- package/bundles/next-app.js +0 -19
- package/bundles/node-app.js +0 -8
- package/bundles/react-app.js +0 -15
- package/configs/base.js +0 -17
- package/configs/cypress.js +0 -13
- package/configs/next.js +0 -18
- package/configs/node.js +0 -15
- package/configs/storybook.js +0 -7
- package/configs/typescript.js +0 -19
- package/configs/vitest.js +0 -22
- package/index.js +0 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
//#region configs/base.ts
|
|
4
|
+
function base() {
|
|
5
|
+
return [{
|
|
6
|
+
name: "@theholocron/base",
|
|
7
|
+
languageOptions: { globals: {
|
|
8
|
+
...globals.browser,
|
|
9
|
+
...globals.node
|
|
10
|
+
} }
|
|
11
|
+
}, js.configs.recommended];
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { base };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import cypress from "eslint-plugin-cypress";
|
|
2
|
+
//#region configs/cypress.ts
|
|
3
|
+
function cypressConfig() {
|
|
4
|
+
return [{
|
|
5
|
+
name: "@theholocron/cypress",
|
|
6
|
+
files: ["cypress/**/*.{js,ts,jsx,tsx}"],
|
|
7
|
+
extends: [cypress.configs.recommended]
|
|
8
|
+
}];
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { cypressConfig as cypress, cypressConfig };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import next from "@next/eslint-plugin-next";
|
|
2
|
+
//#region configs/next.ts
|
|
3
|
+
function nextConfig() {
|
|
4
|
+
return [{
|
|
5
|
+
name: "@theholocron/next",
|
|
6
|
+
plugins: { "@next/next": next },
|
|
7
|
+
rules: {
|
|
8
|
+
...next.configs.recommended.rules,
|
|
9
|
+
...next.configs["core-web-vitals"].rules
|
|
10
|
+
}
|
|
11
|
+
}];
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { nextConfig as next, nextConfig };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import n from "eslint-plugin-n";
|
|
2
|
+
//#region configs/node.ts
|
|
3
|
+
function node() {
|
|
4
|
+
return [n.configs["flat/recommended-module"], {
|
|
5
|
+
name: "@theholocron/node",
|
|
6
|
+
rules: {
|
|
7
|
+
"n/no-process-exit": "off",
|
|
8
|
+
"n/no-missing-import": "off",
|
|
9
|
+
"n/no-unsupported-features/es-syntax": "off"
|
|
10
|
+
}
|
|
11
|
+
}];
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { node };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import react from "eslint-plugin-react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
//#region configs/react.ts
|
|
3
|
+
function reactConfig() {
|
|
4
4
|
return [react.configs.flat.recommended, react.configs.flat["jsx-runtime"]];
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
export { reactConfig as react };
|
|
6
|
+
//#endregion
|
|
7
|
+
export { reactConfig as react, reactConfig };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import tseslint from "typescript-eslint";
|
|
2
|
+
//#region configs/typescript.ts
|
|
3
|
+
function typescript() {
|
|
4
|
+
return [...tseslint.configs.recommended, {
|
|
5
|
+
name: "@theholocron/typescript",
|
|
6
|
+
rules: { "@typescript-eslint/no-unused-vars": ["error", {
|
|
7
|
+
argsIgnorePattern: "^_",
|
|
8
|
+
varsIgnorePattern: "^_"
|
|
9
|
+
}] }
|
|
10
|
+
}];
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { typescript };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
//#region configs/vitest.d.ts
|
|
2
|
+
declare function vitestConfig(): {
|
|
3
|
+
name: string;
|
|
4
|
+
files: string[];
|
|
5
|
+
plugins: {
|
|
6
|
+
vitest: {
|
|
7
|
+
readonly meta: {
|
|
8
|
+
readonly name: "vitest";
|
|
9
|
+
readonly version: string;
|
|
10
|
+
};
|
|
11
|
+
readonly rules: Record<string, import("eslint").Rule.RuleModule>;
|
|
12
|
+
readonly environments: {
|
|
13
|
+
readonly env: {
|
|
14
|
+
readonly globals: {
|
|
15
|
+
readonly suite: true;
|
|
16
|
+
readonly test: true;
|
|
17
|
+
readonly describe: true;
|
|
18
|
+
readonly it: true;
|
|
19
|
+
readonly expectTypeOf: true;
|
|
20
|
+
readonly assertType: true;
|
|
21
|
+
readonly expect: true;
|
|
22
|
+
readonly assert: true;
|
|
23
|
+
readonly chai: true;
|
|
24
|
+
readonly vitest: true;
|
|
25
|
+
readonly vi: true;
|
|
26
|
+
readonly beforeAll: true;
|
|
27
|
+
readonly afterAll: true;
|
|
28
|
+
readonly beforeEach: true;
|
|
29
|
+
readonly afterEach: true;
|
|
30
|
+
readonly onTestFailed: true;
|
|
31
|
+
readonly onTestFinished: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
readonly configs: {
|
|
36
|
+
readonly "legacy-recommended": {
|
|
37
|
+
plugins: string[];
|
|
38
|
+
rules: {};
|
|
39
|
+
};
|
|
40
|
+
readonly "legacy-all": {
|
|
41
|
+
plugins: string[];
|
|
42
|
+
rules: {};
|
|
43
|
+
};
|
|
44
|
+
readonly recommended: {
|
|
45
|
+
readonly name: "vitest/recommended";
|
|
46
|
+
readonly plugins: {
|
|
47
|
+
readonly vitest: import("eslint").ESLint.Plugin;
|
|
48
|
+
};
|
|
49
|
+
readonly rules: {
|
|
50
|
+
readonly "vitest/expect-expect": "error";
|
|
51
|
+
readonly "vitest/no-commented-out-tests": "error";
|
|
52
|
+
readonly "vitest/no-conditional-expect": "error";
|
|
53
|
+
readonly "vitest/no-disabled-tests": "warn";
|
|
54
|
+
readonly "vitest/no-focused-tests": "error";
|
|
55
|
+
readonly "vitest/no-identical-title": "error";
|
|
56
|
+
readonly "vitest/no-import-node-test": "error";
|
|
57
|
+
readonly "vitest/no-interpolation-in-snapshots": "error";
|
|
58
|
+
readonly "vitest/no-mocks-import": "error";
|
|
59
|
+
readonly "vitest/no-standalone-expect": "error";
|
|
60
|
+
readonly "vitest/no-unneeded-async-expect-function": "error";
|
|
61
|
+
readonly "vitest/prefer-called-exactly-once-with": "error";
|
|
62
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "error";
|
|
63
|
+
readonly "vitest/valid-describe-callback": "error";
|
|
64
|
+
readonly "vitest/valid-expect": "error";
|
|
65
|
+
readonly "vitest/valid-expect-in-promise": "error";
|
|
66
|
+
readonly "vitest/valid-title": "error";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly all: {
|
|
70
|
+
readonly name: "vitest/all";
|
|
71
|
+
readonly plugins: {
|
|
72
|
+
readonly vitest: import("eslint").ESLint.Plugin;
|
|
73
|
+
};
|
|
74
|
+
readonly rules: {
|
|
75
|
+
readonly "vitest/consistent-each-for": "warn";
|
|
76
|
+
readonly "vitest/consistent-test-filename": "warn";
|
|
77
|
+
readonly "vitest/consistent-test-it": "warn";
|
|
78
|
+
readonly "vitest/consistent-vitest-vi": "warn";
|
|
79
|
+
readonly "vitest/expect-expect": "warn";
|
|
80
|
+
readonly "vitest/hoisted-apis-on-top": "warn";
|
|
81
|
+
readonly "vitest/max-expects": "warn";
|
|
82
|
+
readonly "vitest/max-nested-describe": "warn";
|
|
83
|
+
readonly "vitest/no-alias-methods": "warn";
|
|
84
|
+
readonly "vitest/no-commented-out-tests": "warn";
|
|
85
|
+
readonly "vitest/no-conditional-expect": "warn";
|
|
86
|
+
readonly "vitest/no-conditional-in-test": "warn";
|
|
87
|
+
readonly "vitest/no-conditional-tests": "warn";
|
|
88
|
+
readonly "vitest/no-disabled-tests": "warn";
|
|
89
|
+
readonly "vitest/no-duplicate-hooks": "warn";
|
|
90
|
+
readonly "vitest/no-focused-tests": "warn";
|
|
91
|
+
readonly "vitest/no-hooks": "warn";
|
|
92
|
+
readonly "vitest/no-identical-title": "warn";
|
|
93
|
+
readonly "vitest/no-import-node-test": "warn";
|
|
94
|
+
readonly "vitest/no-importing-vitest-globals": "off";
|
|
95
|
+
readonly "vitest/no-interpolation-in-snapshots": "warn";
|
|
96
|
+
readonly "vitest/no-large-snapshots": "warn";
|
|
97
|
+
readonly "vitest/no-mocks-import": "warn";
|
|
98
|
+
readonly "vitest/no-restricted-matchers": "warn";
|
|
99
|
+
readonly "vitest/no-restricted-vi-methods": "warn";
|
|
100
|
+
readonly "vitest/no-standalone-expect": "warn";
|
|
101
|
+
readonly "vitest/no-test-prefixes": "warn";
|
|
102
|
+
readonly "vitest/no-test-return-statement": "warn";
|
|
103
|
+
readonly "vitest/no-unneeded-async-expect-function": "warn";
|
|
104
|
+
readonly "vitest/padding-around-after-all-blocks": "warn";
|
|
105
|
+
readonly "vitest/padding-around-after-each-blocks": "warn";
|
|
106
|
+
readonly "vitest/padding-around-all": "warn";
|
|
107
|
+
readonly "vitest/padding-around-before-all-blocks": "warn";
|
|
108
|
+
readonly "vitest/padding-around-before-each-blocks": "warn";
|
|
109
|
+
readonly "vitest/padding-around-describe-blocks": "warn";
|
|
110
|
+
readonly "vitest/padding-around-expect-groups": "warn";
|
|
111
|
+
readonly "vitest/padding-around-test-blocks": "warn";
|
|
112
|
+
readonly "vitest/prefer-called-exactly-once-with": "warn";
|
|
113
|
+
readonly "vitest/prefer-called-once": "off";
|
|
114
|
+
readonly "vitest/prefer-called-times": "warn";
|
|
115
|
+
readonly "vitest/prefer-called-with": "warn";
|
|
116
|
+
readonly "vitest/prefer-comparison-matcher": "warn";
|
|
117
|
+
readonly "vitest/prefer-describe-function-title": "warn";
|
|
118
|
+
readonly "vitest/prefer-each": "warn";
|
|
119
|
+
readonly "vitest/prefer-equality-matcher": "warn";
|
|
120
|
+
readonly "vitest/prefer-expect-assertions": "warn";
|
|
121
|
+
readonly "vitest/prefer-expect-resolves": "warn";
|
|
122
|
+
readonly "vitest/prefer-expect-type-of": "warn";
|
|
123
|
+
readonly "vitest/prefer-hooks-in-order": "warn";
|
|
124
|
+
readonly "vitest/prefer-hooks-on-top": "warn";
|
|
125
|
+
readonly "vitest/prefer-import-in-mock": "warn";
|
|
126
|
+
readonly "vitest/prefer-importing-vitest-globals": "warn";
|
|
127
|
+
readonly "vitest/prefer-lowercase-title": "warn";
|
|
128
|
+
readonly "vitest/prefer-mock-promise-shorthand": "warn";
|
|
129
|
+
readonly "vitest/prefer-snapshot-hint": "warn";
|
|
130
|
+
readonly "vitest/prefer-spy-on": "warn";
|
|
131
|
+
readonly "vitest/prefer-strict-boolean-matchers": "warn";
|
|
132
|
+
readonly "vitest/prefer-strict-equal": "warn";
|
|
133
|
+
readonly "vitest/prefer-to-be-falsy": "off";
|
|
134
|
+
readonly "vitest/prefer-to-be-object": "warn";
|
|
135
|
+
readonly "vitest/prefer-to-be-truthy": "off";
|
|
136
|
+
readonly "vitest/prefer-to-be": "warn";
|
|
137
|
+
readonly "vitest/prefer-to-contain": "warn";
|
|
138
|
+
readonly "vitest/prefer-to-have-been-called-times": "warn";
|
|
139
|
+
readonly "vitest/prefer-to-have-length": "warn";
|
|
140
|
+
readonly "vitest/prefer-todo": "warn";
|
|
141
|
+
readonly "vitest/prefer-vi-mocked": "warn";
|
|
142
|
+
readonly "vitest/require-awaited-expect-poll": "warn";
|
|
143
|
+
readonly "vitest/require-hook": "warn";
|
|
144
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "warn";
|
|
145
|
+
readonly "vitest/require-mock-type-parameters": "warn";
|
|
146
|
+
readonly "vitest/require-test-timeout": "off";
|
|
147
|
+
readonly "vitest/require-to-throw-message": "warn";
|
|
148
|
+
readonly "vitest/require-top-level-describe": "warn";
|
|
149
|
+
readonly "vitest/unbound-method": "warn";
|
|
150
|
+
readonly "vitest/valid-describe-callback": "warn";
|
|
151
|
+
readonly "vitest/valid-expect-in-promise": "warn";
|
|
152
|
+
readonly "vitest/valid-expect": "warn";
|
|
153
|
+
readonly "vitest/valid-title": "warn";
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
readonly env: {
|
|
157
|
+
readonly name: "vitest/env";
|
|
158
|
+
readonly languageOptions: {
|
|
159
|
+
readonly globals: {
|
|
160
|
+
readonly suite: "writable";
|
|
161
|
+
readonly test: "writable";
|
|
162
|
+
readonly describe: "writable";
|
|
163
|
+
readonly it: "writable";
|
|
164
|
+
readonly expectTypeOf: "writable";
|
|
165
|
+
readonly assertType: "writable";
|
|
166
|
+
readonly expect: "writable";
|
|
167
|
+
readonly assert: "writable";
|
|
168
|
+
readonly chai: "writable";
|
|
169
|
+
readonly vitest: "writable";
|
|
170
|
+
readonly vi: "writable";
|
|
171
|
+
readonly beforeAll: "writable";
|
|
172
|
+
readonly afterAll: "writable";
|
|
173
|
+
readonly beforeEach: "writable";
|
|
174
|
+
readonly afterEach: "writable";
|
|
175
|
+
readonly onTestFailed: "writable";
|
|
176
|
+
readonly onTestFinished: "writable";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
rules: {
|
|
184
|
+
"vitest/expect-expect": (string | {
|
|
185
|
+
assertFunctionNames: string[];
|
|
186
|
+
})[];
|
|
187
|
+
"vitest/no-commented-out-tests": "error";
|
|
188
|
+
"vitest/no-conditional-expect": "error";
|
|
189
|
+
"vitest/no-disabled-tests": "warn";
|
|
190
|
+
"vitest/no-focused-tests": "error";
|
|
191
|
+
"vitest/no-identical-title": "error";
|
|
192
|
+
"vitest/no-import-node-test": "error";
|
|
193
|
+
"vitest/no-interpolation-in-snapshots": "error";
|
|
194
|
+
"vitest/no-mocks-import": "error";
|
|
195
|
+
"vitest/no-standalone-expect": "error";
|
|
196
|
+
"vitest/no-unneeded-async-expect-function": "error";
|
|
197
|
+
"vitest/prefer-called-exactly-once-with": "error";
|
|
198
|
+
"vitest/require-local-test-context-for-concurrent-snapshots": "error";
|
|
199
|
+
"vitest/valid-describe-callback": "error";
|
|
200
|
+
"vitest/valid-expect": "error";
|
|
201
|
+
"vitest/valid-expect-in-promise": "error";
|
|
202
|
+
"vitest/valid-title": "error";
|
|
203
|
+
};
|
|
204
|
+
}[];
|
|
205
|
+
//#endregion
|
|
206
|
+
export { vitestConfig as vitest, vitestConfig };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import vitest from "@vitest/eslint-plugin";
|
|
2
|
+
//#region configs/vitest.ts
|
|
3
|
+
function vitestConfig() {
|
|
4
|
+
return [{
|
|
5
|
+
name: "@theholocron/vitest",
|
|
6
|
+
files: ["**/*.{test,spec}.{ts,js}", "**/setup*.{ts,js}"],
|
|
7
|
+
plugins: { vitest },
|
|
8
|
+
rules: {
|
|
9
|
+
...vitest.configs.recommended.rules,
|
|
10
|
+
"vitest/expect-expect": ["error", { assertFunctionNames: ["expect", "expectRequest"] }]
|
|
11
|
+
}
|
|
12
|
+
}];
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { vitestConfig as vitest, vitestConfig };
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "A ESLint configuration for writing well-formed Javascript within the Galaxy.",
|
|
5
5
|
"homepage": "https://github.com/theholocron/configs/tree/main/packages/eslint-config#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/configs/issues",
|
|
@@ -21,65 +21,81 @@
|
|
|
21
21
|
"storybook"
|
|
22
22
|
],
|
|
23
23
|
"type": "module",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"tsdown": "^0.22.8",
|
|
26
|
+
"typescript": "^5.9.3",
|
|
27
|
+
"@theholocron/tsconfig": "7.0.0"
|
|
28
|
+
},
|
|
24
29
|
"exports": {
|
|
25
30
|
".": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.js",
|
|
33
|
+
"default": "./dist/index.js"
|
|
28
34
|
},
|
|
29
35
|
"./base": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
36
|
+
"types": "./dist/configs/base.d.ts",
|
|
37
|
+
"import": "./dist/configs/base.js",
|
|
38
|
+
"default": "./dist/configs/base.js"
|
|
32
39
|
},
|
|
33
40
|
"./typescript": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
41
|
+
"types": "./dist/configs/typescript.d.ts",
|
|
42
|
+
"import": "./dist/configs/typescript.js",
|
|
43
|
+
"default": "./dist/configs/typescript.js"
|
|
36
44
|
},
|
|
37
45
|
"./react": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
46
|
+
"types": "./dist/configs/react.d.ts",
|
|
47
|
+
"import": "./dist/configs/react.js",
|
|
48
|
+
"default": "./dist/configs/react.js"
|
|
40
49
|
},
|
|
41
50
|
"./next": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
51
|
+
"types": "./dist/configs/next.d.ts",
|
|
52
|
+
"import": "./dist/configs/next.js",
|
|
53
|
+
"default": "./dist/configs/next.js"
|
|
44
54
|
},
|
|
45
55
|
"./node": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
56
|
+
"types": "./dist/configs/node.d.ts",
|
|
57
|
+
"import": "./dist/configs/node.js",
|
|
58
|
+
"default": "./dist/configs/node.js"
|
|
48
59
|
},
|
|
49
60
|
"./vitest": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
61
|
+
"types": "./dist/configs/vitest.d.ts",
|
|
62
|
+
"import": "./dist/configs/vitest.js",
|
|
63
|
+
"default": "./dist/configs/vitest.js"
|
|
52
64
|
},
|
|
53
65
|
"./storybook": {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
66
|
+
"types": "./dist/configs/storybook.d.ts",
|
|
67
|
+
"import": "./dist/configs/storybook.js",
|
|
68
|
+
"default": "./dist/configs/storybook.js"
|
|
56
69
|
},
|
|
57
70
|
"./cypress": {
|
|
58
|
-
"
|
|
59
|
-
"
|
|
71
|
+
"types": "./dist/configs/cypress.d.ts",
|
|
72
|
+
"import": "./dist/configs/cypress.js",
|
|
73
|
+
"default": "./dist/configs/cypress.js"
|
|
60
74
|
},
|
|
61
75
|
"./bundles/library": {
|
|
62
|
-
"
|
|
63
|
-
"
|
|
76
|
+
"types": "./dist/bundles/library.d.ts",
|
|
77
|
+
"import": "./dist/bundles/library.js",
|
|
78
|
+
"default": "./dist/bundles/library.js"
|
|
64
79
|
},
|
|
65
80
|
"./bundles/next-app": {
|
|
66
|
-
"
|
|
67
|
-
"
|
|
81
|
+
"types": "./dist/bundles/next-app.d.ts",
|
|
82
|
+
"import": "./dist/bundles/next-app.js",
|
|
83
|
+
"default": "./dist/bundles/next-app.js"
|
|
68
84
|
},
|
|
69
85
|
"./bundles/node-app": {
|
|
70
|
-
"
|
|
71
|
-
"
|
|
86
|
+
"types": "./dist/bundles/node-app.d.ts",
|
|
87
|
+
"import": "./dist/bundles/node-app.js",
|
|
88
|
+
"default": "./dist/bundles/node-app.js"
|
|
72
89
|
},
|
|
73
90
|
"./bundles/react-app": {
|
|
74
|
-
"
|
|
75
|
-
"
|
|
91
|
+
"types": "./dist/bundles/react-app.d.ts",
|
|
92
|
+
"import": "./dist/bundles/react-app.js",
|
|
93
|
+
"default": "./dist/bundles/react-app.js"
|
|
76
94
|
},
|
|
77
95
|
"./package.json": "./package.json"
|
|
78
96
|
},
|
|
79
97
|
"files": [
|
|
80
|
-
"
|
|
81
|
-
"configs/",
|
|
82
|
-
"bundles/"
|
|
98
|
+
"dist/"
|
|
83
99
|
],
|
|
84
100
|
"peerDependencies": {
|
|
85
101
|
"@eslint/js": "^10",
|
|
@@ -117,5 +133,8 @@
|
|
|
117
133
|
"access": "public"
|
|
118
134
|
},
|
|
119
135
|
"releases": "https://github.com/theholocron/configs/releases",
|
|
120
|
-
"wiki": "https://github.com/theholocron/configs/wiki"
|
|
136
|
+
"wiki": "https://github.com/theholocron/configs/wiki",
|
|
137
|
+
"scripts": {
|
|
138
|
+
"build": "tsdown"
|
|
139
|
+
}
|
|
121
140
|
}
|
package/bundles/library.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { base } from "../configs/base.js";
|
|
2
|
-
import { node } from "../configs/node.js";
|
|
3
|
-
import { typescript } from "../configs/typescript.js";
|
|
4
|
-
|
|
5
|
-
export function library() {
|
|
6
|
-
return [
|
|
7
|
-
...base(),
|
|
8
|
-
...node(),
|
|
9
|
-
...typescript(),
|
|
10
|
-
{
|
|
11
|
-
name: "@theholocron/library",
|
|
12
|
-
rules: {
|
|
13
|
-
// Library packages often include dev scripts with shebangs that aren't
|
|
14
|
-
// bin entries, and CLI entry shebangs are commonly injected by bundlers
|
|
15
|
-
// (e.g. tsdown banner) rather than written in source. The hashbang rule
|
|
16
|
-
// produces false positives in both cases for the library use-case.
|
|
17
|
-
"n/hashbang": "off",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
}
|
package/bundles/next-app.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { base } from "../configs/base.js";
|
|
2
|
-
import { cypress } from "../configs/cypress.js";
|
|
3
|
-
import { next } from "../configs/next.js";
|
|
4
|
-
import { react } from "../configs/react.js";
|
|
5
|
-
import { typescript } from "../configs/typescript.js";
|
|
6
|
-
import { storybook } from "../configs/storybook.js";
|
|
7
|
-
import { vitest } from "../configs/vitest.js";
|
|
8
|
-
|
|
9
|
-
export function nextApp() {
|
|
10
|
-
return [
|
|
11
|
-
...base(),
|
|
12
|
-
...typescript(),
|
|
13
|
-
...react(),
|
|
14
|
-
...next(),
|
|
15
|
-
...vitest(),
|
|
16
|
-
...storybook(),
|
|
17
|
-
...cypress(),
|
|
18
|
-
];
|
|
19
|
-
}
|
package/bundles/node-app.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { base } from "../configs/base.js";
|
|
2
|
-
import { node } from "../configs/node.js";
|
|
3
|
-
import { typescript } from "../configs/typescript.js";
|
|
4
|
-
import { vitest } from "../configs/vitest.js";
|
|
5
|
-
|
|
6
|
-
export function nodeApp() {
|
|
7
|
-
return [...base(), ...node(), ...typescript(), ...vitest()];
|
|
8
|
-
}
|
package/bundles/react-app.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { base } from "../configs/base.js";
|
|
2
|
-
import { react } from "../configs/react.js";
|
|
3
|
-
import { storybook } from "../configs/storybook.js";
|
|
4
|
-
import { typescript } from "../configs/typescript.js";
|
|
5
|
-
import { vitest } from "../configs/vitest.js";
|
|
6
|
-
|
|
7
|
-
export function reactApp() {
|
|
8
|
-
return [
|
|
9
|
-
...base(),
|
|
10
|
-
...typescript(),
|
|
11
|
-
...react(),
|
|
12
|
-
...storybook(),
|
|
13
|
-
...vitest(),
|
|
14
|
-
];
|
|
15
|
-
}
|
package/configs/base.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import js from "@eslint/js";
|
|
2
|
-
import globals from "globals";
|
|
3
|
-
|
|
4
|
-
export function base() {
|
|
5
|
-
return [
|
|
6
|
-
{
|
|
7
|
-
name: "@theholocron/base",
|
|
8
|
-
languageOptions: {
|
|
9
|
-
globals: {
|
|
10
|
-
...globals.browser,
|
|
11
|
-
...globals.node,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
js.configs.recommended,
|
|
16
|
-
];
|
|
17
|
-
}
|
package/configs/cypress.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import cypress from "eslint-plugin-cypress";
|
|
2
|
-
|
|
3
|
-
export function cypressConfig() {
|
|
4
|
-
return [
|
|
5
|
-
{
|
|
6
|
-
name: "@theholocron/cypress",
|
|
7
|
-
files: ["cypress/**/*.{js,ts,jsx,tsx}"],
|
|
8
|
-
extends: [cypress.configs.recommended],
|
|
9
|
-
},
|
|
10
|
-
];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { cypressConfig as cypress };
|
package/configs/next.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import next from "@next/eslint-plugin-next";
|
|
2
|
-
|
|
3
|
-
export function nextConfig() {
|
|
4
|
-
return [
|
|
5
|
-
{
|
|
6
|
-
name: "@theholocron/next",
|
|
7
|
-
plugins: {
|
|
8
|
-
"@next/next": next,
|
|
9
|
-
},
|
|
10
|
-
rules: {
|
|
11
|
-
...next.configs.recommended.rules,
|
|
12
|
-
...next.configs["core-web-vitals"].rules,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { nextConfig as next };
|
package/configs/node.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import n from "eslint-plugin-n";
|
|
2
|
-
|
|
3
|
-
export function node() {
|
|
4
|
-
return [
|
|
5
|
-
n.configs["flat/recommended-module"],
|
|
6
|
-
{
|
|
7
|
-
name: "@theholocron/node",
|
|
8
|
-
rules: {
|
|
9
|
-
"n/no-process-exit": "off",
|
|
10
|
-
"n/no-missing-import": "off", // TS handles this better
|
|
11
|
-
"n/no-unsupported-features/es-syntax": "off",
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
];
|
|
15
|
-
}
|