@lincy/eslint-config 5.5.0 → 5.5.2
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 +62 -23
- package/dist/index.d.cts +183 -141
- package/dist/index.d.ts +183 -141
- package/dist/index.js +62 -23
- package/package.json +32 -52
package/dist/index.cjs
CHANGED
|
@@ -1200,6 +1200,15 @@ async function perfectionist(options = {}) {
|
|
|
1200
1200
|
|
|
1201
1201
|
// src/configs/pnpm.ts
|
|
1202
1202
|
async function pnpm() {
|
|
1203
|
+
const [
|
|
1204
|
+
pluginPnpm,
|
|
1205
|
+
yamlParser,
|
|
1206
|
+
jsoncParser
|
|
1207
|
+
] = await Promise.all([
|
|
1208
|
+
interopDefault(import("eslint-plugin-pnpm")),
|
|
1209
|
+
interopDefault(import("yaml-eslint-parser")),
|
|
1210
|
+
interopDefault(import("jsonc-eslint-parser"))
|
|
1211
|
+
]);
|
|
1203
1212
|
return [
|
|
1204
1213
|
{
|
|
1205
1214
|
files: [
|
|
@@ -1207,16 +1216,30 @@ async function pnpm() {
|
|
|
1207
1216
|
"**/package.json"
|
|
1208
1217
|
],
|
|
1209
1218
|
languageOptions: {
|
|
1210
|
-
parser:
|
|
1219
|
+
parser: jsoncParser
|
|
1220
|
+
},
|
|
1221
|
+
name: "eslint/pnpm/package-json",
|
|
1222
|
+
plugins: {
|
|
1223
|
+
pnpm: pluginPnpm
|
|
1224
|
+
},
|
|
1225
|
+
rules: {
|
|
1226
|
+
"pnpm/json-enforce-catalog": "error",
|
|
1227
|
+
"pnpm/json-prefer-workspace-settings": "error",
|
|
1228
|
+
"pnpm/json-valid-catalog": "error"
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
files: ["pnpm-workspace.yaml"],
|
|
1233
|
+
languageOptions: {
|
|
1234
|
+
parser: yamlParser
|
|
1211
1235
|
},
|
|
1212
|
-
name: "eslint/pnpm/
|
|
1236
|
+
name: "eslint/pnpm/pnpm-workspace-yaml",
|
|
1213
1237
|
plugins: {
|
|
1214
|
-
pnpm:
|
|
1238
|
+
pnpm: pluginPnpm
|
|
1215
1239
|
},
|
|
1216
1240
|
rules: {
|
|
1217
|
-
"pnpm/
|
|
1218
|
-
"pnpm/
|
|
1219
|
-
"pnpm/valid-catalog": "error"
|
|
1241
|
+
"pnpm/yaml-no-duplicate-catalog-item": "error",
|
|
1242
|
+
"pnpm/yaml-no-unused-catalog-item": "error"
|
|
1220
1243
|
}
|
|
1221
1244
|
}
|
|
1222
1245
|
];
|
|
@@ -1302,22 +1325,29 @@ async function react(options = {}) {
|
|
|
1302
1325
|
},
|
|
1303
1326
|
name: "eslint/react/rules",
|
|
1304
1327
|
rules: {
|
|
1305
|
-
// recommended rules from
|
|
1306
|
-
"react-dom/no-
|
|
1307
|
-
"react-dom/no-dangerously-set-innerhtml": "off",
|
|
1328
|
+
// recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
|
|
1329
|
+
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
1308
1330
|
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
1309
1331
|
"react-dom/no-find-dom-node": "error",
|
|
1332
|
+
"react-dom/no-flush-sync": "error",
|
|
1333
|
+
"react-dom/no-hydrate": "error",
|
|
1310
1334
|
"react-dom/no-missing-button-type": "warn",
|
|
1311
1335
|
"react-dom/no-missing-iframe-sandbox": "warn",
|
|
1312
1336
|
"react-dom/no-namespace": "error",
|
|
1337
|
+
"react-dom/no-render": "error",
|
|
1313
1338
|
"react-dom/no-render-return-value": "error",
|
|
1314
1339
|
"react-dom/no-script-url": "warn",
|
|
1315
1340
|
"react-dom/no-unsafe-iframe-sandbox": "warn",
|
|
1316
1341
|
"react-dom/no-unsafe-target-blank": "warn",
|
|
1317
|
-
|
|
1342
|
+
"react-dom/no-use-form-state": "error",
|
|
1343
|
+
"react-dom/no-void-elements-with-children": "error",
|
|
1344
|
+
// recommended rules from eslint-plugin-react-hooks-extra https://eslint-react.xyz/docs/rules/overview#hooks-extra-rules
|
|
1345
|
+
"react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
1346
|
+
"react-hooks-extra/no-unnecessary-use-prefix": "warn",
|
|
1347
|
+
// recommended rules eslint-plugin-react-hooks https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks/src/rules
|
|
1318
1348
|
"react-hooks/exhaustive-deps": "warn",
|
|
1319
1349
|
"react-hooks/rules-of-hooks": "error",
|
|
1320
|
-
// react refresh
|
|
1350
|
+
// preconfigured rules from eslint-plugin-react-refresh https://github.com/ArnaudBarre/eslint-plugin-react-refresh/tree/main/src
|
|
1321
1351
|
"react-refresh/only-export-components": [
|
|
1322
1352
|
"warn",
|
|
1323
1353
|
{
|
|
@@ -1348,31 +1378,35 @@ async function react(options = {}) {
|
|
|
1348
1378
|
]
|
|
1349
1379
|
}
|
|
1350
1380
|
],
|
|
1351
|
-
// recommended rules from
|
|
1381
|
+
// recommended rules from eslint-plugin-react-web-api https://eslint-react.xyz/docs/rules/overview#web-api-rules
|
|
1352
1382
|
"react-web-api/no-leaked-event-listener": "warn",
|
|
1353
1383
|
"react-web-api/no-leaked-interval": "warn",
|
|
1354
1384
|
"react-web-api/no-leaked-resize-observer": "warn",
|
|
1355
1385
|
"react-web-api/no-leaked-timeout": "warn",
|
|
1356
|
-
// recommended rules from
|
|
1357
|
-
"react/ensure-forward-ref-using-ref": "warn",
|
|
1386
|
+
// recommended rules from eslint-plugin-react-x https://eslint-react.xyz/docs/rules/overview#core-rules
|
|
1358
1387
|
"react/no-access-state-in-setstate": "error",
|
|
1359
1388
|
"react/no-array-index-key": "warn",
|
|
1360
1389
|
"react/no-children-count": "warn",
|
|
1361
1390
|
"react/no-children-for-each": "warn",
|
|
1362
1391
|
"react/no-children-map": "warn",
|
|
1363
1392
|
"react/no-children-only": "warn",
|
|
1364
|
-
"react/no-children-prop": "warn",
|
|
1365
1393
|
"react/no-children-to-array": "warn",
|
|
1366
1394
|
"react/no-clone-element": "warn",
|
|
1367
1395
|
"react/no-comment-textnodes": "warn",
|
|
1368
1396
|
"react/no-component-will-mount": "error",
|
|
1369
1397
|
"react/no-component-will-receive-props": "error",
|
|
1370
1398
|
"react/no-component-will-update": "error",
|
|
1399
|
+
"react/no-context-provider": "warn",
|
|
1371
1400
|
"react/no-create-ref": "error",
|
|
1401
|
+
"react/no-default-props": "error",
|
|
1372
1402
|
"react/no-direct-mutation-state": "error",
|
|
1373
|
-
"react/no-duplicate-
|
|
1403
|
+
"react/no-duplicate-jsx-props": "warn",
|
|
1404
|
+
"react/no-duplicate-key": "warn",
|
|
1405
|
+
"react/no-forward-ref": "warn",
|
|
1406
|
+
"react/no-implicit-key": "warn",
|
|
1374
1407
|
"react/no-missing-key": "error",
|
|
1375
|
-
"react/no-nested-
|
|
1408
|
+
"react/no-nested-component-definitions": "error",
|
|
1409
|
+
"react/no-prop-types": "error",
|
|
1376
1410
|
"react/no-redundant-should-component-update": "error",
|
|
1377
1411
|
"react/no-set-state-in-component-did-mount": "warn",
|
|
1378
1412
|
"react/no-set-state-in-component-did-update": "warn",
|
|
@@ -1381,14 +1415,13 @@ async function react(options = {}) {
|
|
|
1381
1415
|
"react/no-unsafe-component-will-mount": "warn",
|
|
1382
1416
|
"react/no-unsafe-component-will-receive-props": "warn",
|
|
1383
1417
|
"react/no-unsafe-component-will-update": "warn",
|
|
1384
|
-
"react/no-unstable-context-value": "
|
|
1385
|
-
"react/no-unstable-default-props": "
|
|
1418
|
+
"react/no-unstable-context-value": "warn",
|
|
1419
|
+
"react/no-unstable-default-props": "warn",
|
|
1386
1420
|
"react/no-unused-class-component-members": "warn",
|
|
1387
1421
|
"react/no-unused-state": "warn",
|
|
1388
|
-
"react/no-
|
|
1389
|
-
"react/
|
|
1390
|
-
"react/
|
|
1391
|
-
"react/prefer-shorthand-fragment": "warn",
|
|
1422
|
+
"react/no-use-context": "warn",
|
|
1423
|
+
"react/no-useless-forward-ref": "warn",
|
|
1424
|
+
"react/use-jsx-vars": "warn",
|
|
1392
1425
|
// overrides
|
|
1393
1426
|
...overrides
|
|
1394
1427
|
}
|
|
@@ -1574,6 +1607,7 @@ function sortTsconfig() {
|
|
|
1574
1607
|
"useDefineForClassFields",
|
|
1575
1608
|
"emitDecoratorMetadata",
|
|
1576
1609
|
"experimentalDecorators",
|
|
1610
|
+
"libReplacement",
|
|
1577
1611
|
/* Modules */
|
|
1578
1612
|
"baseUrl",
|
|
1579
1613
|
"rootDir",
|
|
@@ -1647,6 +1681,7 @@ function sortTsconfig() {
|
|
|
1647
1681
|
"isolatedModules",
|
|
1648
1682
|
"preserveSymlinks",
|
|
1649
1683
|
"verbatimModuleSyntax",
|
|
1684
|
+
"erasableSyntaxOnly",
|
|
1650
1685
|
/* Completeness */
|
|
1651
1686
|
"skipDefaultLibCheck",
|
|
1652
1687
|
"skipLibCheck"
|
|
@@ -2288,6 +2323,10 @@ async function yaml(options = {}) {
|
|
|
2288
2323
|
"supportedArchitectures"
|
|
2289
2324
|
],
|
|
2290
2325
|
pathPattern: "^$"
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
order: { type: "asc" },
|
|
2329
|
+
pathPattern: ".*"
|
|
2291
2330
|
}
|
|
2292
2331
|
]
|
|
2293
2332
|
}
|