@debbl/eslint-config 3.0.7 → 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 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-i"));
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 }
@@ -1504,18 +1488,23 @@ async function next() {
1504
1488
  }
1505
1489
  var react = async (options) => {
1506
1490
  const { next: enableNext = false, overrides = {} } = options;
1507
- const [pluginReact, pluginReactHooks] = await Promise.all([
1508
- // @ts-expect-error missing types
1509
- interopDefault(import("eslint-plugin-react")),
1510
- // @ts-expect-error missing types
1511
- interopDefault(import("eslint-plugin-react-hooks"))
1512
- ]);
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
+ );
1513
1501
  const _react = [
1514
1502
  {
1515
1503
  name: "eslint:react:setup",
1516
1504
  plugins: {
1517
1505
  "react": pluginReact,
1518
- "react-hooks": pluginReactHooks
1506
+ "react-hooks": pluginReactHooks,
1507
+ "react-refresh": pluginReactRefresh
1519
1508
  }
1520
1509
  },
1521
1510
  {
@@ -1537,6 +1526,8 @@ var react = async (options) => {
1537
1526
  rules: {
1538
1527
  ...pluginReact.configs.recommended.rules,
1539
1528
  ...pluginReactHooks.configs.recommended.rules,
1529
+ // React Refresh
1530
+ "react-refresh/only-export-components": "warn",
1540
1531
  "jsx-quotes": ["error", "prefer-double"],
1541
1532
  "react/react-in-jsx-scope": "off",
1542
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-i"));
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 }
@@ -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
- // @ts-expect-error missing types
1428
- interopDefault(import("eslint-plugin-react")),
1429
- // @ts-expect-error missing types
1430
- interopDefault(import("eslint-plugin-react-hooks"))
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@debbl/eslint-config",
3
3
  "type": "module",
4
- "version": "3.0.7",
4
+ "version": "3.1.0",
5
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/)",
@@ -24,7 +24,13 @@
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
36
  "@next/eslint-plugin-next": "^14.1.4",
@@ -35,7 +41,7 @@
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-i": "^2.29.1",
44
+ "eslint-plugin-import-x": "^0.5.0",
39
45
  "eslint-plugin-jsdoc": "^48.2.2",
40
46
  "eslint-plugin-jsonc": "^2.15.0",
41
47
  "eslint-plugin-markdown": "^4.0.1",
@@ -46,7 +52,7 @@
46
52
  "eslint-plugin-prettier": "^5.1.3",
47
53
  "eslint-plugin-react": "^7.34.1",
48
54
  "eslint-plugin-react-hooks": "^4.6.0",
49
- "eslint-plugin-tailwindcss": "^3.15.1",
55
+ "eslint-plugin-react-refresh": "^0.4.6",
50
56
  "eslint-plugin-toml": "^0.11.0",
51
57
  "eslint-plugin-unicorn": "^52.0.0",
52
58
  "eslint-plugin-unused-imports": "^3.1.0",
@@ -67,6 +73,7 @@
67
73
  "bumpp": "^9.4.0",
68
74
  "eslint": "^8.57.0",
69
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",