@biscuittin/eslint-config 0.3.2 → 0.4.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.d.ts +278 -266
- package/dist/index.js +28 -27
- package/package.json +28 -28
- package/typegen.d.ts +279 -260
package/dist/index.js
CHANGED
|
@@ -43,8 +43,7 @@ import { isPackageExists } from "local-pkg";
|
|
|
43
43
|
* Ref: https://github.com/antfu/eslint-config/blob/e283983d8cb72304424f67090a3e3bdccdf95c0d/src/utils.ts#L32
|
|
44
44
|
*/
|
|
45
45
|
async function combine(...configs$2) {
|
|
46
|
-
|
|
47
|
-
return resolved.flat();
|
|
46
|
+
return (await Promise.all(configs$2)).flat();
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
//#endregion
|
|
@@ -370,6 +369,7 @@ const parsers = {
|
|
|
370
369
|
parserPlain: eslintPluginFormat.parserPlain,
|
|
371
370
|
parserTypescript: parser
|
|
372
371
|
};
|
|
372
|
+
var parsers_default = parsers;
|
|
373
373
|
|
|
374
374
|
//#endregion
|
|
375
375
|
//#region src/configs/formatters.ts
|
|
@@ -444,7 +444,7 @@ async function formatters(options = {}) {
|
|
|
444
444
|
{
|
|
445
445
|
name: `${name$12.rules}/markdown`,
|
|
446
446
|
files: [GLOB_MARKDOWN],
|
|
447
|
-
languageOptions: { parser:
|
|
447
|
+
languageOptions: { parser: parsers_default["parserPlain"] },
|
|
448
448
|
rules: hasPlugin("markdown") ? { "format/dprint": ["error", {
|
|
449
449
|
language: getPluginUrl("markdown"),
|
|
450
450
|
languageOptions: {
|
|
@@ -457,7 +457,7 @@ async function formatters(options = {}) {
|
|
|
457
457
|
{
|
|
458
458
|
name: `${name$12.rules}/malva`,
|
|
459
459
|
files: [GLOB_STYLE, GLOB_POSTCSS],
|
|
460
|
-
languageOptions: { parser:
|
|
460
|
+
languageOptions: { parser: parsers_default["parserPlain"] },
|
|
461
461
|
rules: hasPlugin("malva") ? { "format/dprint": ["error", {
|
|
462
462
|
language: getPluginUrl("malva"),
|
|
463
463
|
languageOptions: {
|
|
@@ -473,7 +473,7 @@ async function formatters(options = {}) {
|
|
|
473
473
|
{
|
|
474
474
|
name: `${name$12.rules}/markup`,
|
|
475
475
|
files: [GLOB_HTML],
|
|
476
|
-
languageOptions: { parser:
|
|
476
|
+
languageOptions: { parser: parsers_default["parserPlain"] },
|
|
477
477
|
rules: hasPlugin("markup") ? { "format/dprint": ["error", {
|
|
478
478
|
language: getPluginUrl("markup"),
|
|
479
479
|
languageOptions: {
|
|
@@ -488,7 +488,7 @@ async function formatters(options = {}) {
|
|
|
488
488
|
{
|
|
489
489
|
name: `${name$12.rules}/yaml`,
|
|
490
490
|
files: [GLOB_YAML],
|
|
491
|
-
languageOptions: { parser:
|
|
491
|
+
languageOptions: { parser: parsers_default["parserPlain"] },
|
|
492
492
|
rules: hasPlugin("yaml") ? { "format/dprint": ["error", {
|
|
493
493
|
language: getPluginUrl("yaml"),
|
|
494
494
|
languageOptions: {
|
|
@@ -719,7 +719,7 @@ function json(options = {}) {
|
|
|
719
719
|
jsonc: pluginJsonc
|
|
720
720
|
},
|
|
721
721
|
language: "json/json",
|
|
722
|
-
languageOptions: { parser:
|
|
722
|
+
languageOptions: { parser: parsers_default["parserJsonc"] }
|
|
723
723
|
},
|
|
724
724
|
{
|
|
725
725
|
name: name$8.rules,
|
|
@@ -1199,9 +1199,12 @@ const configCommonRules = {
|
|
|
1199
1199
|
"jsx-a11y/role-supports-aria-props": "warn",
|
|
1200
1200
|
"jsx-a11y/tabindex-no-positive": "warn",
|
|
1201
1201
|
"@eslint-react/jsx-key-before-spread": "warn",
|
|
1202
|
+
"@eslint-react/jsx-no-comment-textnodes": "error",
|
|
1202
1203
|
"@eslint-react/jsx-no-duplicate-props": "error",
|
|
1203
1204
|
"@eslint-react/jsx-no-iife": "off",
|
|
1204
1205
|
"@eslint-react/jsx-no-undef": "off",
|
|
1206
|
+
"@eslint-react/jsx-shorthand-boolean": "off",
|
|
1207
|
+
"@eslint-react/jsx-shorthand-fragment": "off",
|
|
1205
1208
|
"@eslint-react/jsx-uses-react": "warn",
|
|
1206
1209
|
"@eslint-react/jsx-uses-vars": "warn",
|
|
1207
1210
|
"@eslint-react/no-access-state-in-setstate": "error",
|
|
@@ -1210,12 +1213,10 @@ const configCommonRules = {
|
|
|
1210
1213
|
"@eslint-react/no-children-for-each": "error",
|
|
1211
1214
|
"@eslint-react/no-children-map": "warn",
|
|
1212
1215
|
"@eslint-react/no-children-only": "error",
|
|
1213
|
-
"@eslint-react/no-children-prop": "
|
|
1216
|
+
"@eslint-react/no-children-prop": "warn",
|
|
1214
1217
|
"@eslint-react/no-children-to-array": "error",
|
|
1215
|
-
"@eslint-react/no-class-component": "
|
|
1218
|
+
"@eslint-react/no-class-component": "error",
|
|
1216
1219
|
"@eslint-react/no-clone-element": "error",
|
|
1217
|
-
"@eslint-react/no-comment-textnodes": "error",
|
|
1218
|
-
"@eslint-react/no-complex-conditional-rendering": "off",
|
|
1219
1220
|
"@eslint-react/no-component-will-mount": "error",
|
|
1220
1221
|
"@eslint-react/no-component-will-receive-props": "error",
|
|
1221
1222
|
"@eslint-react/no-component-will-update": "error",
|
|
@@ -1224,6 +1225,7 @@ const configCommonRules = {
|
|
|
1224
1225
|
"@eslint-react/no-default-props": "error",
|
|
1225
1226
|
"@eslint-react/no-direct-mutation-state": "error",
|
|
1226
1227
|
"@eslint-react/no-duplicate-key": "error",
|
|
1228
|
+
"@eslint-react/no-forbidden-props": "off",
|
|
1227
1229
|
"@eslint-react/no-forward-ref": "warn",
|
|
1228
1230
|
"@eslint-react/no-implicit-key": "error",
|
|
1229
1231
|
"@eslint-react/no-leaked-conditional-rendering": "off",
|
|
@@ -1239,23 +1241,25 @@ const configCommonRules = {
|
|
|
1239
1241
|
"@eslint-react/no-set-state-in-component-did-update": "warn",
|
|
1240
1242
|
"@eslint-react/no-set-state-in-component-will-update": "warn",
|
|
1241
1243
|
"@eslint-react/no-string-refs": "error",
|
|
1244
|
+
"@eslint-react/no-unnecessary-key": "warn",
|
|
1245
|
+
"@eslint-react/no-unnecessary-use-callback": "error",
|
|
1246
|
+
"@eslint-react/no-unnecessary-use-memo": "error",
|
|
1247
|
+
"@eslint-react/no-unnecessary-use-prefix": "error",
|
|
1242
1248
|
"@eslint-react/no-unsafe-component-will-mount": "warn",
|
|
1243
1249
|
"@eslint-react/no-unsafe-component-will-receive-props": "warn",
|
|
1244
1250
|
"@eslint-react/no-unsafe-component-will-update": "warn",
|
|
1245
1251
|
"@eslint-react/no-unstable-context-value": "error",
|
|
1246
1252
|
"@eslint-react/no-unstable-default-props": "warn",
|
|
1247
1253
|
"@eslint-react/no-unused-class-component-members": "warn",
|
|
1254
|
+
"@eslint-react/no-unused-props": "off",
|
|
1248
1255
|
"@eslint-react/no-unused-state": "warn",
|
|
1249
1256
|
"@eslint-react/no-use-context": "warn",
|
|
1250
1257
|
"@eslint-react/no-useless-forward-ref": "error",
|
|
1251
1258
|
"@eslint-react/no-useless-fragment": "error",
|
|
1252
1259
|
"@eslint-react/prefer-destructuring-assignment": "off",
|
|
1253
|
-
"@eslint-react/prefer-
|
|
1260
|
+
"@eslint-react/prefer-namespace-import": "off",
|
|
1254
1261
|
"@eslint-react/prefer-read-only-props": "off",
|
|
1255
|
-
"@eslint-react/prefer-
|
|
1256
|
-
"@eslint-react/prefer-shorthand-fragment": "off",
|
|
1257
|
-
"@eslint-react/avoid-shorthand-boolean": "off",
|
|
1258
|
-
"@eslint-react/avoid-shorthand-fragment": "off",
|
|
1262
|
+
"@eslint-react/prefer-use-state-lazy-initialization": "warn",
|
|
1259
1263
|
"@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
|
|
1260
1264
|
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
1261
1265
|
"@eslint-react/dom/no-find-dom-node": "error",
|
|
@@ -1267,21 +1271,18 @@ const configCommonRules = {
|
|
|
1267
1271
|
"@eslint-react/dom/no-render": "error",
|
|
1268
1272
|
"@eslint-react/dom/no-render-return-value": "error",
|
|
1269
1273
|
"@eslint-react/dom/no-script-url": "warn",
|
|
1274
|
+
"@eslint-react/dom/no-string-style-prop": "warn",
|
|
1270
1275
|
"@eslint-react/dom/no-unknown-property": "off",
|
|
1271
1276
|
"@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
|
|
1272
1277
|
"@eslint-react/dom/no-unsafe-target-blank": "off",
|
|
1273
1278
|
"@eslint-react/dom/no-use-form-state": "error",
|
|
1274
1279
|
"@eslint-react/dom/no-void-elements-with-children": "error",
|
|
1280
|
+
"@eslint-react/dom/prefer-namespace-import": "error",
|
|
1275
1281
|
"@eslint-react/web-api/no-leaked-event-listener": "error",
|
|
1276
1282
|
"@eslint-react/web-api/no-leaked-interval": "error",
|
|
1277
1283
|
"@eslint-react/web-api/no-leaked-resize-observer": "error",
|
|
1278
1284
|
"@eslint-react/web-api/no-leaked-timeout": "error",
|
|
1279
1285
|
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "error",
|
|
1280
|
-
"@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
|
|
1281
|
-
"@eslint-react/hooks-extra/no-unnecessary-use-callback": "error",
|
|
1282
|
-
"@eslint-react/hooks-extra/no-unnecessary-use-memo": "error",
|
|
1283
|
-
"@eslint-react/hooks-extra/no-unnecessary-use-prefix": "error",
|
|
1284
|
-
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
|
1285
1286
|
"@eslint-react/naming-convention/component-name": "warn",
|
|
1286
1287
|
"@eslint-react/naming-convention/context-name": "warn",
|
|
1287
1288
|
"@eslint-react/naming-convention/filename": "off",
|
|
@@ -1295,11 +1296,9 @@ const configStylistic = {
|
|
|
1295
1296
|
plugins: { "@stylistic": pluginStylistic },
|
|
1296
1297
|
rules: {
|
|
1297
1298
|
"@eslint-react/prefer-destructuring-assignment": "error",
|
|
1298
|
-
"@eslint-react/prefer-
|
|
1299
|
-
"@eslint-react/
|
|
1300
|
-
"@eslint-react/
|
|
1301
|
-
"@eslint-react/avoid-shorthand-boolean": "off",
|
|
1302
|
-
"@eslint-react/avoid-shorthand-fragment": "error",
|
|
1299
|
+
"@eslint-react/prefer-namespace-import": "warn",
|
|
1300
|
+
"@eslint-react/jsx-shorthand-boolean": "error",
|
|
1301
|
+
"@eslint-react/jsx-shorthand-fragment": "off",
|
|
1303
1302
|
"@eslint-react/naming-convention/filename": "off",
|
|
1304
1303
|
"@stylistic/jsx-closing-bracket-location": "error",
|
|
1305
1304
|
"@stylistic/jsx-closing-tag-location": "error",
|
|
@@ -1349,11 +1348,13 @@ const configTypeCheck = {
|
|
|
1349
1348
|
files: [GLOB_TS, GLOB_TSX],
|
|
1350
1349
|
plugins: { "@typescript-eslint": pluginTypescript$1 },
|
|
1351
1350
|
rules: {
|
|
1351
|
+
"@eslint-react/dom/no-string-style-prop": "off",
|
|
1352
1352
|
"@eslint-react/dom/no-unknown-property": "off",
|
|
1353
1353
|
"@eslint-react/jsx-no-duplicate-props": "off",
|
|
1354
1354
|
"@eslint-react/jsx-uses-react": "off",
|
|
1355
1355
|
"@eslint-react/jsx-uses-vars": "off",
|
|
1356
1356
|
"@eslint-react/no-leaked-conditional-rendering": "error",
|
|
1357
|
+
"@eslint-react/no-unused-props": "warn",
|
|
1357
1358
|
"@eslint-react/prefer-read-only-props": "warn",
|
|
1358
1359
|
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: { attributes: false } }]
|
|
1359
1360
|
}
|
|
@@ -1466,7 +1467,7 @@ function typescript(options = {}) {
|
|
|
1466
1467
|
languageOptions: {
|
|
1467
1468
|
sourceType: "module",
|
|
1468
1469
|
ecmaVersion: "latest",
|
|
1469
|
-
parser:
|
|
1470
|
+
parser: parsers_default["parserTypescript"],
|
|
1470
1471
|
parserOptions: {
|
|
1471
1472
|
ecmaVersion: "latest",
|
|
1472
1473
|
extraFileExtensions,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biscuittin/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "A collection of ESLint configurations for Biscuit Tin projects.",
|
|
6
6
|
"author": "Biscuit Tin <opensource@biscuitt.in>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -60,48 +60,48 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
63
|
-
"@eslint-sukka/eslint-plugin-react-jsx-a11y": "^
|
|
64
|
-
"@eslint/js": "^9.
|
|
65
|
-
"@eslint/json": "^0.13.
|
|
66
|
-
"@next/eslint-plugin-next": "^15.5.
|
|
67
|
-
"@package-json/types": "^0.0.
|
|
68
|
-
"@stylistic/eslint-plugin": "^5.
|
|
63
|
+
"@eslint-sukka/eslint-plugin-react-jsx-a11y": "^7.2.1",
|
|
64
|
+
"@eslint/js": "^9.36.0",
|
|
65
|
+
"@eslint/json": "^0.13.2",
|
|
66
|
+
"@next/eslint-plugin-next": "^15.5.4",
|
|
67
|
+
"@package-json/types": "^0.0.12",
|
|
68
|
+
"@stylistic/eslint-plugin": "^5.4.0",
|
|
69
69
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
70
|
-
"eslint-flat-config-utils": "^2.1.
|
|
70
|
+
"eslint-flat-config-utils": "^2.1.4",
|
|
71
71
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
72
72
|
"eslint-plugin-antfu": "^3.1.1",
|
|
73
73
|
"eslint-plugin-autofix": "^2.2.0",
|
|
74
|
-
"eslint-plugin-better-tailwindcss": "^3.7.
|
|
75
|
-
"eslint-plugin-format": "
|
|
74
|
+
"eslint-plugin-better-tailwindcss": "^3.7.9",
|
|
75
|
+
"eslint-plugin-format": "1.0.1",
|
|
76
76
|
"eslint-plugin-import-x": "^4.16.1",
|
|
77
77
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
78
|
-
"eslint-plugin-n": "^17.
|
|
78
|
+
"eslint-plugin-n": "^17.23.1",
|
|
79
79
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
80
80
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
81
|
-
"eslint-plugin-react-dom": "^
|
|
81
|
+
"eslint-plugin-react-dom": "^2.0.1",
|
|
82
82
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
83
|
-
"eslint-plugin-react-hooks-extra": "^
|
|
84
|
-
"eslint-plugin-react-naming-convention": "^
|
|
85
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
86
|
-
"eslint-plugin-react-web-api": "^
|
|
87
|
-
"eslint-plugin-react-x": "^
|
|
83
|
+
"eslint-plugin-react-hooks-extra": "^2.0.1",
|
|
84
|
+
"eslint-plugin-react-naming-convention": "^2.0.1",
|
|
85
|
+
"eslint-plugin-react-refresh": "^0.4.22",
|
|
86
|
+
"eslint-plugin-react-web-api": "^2.0.1",
|
|
87
|
+
"eslint-plugin-react-x": "^2.0.1",
|
|
88
88
|
"eslint-plugin-regexp": "^2.10.0",
|
|
89
|
-
"eslint-plugin-unicorn": "^
|
|
89
|
+
"eslint-plugin-unicorn": "^61.0.2",
|
|
90
90
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
91
|
-
"find-up": "^
|
|
92
|
-
"globals": "^16.
|
|
93
|
-
"jsonc-eslint-parser": "^2.4.
|
|
91
|
+
"find-up": "^8.0.0",
|
|
92
|
+
"globals": "^16.4.0",
|
|
93
|
+
"jsonc-eslint-parser": "^2.4.1",
|
|
94
94
|
"local-pkg": "^1.1.2",
|
|
95
|
-
"typescript-eslint": "^8.
|
|
95
|
+
"typescript-eslint": "^8.44.1"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@eslint/config-inspector": "^1.
|
|
99
|
-
"@typescript-eslint/parser": "^8.
|
|
100
|
-
"dprint": "^0.50.
|
|
101
|
-
"eslint": "^9.
|
|
102
|
-
"tailwindcss": "^4.1.
|
|
98
|
+
"@eslint/config-inspector": "^1.3.0",
|
|
99
|
+
"@typescript-eslint/parser": "^8.44.1",
|
|
100
|
+
"dprint": "^0.50.2",
|
|
101
|
+
"eslint": "^9.36.0",
|
|
102
|
+
"tailwindcss": "^4.1.13",
|
|
103
103
|
"ts-api-utils": "^2.1.0",
|
|
104
|
-
"typescript": "^5.
|
|
104
|
+
"typescript": "^5.9.2"
|
|
105
105
|
},
|
|
106
106
|
"scripts": {
|
|
107
107
|
"build": "tsdown",
|