@solvro/config 1.0.1 → 1.0.3
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/bin/index.js +2 -0
- package/dist/chunk-4C4AR77R.js +65 -0
- package/dist/chunk-SND5ODI2.js +20878 -0
- package/dist/dist-2ZVVVZXY.js +35994 -0
- package/dist/eslint-config/cli.cjs +532 -0
- package/dist/eslint-config/cli.d.cts +2 -0
- package/dist/eslint-config/cli.d.ts +2 -0
- package/dist/eslint-config/cli.js +498 -0
- package/dist/eslint-config/index.cjs +73016 -0
- package/dist/eslint-config/index.d.cts +9489 -0
- package/dist/eslint-config/index.d.ts +9489 -0
- package/dist/eslint-config/index.js +15604 -0
- package/dist/eslint-plugin-react-refresh-MJ7ZDK5R.js +258 -0
- package/dist/prettier-config/index.cjs +47 -0
- package/dist/prettier-config/index.d.cts +17 -0
- package/dist/prettier-config/index.d.ts +17 -0
- package/dist/prettier-config/index.js +31 -0
- package/package.json +72 -35
- package/eslint/_base.js +0 -39
- package/eslint/browser.js +0 -6
- package/eslint/comments.js +0 -6
- package/eslint/constants.js +0 -4
- package/eslint/jest-react.js +0 -9
- package/eslint/jest.js +0 -16
- package/eslint/next.js +0 -7
- package/eslint/node.js +0 -6
- package/eslint/playwright-test.js +0 -7
- package/eslint/react.js +0 -16
- package/eslint/rules/best-practice.js +0 -227
- package/eslint/rules/es6.js +0 -65
- package/eslint/rules/import.js +0 -58
- package/eslint/rules/jest.js +0 -16
- package/eslint/rules/jsx-a11y.js +0 -14
- package/eslint/rules/playwright-test.js +0 -46
- package/eslint/rules/possible-errors.js +0 -35
- package/eslint/rules/react.js +0 -97
- package/eslint/rules/stylistic.js +0 -74
- package/eslint/rules/tsdoc.js +0 -11
- package/eslint/rules/typescript/extension.js +0 -38
- package/eslint/rules/typescript/import.js +0 -16
- package/eslint/rules/typescript/index.js +0 -93
- package/eslint/rules/unicorn.js +0 -22
- package/eslint/rules/variables.js +0 -30
- package/eslint/rules/vitest.js +0 -16
- package/eslint/typescript.js +0 -23
- package/eslint/utils/require-package.js +0 -36
- package/eslint/vitest.js +0 -3
- package/prettier/index.js +0 -18
- package/typescript/tsconfig.base.json +0 -13
- package/typescript/tsconfig.node16.json +0 -12
- package/typescript/tsconfig.node18.json +0 -12
- package/typescript/tsconfig.node20.json +0 -12
@@ -0,0 +1,258 @@
|
|
1
|
+
import {
|
2
|
+
__commonJS,
|
3
|
+
init_esm_shims
|
4
|
+
} from "./chunk-4C4AR77R.js";
|
5
|
+
|
6
|
+
// node_modules/eslint-plugin-react-refresh/index.js
|
7
|
+
var require_eslint_plugin_react_refresh = __commonJS({
|
8
|
+
"node_modules/eslint-plugin-react-refresh/index.js"(exports, module) {
|
9
|
+
init_esm_shims();
|
10
|
+
var __defProp = Object.defineProperty;
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
14
|
+
var __export = (target, all) => {
|
15
|
+
for (var name in all)
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
17
|
+
};
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
20
|
+
for (let key of __getOwnPropNames(from))
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
23
|
+
}
|
24
|
+
return to;
|
25
|
+
};
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
27
|
+
var src_exports = {};
|
28
|
+
__export(src_exports, {
|
29
|
+
default: () => src_default,
|
30
|
+
rules: () => rules
|
31
|
+
});
|
32
|
+
module.exports = __toCommonJS(src_exports);
|
33
|
+
var possibleReactExportRE = /^[A-Z][a-zA-Z0-9]*$/u;
|
34
|
+
var strictReactExportRE = /^[A-Z][a-zA-Z0-9]*[a-z]+[a-zA-Z0-9]*$/u;
|
35
|
+
var onlyExportComponents = {
|
36
|
+
meta: {
|
37
|
+
messages: {
|
38
|
+
exportAll: "This rule can't verify that `export *` only exports components.",
|
39
|
+
namedExport: "Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components.",
|
40
|
+
anonymousExport: "Fast refresh can't handle anonymous components. Add a name to your export.",
|
41
|
+
localComponents: "Fast refresh only works when a file only exports components. Move your component(s) to a separate file.",
|
42
|
+
noExport: "Fast refresh only works when a file has exports. Move your component(s) to a separate file.",
|
43
|
+
reactContext: "Fast refresh only works when a file only exports components. Move your React context(s) to a separate file."
|
44
|
+
},
|
45
|
+
type: "problem",
|
46
|
+
schema: [
|
47
|
+
{
|
48
|
+
type: "object",
|
49
|
+
properties: {
|
50
|
+
allowConstantExport: { type: "boolean" },
|
51
|
+
checkJS: { type: "boolean" },
|
52
|
+
allowExportNames: { type: "array", items: { type: "string" } }
|
53
|
+
},
|
54
|
+
additionalProperties: false
|
55
|
+
}
|
56
|
+
]
|
57
|
+
},
|
58
|
+
defaultOptions: [],
|
59
|
+
create: (context) => {
|
60
|
+
const {
|
61
|
+
allowConstantExport = false,
|
62
|
+
checkJS = false,
|
63
|
+
allowExportNames
|
64
|
+
} = context.options[0] ?? {};
|
65
|
+
const filename = context.filename;
|
66
|
+
if (filename.includes(".test.") || filename.includes(".spec.") || filename.includes(".cy.") || filename.includes(".stories.")) {
|
67
|
+
return {};
|
68
|
+
}
|
69
|
+
const shouldScan = filename.endsWith(".jsx") || filename.endsWith(".tsx") || checkJS && filename.endsWith(".js");
|
70
|
+
if (!shouldScan)
|
71
|
+
return {};
|
72
|
+
const allowExportNamesSet = allowExportNames ? new Set(allowExportNames) : void 0;
|
73
|
+
return {
|
74
|
+
Program(program) {
|
75
|
+
let hasExports = false;
|
76
|
+
let mayHaveReactExport = false;
|
77
|
+
let reactIsInScope = false;
|
78
|
+
const localComponents = [];
|
79
|
+
const nonComponentExports = [];
|
80
|
+
const reactContextExports = [];
|
81
|
+
const handleLocalIdentifier = (identifierNode) => {
|
82
|
+
if (identifierNode.type !== "Identifier")
|
83
|
+
return;
|
84
|
+
if (possibleReactExportRE.test(identifierNode.name)) {
|
85
|
+
localComponents.push(identifierNode);
|
86
|
+
}
|
87
|
+
};
|
88
|
+
const handleExportIdentifier = (identifierNode, isFunction, init) => {
|
89
|
+
if (identifierNode.type !== "Identifier") {
|
90
|
+
nonComponentExports.push(identifierNode);
|
91
|
+
return;
|
92
|
+
}
|
93
|
+
if (allowExportNamesSet == null ? void 0 : allowExportNamesSet.has(identifierNode.name))
|
94
|
+
return;
|
95
|
+
if (allowConstantExport && init && (init.type === "Literal" || // 1, "foo"
|
96
|
+
init.type === "UnaryExpression" || // -1
|
97
|
+
init.type === "TemplateLiteral" || // `Some ${template}`
|
98
|
+
init.type === "BinaryExpression")) {
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
if (isFunction) {
|
102
|
+
if (possibleReactExportRE.test(identifierNode.name)) {
|
103
|
+
mayHaveReactExport = true;
|
104
|
+
} else {
|
105
|
+
nonComponentExports.push(identifierNode);
|
106
|
+
}
|
107
|
+
} else {
|
108
|
+
if (init && init.type === "CallExpression" && // createContext || React.createContext
|
109
|
+
(init.callee.type === "Identifier" && init.callee.name === "createContext" || init.callee.type === "MemberExpression" && init.callee.property.type === "Identifier" && init.callee.property.name === "createContext")) {
|
110
|
+
reactContextExports.push(identifierNode);
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
if (init && // Switch to allowList?
|
114
|
+
notReactComponentExpression.has(init.type)) {
|
115
|
+
nonComponentExports.push(identifierNode);
|
116
|
+
return;
|
117
|
+
}
|
118
|
+
if (!mayHaveReactExport && possibleReactExportRE.test(identifierNode.name)) {
|
119
|
+
mayHaveReactExport = true;
|
120
|
+
}
|
121
|
+
if (!strictReactExportRE.test(identifierNode.name)) {
|
122
|
+
nonComponentExports.push(identifierNode);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
};
|
126
|
+
const handleExportDeclaration = (node) => {
|
127
|
+
var _a, _b;
|
128
|
+
if (node.type === "VariableDeclaration") {
|
129
|
+
for (const variable of node.declarations) {
|
130
|
+
handleExportIdentifier(
|
131
|
+
variable.id,
|
132
|
+
canBeReactFunctionComponent(variable.init),
|
133
|
+
variable.init
|
134
|
+
);
|
135
|
+
}
|
136
|
+
} else if (node.type === "FunctionDeclaration") {
|
137
|
+
if (node.id === null) {
|
138
|
+
context.report({ messageId: "anonymousExport", node });
|
139
|
+
} else {
|
140
|
+
handleExportIdentifier(node.id, true);
|
141
|
+
}
|
142
|
+
} else if (node.type === "CallExpression") {
|
143
|
+
if (node.callee.type === "CallExpression" && node.callee.callee.type === "Identifier" && node.callee.callee.name === "connect") {
|
144
|
+
mayHaveReactExport = true;
|
145
|
+
} else if (node.callee.type !== "Identifier") {
|
146
|
+
if (node.callee.type === "MemberExpression" && node.callee.property.type === "Identifier" && reactHOCs.has(node.callee.property.name)) {
|
147
|
+
mayHaveReactExport = true;
|
148
|
+
} else {
|
149
|
+
context.report({ messageId: "anonymousExport", node });
|
150
|
+
}
|
151
|
+
} else if (!reactHOCs.has(node.callee.name)) {
|
152
|
+
context.report({ messageId: "anonymousExport", node });
|
153
|
+
} else if (((_a = node.arguments[0]) == null ? void 0 : _a.type) === "FunctionExpression" && node.arguments[0].id) {
|
154
|
+
handleExportIdentifier(node.arguments[0].id, true);
|
155
|
+
} else if (((_b = node.arguments[0]) == null ? void 0 : _b.type) === "Identifier") {
|
156
|
+
mayHaveReactExport = true;
|
157
|
+
} else {
|
158
|
+
context.report({ messageId: "anonymousExport", node });
|
159
|
+
}
|
160
|
+
} else if (node.type === "TSEnumDeclaration") {
|
161
|
+
nonComponentExports.push(node.id);
|
162
|
+
}
|
163
|
+
};
|
164
|
+
for (const node of program.body) {
|
165
|
+
if (node.type === "ExportAllDeclaration") {
|
166
|
+
if (node.exportKind === "type")
|
167
|
+
continue;
|
168
|
+
hasExports = true;
|
169
|
+
context.report({ messageId: "exportAll", node });
|
170
|
+
} else if (node.type === "ExportDefaultDeclaration") {
|
171
|
+
hasExports = true;
|
172
|
+
const declaration = node.declaration.type === "TSAsExpression" || node.declaration.type === "TSSatisfiesExpression" ? node.declaration.expression : node.declaration;
|
173
|
+
if (declaration.type === "VariableDeclaration" || declaration.type === "FunctionDeclaration" || declaration.type === "CallExpression") {
|
174
|
+
handleExportDeclaration(declaration);
|
175
|
+
}
|
176
|
+
if (declaration.type === "Identifier") {
|
177
|
+
handleExportIdentifier(declaration);
|
178
|
+
}
|
179
|
+
if (declaration.type === "ArrowFunctionExpression") {
|
180
|
+
context.report({ messageId: "anonymousExport", node });
|
181
|
+
}
|
182
|
+
} else if (node.type === "ExportNamedDeclaration") {
|
183
|
+
if (node.exportKind === "type")
|
184
|
+
continue;
|
185
|
+
hasExports = true;
|
186
|
+
if (node.declaration)
|
187
|
+
handleExportDeclaration(node.declaration);
|
188
|
+
for (const specifier of node.specifiers) {
|
189
|
+
handleExportIdentifier(
|
190
|
+
specifier.exported.type === "Identifier" && specifier.exported.name === "default" ? specifier.local : specifier.exported
|
191
|
+
);
|
192
|
+
}
|
193
|
+
} else if (node.type === "VariableDeclaration") {
|
194
|
+
for (const variable of node.declarations) {
|
195
|
+
handleLocalIdentifier(variable.id);
|
196
|
+
}
|
197
|
+
} else if (node.type === "FunctionDeclaration") {
|
198
|
+
handleLocalIdentifier(node.id);
|
199
|
+
} else if (node.type === "ImportDeclaration" && node.source.value === "react") {
|
200
|
+
reactIsInScope = true;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
if (checkJS && !reactIsInScope)
|
204
|
+
return;
|
205
|
+
if (hasExports) {
|
206
|
+
if (mayHaveReactExport) {
|
207
|
+
for (const node of nonComponentExports) {
|
208
|
+
context.report({ messageId: "namedExport", node });
|
209
|
+
}
|
210
|
+
for (const node of reactContextExports) {
|
211
|
+
context.report({ messageId: "reactContext", node });
|
212
|
+
}
|
213
|
+
} else if (localComponents.length) {
|
214
|
+
for (const node of localComponents) {
|
215
|
+
context.report({ messageId: "localComponents", node });
|
216
|
+
}
|
217
|
+
}
|
218
|
+
} else if (localComponents.length) {
|
219
|
+
for (const node of localComponents) {
|
220
|
+
context.report({ messageId: "noExport", node });
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}
|
224
|
+
};
|
225
|
+
}
|
226
|
+
};
|
227
|
+
var reactHOCs = /* @__PURE__ */ new Set(["memo", "forwardRef"]);
|
228
|
+
var canBeReactFunctionComponent = (init) => {
|
229
|
+
if (!init)
|
230
|
+
return false;
|
231
|
+
if (init.type === "ArrowFunctionExpression")
|
232
|
+
return true;
|
233
|
+
if (init.type === "CallExpression" && init.callee.type === "Identifier") {
|
234
|
+
return reactHOCs.has(init.callee.name);
|
235
|
+
}
|
236
|
+
return false;
|
237
|
+
};
|
238
|
+
var notReactComponentExpression = /* @__PURE__ */ new Set([
|
239
|
+
"ArrayExpression",
|
240
|
+
"AwaitExpression",
|
241
|
+
"BinaryExpression",
|
242
|
+
"ChainExpression",
|
243
|
+
"ConditionalExpression",
|
244
|
+
"Literal",
|
245
|
+
"LogicalExpression",
|
246
|
+
"ObjectExpression",
|
247
|
+
"TemplateLiteral",
|
248
|
+
"ThisExpression",
|
249
|
+
"UnaryExpression",
|
250
|
+
"UpdateExpression"
|
251
|
+
]);
|
252
|
+
var rules = {
|
253
|
+
"only-export-components": onlyExportComponents
|
254
|
+
};
|
255
|
+
var src_default = { rules };
|
256
|
+
}
|
257
|
+
});
|
258
|
+
export default require_eslint_plugin_react_refresh();
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// prettier-config/index.ts
|
21
|
+
var prettier_config_exports = {};
|
22
|
+
__export(prettier_config_exports, {
|
23
|
+
default: () => prettier_config_default
|
24
|
+
});
|
25
|
+
module.exports = __toCommonJS(prettier_config_exports);
|
26
|
+
var overridableDefaults = {
|
27
|
+
arrowParens: "always",
|
28
|
+
endOfLine: "lf",
|
29
|
+
printWidth: 80,
|
30
|
+
quoteProps: "as-needed",
|
31
|
+
semi: true,
|
32
|
+
tabWidth: 2,
|
33
|
+
trailingComma: "all",
|
34
|
+
useTabs: false
|
35
|
+
};
|
36
|
+
var prettier_config_default = {
|
37
|
+
...overridableDefaults,
|
38
|
+
importOrder: ["^@assets/(.*)$", "<THIRD_PARTY_MODULES>", "^@/(.*)$", "^[./]"],
|
39
|
+
importOrderSeparation: true,
|
40
|
+
importOrderSortSpecifiers: true,
|
41
|
+
plugins: [
|
42
|
+
"prettier-plugin-packagejson",
|
43
|
+
"@trivago/prettier-plugin-sort-imports",
|
44
|
+
"prettier-plugin-tailwindcss"
|
45
|
+
],
|
46
|
+
singleQuote: false
|
47
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
importOrder: string[];
|
3
|
+
importOrderSeparation: boolean;
|
4
|
+
importOrderSortSpecifiers: boolean;
|
5
|
+
plugins: string[];
|
6
|
+
singleQuote: false;
|
7
|
+
arrowParens: "always";
|
8
|
+
endOfLine: "lf";
|
9
|
+
printWidth: 80;
|
10
|
+
quoteProps: "as-needed";
|
11
|
+
semi: true;
|
12
|
+
tabWidth: 2;
|
13
|
+
trailingComma: "all";
|
14
|
+
useTabs: false;
|
15
|
+
};
|
16
|
+
|
17
|
+
export { _default as default };
|
@@ -0,0 +1,17 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
importOrder: string[];
|
3
|
+
importOrderSeparation: boolean;
|
4
|
+
importOrderSortSpecifiers: boolean;
|
5
|
+
plugins: string[];
|
6
|
+
singleQuote: false;
|
7
|
+
arrowParens: "always";
|
8
|
+
endOfLine: "lf";
|
9
|
+
printWidth: 80;
|
10
|
+
quoteProps: "as-needed";
|
11
|
+
semi: true;
|
12
|
+
tabWidth: 2;
|
13
|
+
trailingComma: "all";
|
14
|
+
useTabs: false;
|
15
|
+
};
|
16
|
+
|
17
|
+
export { _default as default };
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import {
|
2
|
+
init_esm_shims
|
3
|
+
} from "../chunk-4C4AR77R.js";
|
4
|
+
|
5
|
+
// prettier-config/index.ts
|
6
|
+
init_esm_shims();
|
7
|
+
var overridableDefaults = {
|
8
|
+
arrowParens: "always",
|
9
|
+
endOfLine: "lf",
|
10
|
+
printWidth: 80,
|
11
|
+
quoteProps: "as-needed",
|
12
|
+
semi: true,
|
13
|
+
tabWidth: 2,
|
14
|
+
trailingComma: "all",
|
15
|
+
useTabs: false
|
16
|
+
};
|
17
|
+
var prettier_config_default = {
|
18
|
+
...overridableDefaults,
|
19
|
+
importOrder: ["^@assets/(.*)$", "<THIRD_PARTY_MODULES>", "^@/(.*)$", "^[./]"],
|
20
|
+
importOrderSeparation: true,
|
21
|
+
importOrderSortSpecifiers: true,
|
22
|
+
plugins: [
|
23
|
+
"prettier-plugin-packagejson",
|
24
|
+
"@trivago/prettier-plugin-sort-imports",
|
25
|
+
"prettier-plugin-tailwindcss"
|
26
|
+
],
|
27
|
+
singleQuote: false
|
28
|
+
};
|
29
|
+
export {
|
30
|
+
prettier_config_default as default
|
31
|
+
};
|
package/package.json
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@solvro/config",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.3",
|
4
4
|
"description": "Solvro's engineering style guide",
|
5
|
+
"keywords": [
|
6
|
+
"eslint-config"
|
7
|
+
],
|
5
8
|
"homepage": "https://github.com/Solvro/lib-web-solvro-config#readme",
|
6
9
|
"bugs": {
|
7
10
|
"url": "https://github.com/Solvro/lib-web-solvro-config/issues"
|
@@ -11,85 +14,119 @@
|
|
11
14
|
"url": "https://github.com/Solvro/lib-web-solvro-config.git"
|
12
15
|
},
|
13
16
|
"license": "MPL-2.0",
|
17
|
+
"type": "module",
|
14
18
|
"exports": {
|
15
|
-
"
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
"./typescript/node18": "./typescript/tsconfig.node18.json",
|
20
|
-
"./typescript/node20": "./typescript/tsconfig.node20.json"
|
19
|
+
".": {
|
20
|
+
"import": "./dist/index.js",
|
21
|
+
"require": "./dist/index.cjs"
|
22
|
+
}
|
21
23
|
},
|
22
|
-
"main": "index.js",
|
24
|
+
"main": "./dist/index.js",
|
25
|
+
"types": "./dist/index.d.ts",
|
26
|
+
"bin": "./bin/index.js",
|
23
27
|
"files": [
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"typescript"
|
28
|
+
"bin",
|
29
|
+
"dist"
|
27
30
|
],
|
28
31
|
"scripts": {
|
32
|
+
"build": "npm run typegen && tsup --format esm,cjs --clean --dts",
|
33
|
+
"dev": "npx @eslint/config-inspector --config eslint.config.ts",
|
29
34
|
"format": "prettier --check .",
|
30
|
-
"lint": "eslint --
|
35
|
+
"lint": "eslint --flag unstable_ts_config .",
|
31
36
|
"prepare": "husky",
|
37
|
+
"prepublish": "npm run build",
|
32
38
|
"release": "semantic-release",
|
33
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
39
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
40
|
+
"typecheck": "tsc --noEmit",
|
41
|
+
"typegen": "tsx ./scripts/typegen.ts"
|
34
42
|
},
|
35
43
|
"lint-staged": {
|
36
44
|
"*": "prettier -w --ignore-unknown"
|
37
45
|
},
|
38
|
-
"prettier": "./prettier",
|
46
|
+
"prettier": "./dist/prettier-config/index.js",
|
39
47
|
"dependencies": {
|
40
|
-
"@
|
41
|
-
"@
|
42
|
-
"@
|
48
|
+
"@antfu/install-pkg": "^0.5.0",
|
49
|
+
"@clack/prompts": "^0.8.2",
|
50
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
51
|
+
"@eslint/markdown": "^6.2.1",
|
52
|
+
"@rushstack/eslint-patch": "^1.10.4",
|
53
|
+
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
54
|
+
"@typescript-eslint/eslint-plugin": "^8.16.0",
|
55
|
+
"@typescript-eslint/parser": "^8.16.0",
|
56
|
+
"@vitest/eslint-plugin": "^1.1.12",
|
57
|
+
"eslint-config-flat-gitignore": "^0.3.0",
|
43
58
|
"eslint-config-prettier": "^9.1.0",
|
59
|
+
"eslint-flat-config-utils": "^0.4.0",
|
44
60
|
"eslint-import-resolver-alias": "^1.1.2",
|
45
61
|
"eslint-import-resolver-typescript": "^3.6.3",
|
62
|
+
"eslint-merge-processors": "^0.1.0",
|
63
|
+
"eslint-plugin-antfu": "^2.7.0",
|
64
|
+
"eslint-plugin-command": "^0.2.6",
|
46
65
|
"eslint-plugin-import": "^2.31.0",
|
47
|
-
"eslint-plugin-jest": "^
|
66
|
+
"eslint-plugin-jest": "^28.9.0",
|
67
|
+
"eslint-plugin-jsdoc": "^50.6.0",
|
48
68
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
49
|
-
"eslint-plugin-
|
69
|
+
"eslint-plugin-n": "^17.14.0",
|
70
|
+
"eslint-plugin-no-only-tests": "^3.3.0",
|
71
|
+
"eslint-plugin-perfectionist": "^4.1.2",
|
72
|
+
"eslint-plugin-playwright": "^2.1.0",
|
50
73
|
"eslint-plugin-react": "^7.37.2",
|
51
|
-
"eslint-plugin-react-hooks": "^
|
52
|
-
"eslint-plugin-
|
74
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
75
|
+
"eslint-plugin-regexp": "^2.7.0",
|
76
|
+
"eslint-plugin-testing-library": "^7.0.0",
|
53
77
|
"eslint-plugin-tsdoc": "^0.4.0",
|
54
78
|
"eslint-plugin-unicorn": "^56.0.1",
|
55
|
-
"eslint-plugin-
|
56
|
-
"
|
57
|
-
"
|
79
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
80
|
+
"globals": "^15.12.0",
|
81
|
+
"parse-gitignore": "^2.0.0",
|
82
|
+
"prettier-plugin-packagejson": "^2.5.6",
|
83
|
+
"prettier-plugin-tailwindcss": "^0.6.9",
|
84
|
+
"yargs": "^17.7.2"
|
58
85
|
},
|
59
86
|
"devDependencies": {
|
60
87
|
"@commitlint/cli": "^19.6.0",
|
61
|
-
"@commitlint/config-conventional": "^19.0
|
88
|
+
"@commitlint/config-conventional": "^19.6.0",
|
89
|
+
"@eslint-react/eslint-plugin": "^1.17.1",
|
90
|
+
"@eslint/config-inspector": "^0.5.6",
|
62
91
|
"@semantic-release/git": "^10.0.1",
|
63
|
-
"
|
92
|
+
"@types/yargs": "^17.0.33",
|
93
|
+
"eslint": "^9.15.0",
|
94
|
+
"eslint-plugin-format": "^0.1.2",
|
95
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
96
|
+
"eslint-plugin-react-refresh": "^0.4.14",
|
97
|
+
"eslint-typegen": "^0.3.2",
|
64
98
|
"husky": "^9.1.7",
|
99
|
+
"jiti": "^2.4.1",
|
65
100
|
"lint-staged": "^15.2.10",
|
66
101
|
"prettier": "^3.4.1",
|
67
|
-
"semantic-release": "^
|
102
|
+
"semantic-release": "^24.2.0",
|
103
|
+
"tsup": "^8.3.5",
|
104
|
+
"tsx": "^4.19.2",
|
68
105
|
"typescript": "^5.7.2"
|
69
106
|
},
|
70
107
|
"peerDependencies": {
|
71
|
-
"@next/eslint-plugin-next": ">=12.3.0 <
|
72
|
-
"eslint": ">=
|
108
|
+
"@next/eslint-plugin-next": ">=12.3.0 <16.0.0-0",
|
109
|
+
"eslint": ">=9.0.0 <10",
|
73
110
|
"prettier": ">=3.0.0 <4",
|
74
111
|
"typescript": ">=4.8.0 <6"
|
75
112
|
},
|
76
113
|
"peerDependenciesMeta": {
|
77
|
-
"@
|
114
|
+
"@eslint-react/eslint-plugin": {
|
78
115
|
"optional": true
|
79
116
|
},
|
80
|
-
"eslint": {
|
117
|
+
"@unocss/eslint-plugin": {
|
81
118
|
"optional": true
|
82
119
|
},
|
83
|
-
"
|
120
|
+
"eslint-plugin-react-hooks": {
|
84
121
|
"optional": true
|
85
122
|
},
|
86
|
-
"
|
123
|
+
"eslint-plugin-react-refresh": {
|
87
124
|
"optional": true
|
88
125
|
}
|
89
126
|
},
|
90
|
-
"packageManager": "npm@10.
|
127
|
+
"packageManager": "npm@10.9.1",
|
91
128
|
"engines": {
|
92
|
-
"node": ">=
|
129
|
+
"node": ">=20"
|
93
130
|
},
|
94
131
|
"publishConfig": {
|
95
132
|
"access": "public"
|
package/eslint/_base.js
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
const { ECMA_VERSION } = require("./constants");
|
2
|
-
|
3
|
-
// See: https://github.com/eslint/eslint/issues/3458
|
4
|
-
require("@rushstack/eslint-patch/modern-module-resolution");
|
5
|
-
|
6
|
-
/**
|
7
|
-
* This is the base for both our browser and Node ESLint config files.
|
8
|
-
*/
|
9
|
-
module.exports = {
|
10
|
-
extends: [
|
11
|
-
"eslint:recommended",
|
12
|
-
"plugin:import/recommended",
|
13
|
-
"prettier",
|
14
|
-
require.resolve("./rules/best-practice"),
|
15
|
-
require.resolve("./rules/es6"),
|
16
|
-
require.resolve("./rules/import"),
|
17
|
-
require.resolve("./rules/possible-errors"),
|
18
|
-
require.resolve("./rules/stylistic"),
|
19
|
-
require.resolve("./rules/unicorn"),
|
20
|
-
require.resolve("./rules/variables"),
|
21
|
-
],
|
22
|
-
env: {
|
23
|
-
[`es${ECMA_VERSION}`]: true,
|
24
|
-
},
|
25
|
-
// Report unused `eslint-disable` comments.
|
26
|
-
reportUnusedDisableDirectives: true,
|
27
|
-
// Tell ESLint not to ignore dot-files, which are ignored by default.
|
28
|
-
ignorePatterns: ["!.*.js"],
|
29
|
-
// Global settings used by all overrides.
|
30
|
-
settings: {
|
31
|
-
// Use the Node resolver by default.
|
32
|
-
"import/resolver": { node: {} },
|
33
|
-
},
|
34
|
-
// Global parser options.
|
35
|
-
parserOptions: {
|
36
|
-
ecmaVersion: ECMA_VERSION,
|
37
|
-
sourceType: "module",
|
38
|
-
},
|
39
|
-
};
|
package/eslint/browser.js
DELETED
package/eslint/comments.js
DELETED
package/eslint/constants.js
DELETED
package/eslint/jest-react.js
DELETED
package/eslint/jest.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
const { TYPESCRIPT_FILES } = require("./constants");
|
2
|
-
|
3
|
-
module.exports = {
|
4
|
-
extends: ["plugin:jest/recommended", require.resolve("./rules/jest")],
|
5
|
-
overrides: [
|
6
|
-
// Prefer the Jest version of this rule. This silently fails when type
|
7
|
-
// information is not available.
|
8
|
-
{
|
9
|
-
files: TYPESCRIPT_FILES,
|
10
|
-
rules: {
|
11
|
-
"@typescript-eslint/unbound-method": "off",
|
12
|
-
"jest/unbound-method": "error",
|
13
|
-
},
|
14
|
-
},
|
15
|
-
],
|
16
|
-
};
|
package/eslint/next.js
DELETED
package/eslint/node.js
DELETED