@debbl/eslint-config 3.0.6 → 3.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/index.cjs +17 -31
- package/dist/index.js +17 -26
- package/package.json +36 -29
package/dist/index.cjs
CHANGED
|
@@ -212,7 +212,7 @@ async function interopDefault(m) {
|
|
|
212
212
|
|
|
213
213
|
// src/configs/imports.ts
|
|
214
214
|
async function imports() {
|
|
215
|
-
const pluginImport = await interopDefault(import("eslint-plugin-
|
|
215
|
+
const pluginImport = await interopDefault(import("eslint-plugin-import-x"));
|
|
216
216
|
return [
|
|
217
217
|
{
|
|
218
218
|
name: "eslint:imports",
|
|
@@ -226,23 +226,7 @@ async function imports() {
|
|
|
226
226
|
"import/no-named-default": "error",
|
|
227
227
|
"import/no-self-import": "error",
|
|
228
228
|
"import/no-webpack-loader-syntax": "error",
|
|
229
|
-
"import/order":
|
|
230
|
-
"error",
|
|
231
|
-
{
|
|
232
|
-
groups: [
|
|
233
|
-
"builtin",
|
|
234
|
-
"external",
|
|
235
|
-
"internal",
|
|
236
|
-
"parent",
|
|
237
|
-
"sibling",
|
|
238
|
-
"index",
|
|
239
|
-
"object",
|
|
240
|
-
"type"
|
|
241
|
-
],
|
|
242
|
-
pathGroups: [{ group: "internal", pattern: "{{@,~}/,#}**" }],
|
|
243
|
-
pathGroupsExcludedImportTypes: ["type"]
|
|
244
|
-
}
|
|
245
|
-
],
|
|
229
|
+
"import/order": "error",
|
|
246
230
|
"import/newline-after-import": [
|
|
247
231
|
"error",
|
|
248
232
|
{ considerComments: true, count: 1 }
|
|
@@ -344,7 +328,7 @@ var javascript = async (options) => {
|
|
|
344
328
|
"no-multi-str": "error",
|
|
345
329
|
"no-new": "error",
|
|
346
330
|
"no-new-func": "error",
|
|
347
|
-
"no-new-
|
|
331
|
+
"no-new-native-nonconstructor": "error",
|
|
348
332
|
"no-new-wrappers": "error",
|
|
349
333
|
"no-obj-calls": "error",
|
|
350
334
|
"no-octal": "error",
|
|
@@ -1386,11 +1370,6 @@ var prettier = async (options) => {
|
|
|
1386
1370
|
interopDefault(import("eslint-parser-plain"))
|
|
1387
1371
|
]);
|
|
1388
1372
|
const PlainFileRules = [
|
|
1389
|
-
{
|
|
1390
|
-
name: "eslint:prettier:json",
|
|
1391
|
-
files: [GLOB_JSON, GLOB_JSONC, GLOB_JSON5],
|
|
1392
|
-
parser: "json"
|
|
1393
|
-
},
|
|
1394
1373
|
{
|
|
1395
1374
|
name: "eslint:prettier:markdown",
|
|
1396
1375
|
files: [GLOB_MARKDOWN],
|
|
@@ -1509,18 +1488,23 @@ async function next() {
|
|
|
1509
1488
|
}
|
|
1510
1489
|
var react = async (options) => {
|
|
1511
1490
|
const { next: enableNext = false, overrides = {} } = options;
|
|
1512
|
-
const [pluginReact, pluginReactHooks] = await Promise.all(
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1491
|
+
const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all(
|
|
1492
|
+
[
|
|
1493
|
+
// @ts-expect-error missing types
|
|
1494
|
+
interopDefault(import("eslint-plugin-react")),
|
|
1495
|
+
// @ts-expect-error missing types
|
|
1496
|
+
interopDefault(import("eslint-plugin-react-hooks")),
|
|
1497
|
+
// @ts-expect-error missing types
|
|
1498
|
+
interopDefault(import("eslint-plugin-react-refresh"))
|
|
1499
|
+
]
|
|
1500
|
+
);
|
|
1518
1501
|
const _react = [
|
|
1519
1502
|
{
|
|
1520
1503
|
name: "eslint:react:setup",
|
|
1521
1504
|
plugins: {
|
|
1522
1505
|
"react": pluginReact,
|
|
1523
|
-
"react-hooks": pluginReactHooks
|
|
1506
|
+
"react-hooks": pluginReactHooks,
|
|
1507
|
+
"react-refresh": pluginReactRefresh
|
|
1524
1508
|
}
|
|
1525
1509
|
},
|
|
1526
1510
|
{
|
|
@@ -1542,6 +1526,8 @@ var react = async (options) => {
|
|
|
1542
1526
|
rules: {
|
|
1543
1527
|
...pluginReact.configs.recommended.rules,
|
|
1544
1528
|
...pluginReactHooks.configs.recommended.rules,
|
|
1529
|
+
// React Refresh
|
|
1530
|
+
"react-refresh/only-export-components": "warn",
|
|
1545
1531
|
"jsx-quotes": ["error", "prefer-double"],
|
|
1546
1532
|
"react/react-in-jsx-scope": "off",
|
|
1547
1533
|
"react/jsx-indent": [1, 2],
|
package/dist/index.js
CHANGED
|
@@ -131,7 +131,7 @@ async function interopDefault(m) {
|
|
|
131
131
|
|
|
132
132
|
// src/configs/imports.ts
|
|
133
133
|
async function imports() {
|
|
134
|
-
const pluginImport = await interopDefault(import("eslint-plugin-
|
|
134
|
+
const pluginImport = await interopDefault(import("eslint-plugin-import-x"));
|
|
135
135
|
return [
|
|
136
136
|
{
|
|
137
137
|
name: "eslint:imports",
|
|
@@ -145,23 +145,7 @@ async function imports() {
|
|
|
145
145
|
"import/no-named-default": "error",
|
|
146
146
|
"import/no-self-import": "error",
|
|
147
147
|
"import/no-webpack-loader-syntax": "error",
|
|
148
|
-
"import/order":
|
|
149
|
-
"error",
|
|
150
|
-
{
|
|
151
|
-
groups: [
|
|
152
|
-
"builtin",
|
|
153
|
-
"external",
|
|
154
|
-
"internal",
|
|
155
|
-
"parent",
|
|
156
|
-
"sibling",
|
|
157
|
-
"index",
|
|
158
|
-
"object",
|
|
159
|
-
"type"
|
|
160
|
-
],
|
|
161
|
-
pathGroups: [{ group: "internal", pattern: "{{@,~}/,#}**" }],
|
|
162
|
-
pathGroupsExcludedImportTypes: ["type"]
|
|
163
|
-
}
|
|
164
|
-
],
|
|
148
|
+
"import/order": "error",
|
|
165
149
|
"import/newline-after-import": [
|
|
166
150
|
"error",
|
|
167
151
|
{ considerComments: true, count: 1 }
|
|
@@ -263,7 +247,7 @@ var javascript = async (options) => {
|
|
|
263
247
|
"no-multi-str": "error",
|
|
264
248
|
"no-new": "error",
|
|
265
249
|
"no-new-func": "error",
|
|
266
|
-
"no-new-
|
|
250
|
+
"no-new-native-nonconstructor": "error",
|
|
267
251
|
"no-new-wrappers": "error",
|
|
268
252
|
"no-obj-calls": "error",
|
|
269
253
|
"no-octal": "error",
|
|
@@ -1423,18 +1407,23 @@ async function next() {
|
|
|
1423
1407
|
}
|
|
1424
1408
|
var react = async (options) => {
|
|
1425
1409
|
const { next: enableNext = false, overrides = {} } = options;
|
|
1426
|
-
const [pluginReact, pluginReactHooks] = await Promise.all(
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1410
|
+
const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all(
|
|
1411
|
+
[
|
|
1412
|
+
// @ts-expect-error missing types
|
|
1413
|
+
interopDefault(import("eslint-plugin-react")),
|
|
1414
|
+
// @ts-expect-error missing types
|
|
1415
|
+
interopDefault(import("eslint-plugin-react-hooks")),
|
|
1416
|
+
// @ts-expect-error missing types
|
|
1417
|
+
interopDefault(import("eslint-plugin-react-refresh"))
|
|
1418
|
+
]
|
|
1419
|
+
);
|
|
1432
1420
|
const _react = [
|
|
1433
1421
|
{
|
|
1434
1422
|
name: "eslint:react:setup",
|
|
1435
1423
|
plugins: {
|
|
1436
1424
|
"react": pluginReact,
|
|
1437
|
-
"react-hooks": pluginReactHooks
|
|
1425
|
+
"react-hooks": pluginReactHooks,
|
|
1426
|
+
"react-refresh": pluginReactRefresh
|
|
1438
1427
|
}
|
|
1439
1428
|
},
|
|
1440
1429
|
{
|
|
@@ -1456,6 +1445,8 @@ var react = async (options) => {
|
|
|
1456
1445
|
rules: {
|
|
1457
1446
|
...pluginReact.configs.recommended.rules,
|
|
1458
1447
|
...pluginReactHooks.configs.recommended.rules,
|
|
1448
|
+
// React Refresh
|
|
1449
|
+
"react-refresh/only-export-components": "warn",
|
|
1459
1450
|
"jsx-quotes": ["error", "prefer-double"],
|
|
1460
1451
|
"react/react-in-jsx-scope": "off",
|
|
1461
1452
|
"react/jsx-indent": [1, 2],
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debbl/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0
|
|
5
|
-
"packageManager": "pnpm@8.15.
|
|
4
|
+
"version": "3.1.0",
|
|
5
|
+
"packageManager": "pnpm@8.15.6",
|
|
6
6
|
"description": "Brendan Dash's ESLint config",
|
|
7
7
|
"author": "Debbl <me@aiwan.run> (https://github.com/Debbl/)",
|
|
8
8
|
"license": "MIT",
|
|
@@ -24,36 +24,42 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"eslint": ">=8.40.0"
|
|
27
|
+
"eslint": ">=8.40.0",
|
|
28
|
+
"eslint-plugin-tailwindcss": "^3.15.1"
|
|
29
|
+
},
|
|
30
|
+
"peerDependenciesMeta": {
|
|
31
|
+
"eslint-plugin-tailwindcss": {
|
|
32
|
+
"optional": true
|
|
33
|
+
}
|
|
28
34
|
},
|
|
29
35
|
"dependencies": {
|
|
30
|
-
"@next/eslint-plugin-next": "^14.1.
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
32
|
-
"@typescript-eslint/parser": "^
|
|
36
|
+
"@next/eslint-plugin-next": "^14.1.4",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
38
|
+
"@typescript-eslint/parser": "^7.5.0",
|
|
33
39
|
"eslint-config-prettier": "^9.1.0",
|
|
34
40
|
"eslint-define-config": "^2.1.0",
|
|
35
41
|
"eslint-mdx": "^3.1.5",
|
|
36
42
|
"eslint-parser-plain": "^0.1.0",
|
|
37
43
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
38
|
-
"eslint-plugin-
|
|
39
|
-
"eslint-plugin-jsdoc": "^48.
|
|
40
|
-
"eslint-plugin-jsonc": "^2.
|
|
41
|
-
"eslint-plugin-markdown": "^
|
|
44
|
+
"eslint-plugin-import-x": "^0.5.0",
|
|
45
|
+
"eslint-plugin-jsdoc": "^48.2.2",
|
|
46
|
+
"eslint-plugin-jsonc": "^2.15.0",
|
|
47
|
+
"eslint-plugin-markdown": "^4.0.1",
|
|
42
48
|
"eslint-plugin-mdx": "^3.1.5",
|
|
43
49
|
"eslint-plugin-n": "^16.6.2",
|
|
44
50
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
45
|
-
"eslint-plugin-perfectionist": "^2.
|
|
51
|
+
"eslint-plugin-perfectionist": "^2.8.0",
|
|
46
52
|
"eslint-plugin-prettier": "^5.1.3",
|
|
47
|
-
"eslint-plugin-react": "^7.
|
|
53
|
+
"eslint-plugin-react": "^7.34.1",
|
|
48
54
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
|
-
"eslint-plugin-
|
|
50
|
-
"eslint-plugin-toml": "^0.
|
|
51
|
-
"eslint-plugin-unicorn": "^
|
|
52
|
-
"eslint-plugin-unused-imports": "^3.
|
|
53
|
-
"eslint-plugin-vitest": "^0.
|
|
54
|
-
"eslint-plugin-vue": "^9.
|
|
55
|
-
"eslint-plugin-yml": "^1.
|
|
56
|
-
"globals": "^
|
|
55
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
56
|
+
"eslint-plugin-toml": "^0.11.0",
|
|
57
|
+
"eslint-plugin-unicorn": "^52.0.0",
|
|
58
|
+
"eslint-plugin-unused-imports": "^3.1.0",
|
|
59
|
+
"eslint-plugin-vitest": "^0.4.1",
|
|
60
|
+
"eslint-plugin-vue": "^9.24.0",
|
|
61
|
+
"eslint-plugin-yml": "^1.14.0",
|
|
62
|
+
"globals": "^15.0.0",
|
|
57
63
|
"jsonc-eslint-parser": "^2.4.0",
|
|
58
64
|
"prettier": "^3.2.5",
|
|
59
65
|
"toml-eslint-parser": "^0.9.3",
|
|
@@ -61,20 +67,21 @@
|
|
|
61
67
|
"yaml-eslint-parser": "^1.2.2"
|
|
62
68
|
},
|
|
63
69
|
"devDependencies": {
|
|
64
|
-
"@types/eslint": "^8.56.
|
|
65
|
-
"@types/node": "^20.
|
|
66
|
-
"@types/react": "^18.2.
|
|
67
|
-
"bumpp": "^9.
|
|
68
|
-
"eslint": "^8.
|
|
69
|
-
"eslint-flat-config-viewer": "^0.1.
|
|
70
|
+
"@types/eslint": "^8.56.7",
|
|
71
|
+
"@types/node": "^20.12.4",
|
|
72
|
+
"@types/react": "^18.2.74",
|
|
73
|
+
"bumpp": "^9.4.0",
|
|
74
|
+
"eslint": "^8.57.0",
|
|
75
|
+
"eslint-flat-config-viewer": "^0.1.20",
|
|
76
|
+
"eslint-plugin-tailwindcss": "^3.15.1",
|
|
70
77
|
"execa": "^8.0.1",
|
|
71
78
|
"fast-glob": "^3.3.2",
|
|
72
79
|
"fs-extra": "^11.2.0",
|
|
73
80
|
"react": "^18.2.0",
|
|
74
81
|
"sucrase": "^3.35.0",
|
|
75
|
-
"tsup": "^8.0.
|
|
76
|
-
"typescript": "^5.
|
|
77
|
-
"vitest": "^1.
|
|
82
|
+
"tsup": "^8.0.2",
|
|
83
|
+
"typescript": "^5.4.3",
|
|
84
|
+
"vitest": "^1.4.0"
|
|
78
85
|
},
|
|
79
86
|
"scripts": {
|
|
80
87
|
"build": "tsup --format esm,cjs --clean --dts",
|