@solvro/config 1.0.2 → 1.0.4

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.
Files changed (51) hide show
  1. package/bin/index.js +2 -0
  2. package/dist/chunk-4C4AR77R.js +65 -0
  3. package/dist/chunk-SND5ODI2.js +20878 -0
  4. package/dist/dist-2ZVVVZXY.js +35994 -0
  5. package/dist/eslint-config/cli.cjs +538 -0
  6. package/dist/eslint-config/cli.d.cts +2 -0
  7. package/dist/eslint-config/cli.d.ts +2 -0
  8. package/dist/eslint-config/cli.js +504 -0
  9. package/dist/eslint-config/index.cjs +73016 -0
  10. package/dist/eslint-config/index.d.cts +9489 -0
  11. package/dist/eslint-config/index.d.ts +9489 -0
  12. package/dist/eslint-config/index.js +15604 -0
  13. package/dist/eslint-plugin-react-refresh-MJ7ZDK5R.js +258 -0
  14. package/dist/prettier-config/index.cjs +47 -0
  15. package/dist/prettier-config/index.d.cts +17 -0
  16. package/dist/prettier-config/index.d.ts +17 -0
  17. package/{prettier → dist/prettier-config}/index.js +21 -19
  18. package/package.json +76 -34
  19. package/eslint/_base.js +0 -39
  20. package/eslint/browser.js +0 -6
  21. package/eslint/comments.js +0 -6
  22. package/eslint/constants.js +0 -4
  23. package/eslint/jest-react.js +0 -9
  24. package/eslint/jest.js +0 -16
  25. package/eslint/next.js +0 -18
  26. package/eslint/node.js +0 -6
  27. package/eslint/playwright-test.js +0 -7
  28. package/eslint/react.js +0 -16
  29. package/eslint/rules/best-practice.js +0 -227
  30. package/eslint/rules/es6.js +0 -65
  31. package/eslint/rules/import.js +0 -58
  32. package/eslint/rules/jest.js +0 -16
  33. package/eslint/rules/jsx-a11y.js +0 -14
  34. package/eslint/rules/playwright-test.js +0 -46
  35. package/eslint/rules/possible-errors.js +0 -35
  36. package/eslint/rules/react.js +0 -97
  37. package/eslint/rules/stylistic.js +0 -74
  38. package/eslint/rules/tsdoc.js +0 -11
  39. package/eslint/rules/typescript/extension.js +0 -38
  40. package/eslint/rules/typescript/import.js +0 -16
  41. package/eslint/rules/typescript/index.js +0 -93
  42. package/eslint/rules/unicorn.js +0 -22
  43. package/eslint/rules/variables.js +0 -30
  44. package/eslint/rules/vitest.js +0 -16
  45. package/eslint/typescript.js +0 -23
  46. package/eslint/utils/require-package.js +0 -36
  47. package/eslint/vitest.js +0 -3
  48. package/typescript/tsconfig.base.json +0 -13
  49. package/typescript/tsconfig.node16.json +0 -12
  50. package/typescript/tsconfig.node18.json +0 -12
  51. 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 };
@@ -1,29 +1,31 @@
1
- /**
2
- * Some of Prettier's defaults can be overridden by an EditorConfig file. We
3
- * define those here to ensure that doesn't happen.
4
- *
5
- * See: https://github.com/prettier/prettier/blob/main/docs/configuration.md#editorconfig
6
- */
7
- const overridableDefaults = {
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",
8
9
  endOfLine: "lf",
9
- tabWidth: 2,
10
10
  printWidth: 80,
11
- useTabs: false,
12
- arrowParens: "always",
13
- trailingComma: "all",
14
- semi: true,
15
11
  quoteProps: "as-needed",
12
+ semi: true,
13
+ tabWidth: 2,
14
+ trailingComma: "all",
15
+ useTabs: false
16
16
  };
17
-
18
- module.exports = {
17
+ var prettier_config_default = {
19
18
  ...overridableDefaults,
20
- singleQuote: false,
19
+ importOrder: ["^@assets/(.*)$", "<THIRD_PARTY_MODULES>", "^@/(.*)$", "^[./]"],
20
+ importOrderSeparation: true,
21
+ importOrderSortSpecifiers: true,
21
22
  plugins: [
22
23
  "prettier-plugin-packagejson",
23
24
  "@trivago/prettier-plugin-sort-imports",
24
- "prettier-plugin-tailwindcss",
25
+ "prettier-plugin-tailwindcss"
25
26
  ],
26
- importOrderSeparation: true,
27
- importOrderSortSpecifiers: true,
28
- importOrder: ["^@assets/(.*)$", "<THIRD_PARTY_MODULES>", "^@/(.*)$", "^[./]"],
27
+ singleQuote: false
28
+ };
29
+ export {
30
+ prettier_config_default as default
29
31
  };
package/package.json CHANGED
@@ -1,96 +1,138 @@
1
1
  {
2
2
  "name": "@solvro/config",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
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"
8
11
  },
9
12
  "repository": {
10
13
  "type": "git",
11
- "url": "https://github.com/Solvro/lib-web-solvro-config.git"
14
+ "url": "git+https://github.com/Solvro/lib-web-solvro-config.git"
12
15
  },
13
16
  "license": "MPL-2.0",
17
+ "type": "module",
14
18
  "exports": {
15
- "./eslint/*": "./eslint/*.js",
16
- "./prettier": "./prettier/index.js",
17
- "./typescript": "./typescript/tsconfig.base.json",
18
- "./typescript/node16": "./typescript/tsconfig.node16.json",
19
- "./typescript/node18": "./typescript/tsconfig.node18.json",
20
- "./typescript/node20": "./typescript/tsconfig.node20.json"
19
+ "./eslint": {
20
+ "import": "./dist/eslint-config/index.js",
21
+ "require": "./dist/eslint-config/index.cjs",
22
+ "types": "./dist/eslint-config/index.d.ts"
23
+ },
24
+ "./prettier": {
25
+ "import": "./dist/prettier-config/index.js",
26
+ "require": "./dist/prettier-config/index.cjs",
27
+ "types": "./dist/prettier-config/index.d.ts"
28
+ }
29
+ },
30
+ "bin": {
31
+ "config": "bin/index.js"
21
32
  },
22
- "main": "index.js",
23
33
  "files": [
24
- "eslint",
25
- "prettier",
26
- "typescript"
34
+ "bin",
35
+ "dist"
27
36
  ],
28
37
  "scripts": {
38
+ "build": "npm run typegen && tsup --format esm,cjs --clean --dts",
39
+ "dev": "npx @eslint/config-inspector --config eslint.config.ts",
29
40
  "format": "prettier --check .",
30
- "lint": "eslint --max-warnings=0 .",
41
+ "lint": "eslint --flag unstable_ts_config .",
31
42
  "prepare": "husky",
43
+ "prepublish": "npm run build",
32
44
  "release": "semantic-release",
33
- "test": "echo \"Error: no test specified\" && exit 1"
45
+ "test": "echo \"Error: no test specified\" && exit 1",
46
+ "typecheck": "tsc --noEmit",
47
+ "typegen": "tsx ./scripts/typegen.ts"
34
48
  },
35
49
  "lint-staged": {
36
50
  "*": "prettier -w --ignore-unknown"
37
51
  },
38
- "prettier": "./prettier",
52
+ "prettier": "./dist/prettier-config/index.js",
39
53
  "dependencies": {
54
+ "@antfu/install-pkg": "^0.5.0",
55
+ "@clack/prompts": "^0.8.2",
56
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
57
+ "@eslint/markdown": "^6.2.1",
40
58
  "@rushstack/eslint-patch": "^1.10.4",
41
59
  "@trivago/prettier-plugin-sort-imports": "^4.3.0",
42
- "@typescript-eslint/eslint-plugin": "^7.18.0",
43
- "@typescript-eslint/parser": "^7.18.0",
60
+ "@typescript-eslint/eslint-plugin": "^8.16.0",
61
+ "@typescript-eslint/parser": "^8.16.0",
62
+ "@vitest/eslint-plugin": "^1.1.12",
63
+ "eslint-config-flat-gitignore": "^0.3.0",
44
64
  "eslint-config-prettier": "^9.1.0",
65
+ "eslint-flat-config-utils": "^0.4.0",
45
66
  "eslint-import-resolver-alias": "^1.1.2",
46
67
  "eslint-import-resolver-typescript": "^3.6.3",
68
+ "eslint-merge-processors": "^0.1.0",
69
+ "eslint-plugin-antfu": "^2.7.0",
70
+ "eslint-plugin-command": "^0.2.6",
47
71
  "eslint-plugin-import": "^2.31.0",
48
- "eslint-plugin-jest": "^27.9.0",
72
+ "eslint-plugin-jest": "^28.9.0",
73
+ "eslint-plugin-jsdoc": "^50.6.0",
49
74
  "eslint-plugin-jsx-a11y": "^6.10.2",
50
- "eslint-plugin-playwright": "^1.8.3",
75
+ "eslint-plugin-n": "^17.14.0",
76
+ "eslint-plugin-no-only-tests": "^3.3.0",
77
+ "eslint-plugin-perfectionist": "^4.1.2",
78
+ "eslint-plugin-playwright": "^2.1.0",
51
79
  "eslint-plugin-react": "^7.37.2",
52
- "eslint-plugin-react-hooks": "^4.6.2",
53
- "eslint-plugin-testing-library": "^6.5.0",
80
+ "eslint-plugin-react-hooks": "^5.0.0",
81
+ "eslint-plugin-regexp": "^2.7.0",
82
+ "eslint-plugin-testing-library": "^7.0.0",
54
83
  "eslint-plugin-tsdoc": "^0.4.0",
55
84
  "eslint-plugin-unicorn": "^56.0.1",
56
- "eslint-plugin-vitest": "^0.3.26",
85
+ "eslint-plugin-unused-imports": "^4.1.4",
86
+ "globals": "^15.12.0",
87
+ "parse-gitignore": "^2.0.0",
57
88
  "prettier-plugin-packagejson": "^2.5.6",
58
- "prettier-plugin-tailwindcss": "^0.6.9"
89
+ "prettier-plugin-tailwindcss": "^0.6.9",
90
+ "yargs": "^17.7.2"
59
91
  },
60
92
  "devDependencies": {
61
93
  "@commitlint/cli": "^19.6.0",
62
- "@commitlint/config-conventional": "^19.0.3",
94
+ "@commitlint/config-conventional": "^19.6.0",
95
+ "@eslint-react/eslint-plugin": "^1.17.1",
96
+ "@eslint/config-inspector": "^0.5.6",
63
97
  "@semantic-release/git": "^10.0.1",
64
- "eslint": "^8.57.1",
98
+ "@types/yargs": "^17.0.33",
99
+ "eslint": "^9.15.0",
100
+ "eslint-plugin-format": "^0.1.2",
101
+ "eslint-plugin-react-hooks": "^5.0.0",
102
+ "eslint-plugin-react-refresh": "^0.4.14",
103
+ "eslint-typegen": "^0.3.2",
65
104
  "husky": "^9.1.7",
105
+ "jiti": "^2.4.1",
66
106
  "lint-staged": "^15.2.10",
67
107
  "prettier": "^3.4.1",
68
- "semantic-release": "^23.1.1",
108
+ "semantic-release": "^24.2.0",
109
+ "tsup": "^8.3.5",
110
+ "tsx": "^4.19.2",
69
111
  "typescript": "^5.7.2"
70
112
  },
71
113
  "peerDependencies": {
72
- "@next/eslint-plugin-next": ">=12.3.0 <15.0.0-0",
73
- "eslint": ">=8.48.0 <9",
114
+ "@next/eslint-plugin-next": ">=12.3.0 <16.0.0-0",
115
+ "eslint": ">=9.0.0 <10",
74
116
  "prettier": ">=3.0.0 <4",
75
117
  "typescript": ">=4.8.0 <6"
76
118
  },
77
119
  "peerDependenciesMeta": {
78
- "@next/eslint-plugin-next": {
120
+ "@eslint-react/eslint-plugin": {
79
121
  "optional": true
80
122
  },
81
- "eslint": {
123
+ "@unocss/eslint-plugin": {
82
124
  "optional": true
83
125
  },
84
- "prettier": {
126
+ "eslint-plugin-react-hooks": {
85
127
  "optional": true
86
128
  },
87
- "typescript": {
129
+ "eslint-plugin-react-refresh": {
88
130
  "optional": true
89
131
  }
90
132
  },
91
- "packageManager": "npm@10.8.2",
133
+ "packageManager": "npm@10.9.1",
92
134
  "engines": {
93
- "node": ">=18.18"
135
+ "node": ">=20"
94
136
  },
95
137
  "publishConfig": {
96
138
  "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
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: "./_base",
3
- env: {
4
- browser: true,
5
- },
6
- };
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: [
3
- "plugin:eslint-comments/recommended",
4
- require.resolve("./rules/comments"),
5
- ],
6
- };
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- ECMA_VERSION: 2021,
3
- TYPESCRIPT_FILES: ["*.ts?(x)"],
4
- };
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- plugins: ["testing-library"],
3
- extends: [
4
- require.resolve("./jest"),
5
- // We may want to separate this out in future, as it's only needed when
6
- // using React with Testing Library.
7
- "plugin:testing-library/react",
8
- ],
9
- };
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
- };