@meteorlxy/eslint-config 3.1.1 → 3.3.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/README.md +1 -0
- package/dist/index.cjs +245 -54
- package/dist/index.d.cts +1200 -10
- package/dist/index.d.mts +1200 -10
- package/dist/index.d.ts +1200 -10
- package/dist/index.mjs +245 -54
- package/package.json +6 -6
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -288,18 +288,6 @@ const builtinRules = {
|
|
|
288
288
|
"no-extra-bind": "error",
|
|
289
289
|
"no-extra-boolean-cast": "error",
|
|
290
290
|
"no-extra-label": "error",
|
|
291
|
-
"no-extra-parens": [
|
|
292
|
-
"off",
|
|
293
|
-
"all",
|
|
294
|
-
{
|
|
295
|
-
conditionalAssign: true,
|
|
296
|
-
nestedBinaryExpressions: false,
|
|
297
|
-
returnAssign: false,
|
|
298
|
-
ignoreJSX: "all",
|
|
299
|
-
enforceForArrowConditionals: false
|
|
300
|
-
}
|
|
301
|
-
],
|
|
302
|
-
"no-extra-semi": "error",
|
|
303
291
|
"no-fallthrough": "error",
|
|
304
292
|
"no-floating-decimal": "error",
|
|
305
293
|
"no-func-assign": "error",
|
|
@@ -595,6 +583,7 @@ const builtinRules = {
|
|
|
595
583
|
"one-var": ["error", "never"],
|
|
596
584
|
"operator-assignment": ["error", "always"],
|
|
597
585
|
"padding-line-between-statements": "off",
|
|
586
|
+
// deprecated
|
|
598
587
|
"prefer-arrow-callback": [
|
|
599
588
|
"error",
|
|
600
589
|
{
|
|
@@ -1133,6 +1122,42 @@ const reactRules = {
|
|
|
1133
1122
|
};
|
|
1134
1123
|
|
|
1135
1124
|
const typescriptShimRules = {
|
|
1125
|
+
/**
|
|
1126
|
+
* Rules that are checked by typescript or recommended to disable in typescript.
|
|
1127
|
+
*/
|
|
1128
|
+
"constructor-super": "off",
|
|
1129
|
+
"getter-return": "off",
|
|
1130
|
+
"no-const-assign": "off",
|
|
1131
|
+
"no-dupe-args": "off",
|
|
1132
|
+
"no-dupe-class-members": "off",
|
|
1133
|
+
"no-dupe-keys": "off",
|
|
1134
|
+
"no-func-assign": "off",
|
|
1135
|
+
"no-invalid-this": "off",
|
|
1136
|
+
"no-import-assign": "off",
|
|
1137
|
+
"no-new-symbol": "off",
|
|
1138
|
+
"no-obj-calls": "off",
|
|
1139
|
+
"no-redeclare": "off",
|
|
1140
|
+
"no-setter-return": "off",
|
|
1141
|
+
"no-this-before-super": "off",
|
|
1142
|
+
"no-undef": "off",
|
|
1143
|
+
"no-unreachable": "off",
|
|
1144
|
+
"no-unsafe-negation": "off",
|
|
1145
|
+
"valid-typeof": "off",
|
|
1146
|
+
/**
|
|
1147
|
+
* Rules from eslint-plugin-import that should be disabled
|
|
1148
|
+
*
|
|
1149
|
+
* @see https://typescript-eslint.io/troubleshooting/performance-troubleshooting#eslint-plugin-import
|
|
1150
|
+
*/
|
|
1151
|
+
"import/default": "off",
|
|
1152
|
+
"import/named": "off",
|
|
1153
|
+
"import/namespace": "off",
|
|
1154
|
+
"import/no-named-as-default-member": "off",
|
|
1155
|
+
"import/no-unresolved": "off",
|
|
1156
|
+
// might run them in CI
|
|
1157
|
+
"import/no-cycle": "off",
|
|
1158
|
+
"import/no-deprecated": "off",
|
|
1159
|
+
"import/no-named-as-default": "off",
|
|
1160
|
+
"import/no-unused-modules": "off",
|
|
1136
1161
|
/**
|
|
1137
1162
|
* Rules that have equivalents in typescript-eslint plugin.
|
|
1138
1163
|
*/
|
|
@@ -1179,44 +1204,7 @@ const typescriptShimRules = {
|
|
|
1179
1204
|
"semi": "off",
|
|
1180
1205
|
"space-before-blocks": "off",
|
|
1181
1206
|
"space-before-function-paren": "off",
|
|
1182
|
-
"space-infix-ops": "off"
|
|
1183
|
-
/**
|
|
1184
|
-
* Rules that are checked by typescript or recommended to disable in typescript.
|
|
1185
|
-
*/
|
|
1186
|
-
// builtin rules
|
|
1187
|
-
"constructor-super": "off",
|
|
1188
|
-
"getter-return": "off",
|
|
1189
|
-
"no-const-assign": "off",
|
|
1190
|
-
"no-dupe-args": "off",
|
|
1191
|
-
"no-dupe-class-members": "off",
|
|
1192
|
-
"no-dupe-keys": "off",
|
|
1193
|
-
"no-func-assign": "off",
|
|
1194
|
-
"no-invalid-this": "off",
|
|
1195
|
-
"no-import-assign": "off",
|
|
1196
|
-
"no-new-symbol": "off",
|
|
1197
|
-
"no-obj-calls": "off",
|
|
1198
|
-
"no-redeclare": "off",
|
|
1199
|
-
"no-setter-return": "off",
|
|
1200
|
-
"no-this-before-super": "off",
|
|
1201
|
-
"no-undef": "off",
|
|
1202
|
-
"no-unreachable": "off",
|
|
1203
|
-
"no-unsafe-negation": "off",
|
|
1204
|
-
"valid-typeof": "off",
|
|
1205
|
-
/**
|
|
1206
|
-
* Rules from eslint-plugin-import that should be disabled
|
|
1207
|
-
*
|
|
1208
|
-
* @see https://typescript-eslint.io/troubleshooting/performance-troubleshooting#eslint-plugin-import
|
|
1209
|
-
*/
|
|
1210
|
-
"import/default": "off",
|
|
1211
|
-
"import/named": "off",
|
|
1212
|
-
"import/namespace": "off",
|
|
1213
|
-
"import/no-named-as-default-member": "off",
|
|
1214
|
-
"import/no-unresolved": "off",
|
|
1215
|
-
// might run them in CI
|
|
1216
|
-
"import/no-cycle": "off",
|
|
1217
|
-
"import/no-deprecated": "off",
|
|
1218
|
-
"import/no-named-as-default": "off",
|
|
1219
|
-
"import/no-unused-modules": "off"
|
|
1207
|
+
"space-infix-ops": "off"
|
|
1220
1208
|
};
|
|
1221
1209
|
|
|
1222
1210
|
const typescriptRules = {
|
|
@@ -1447,12 +1435,22 @@ const typescriptRules = {
|
|
|
1447
1435
|
};
|
|
1448
1436
|
|
|
1449
1437
|
const vueRules = {
|
|
1438
|
+
"vue/block-lang": [
|
|
1439
|
+
"off",
|
|
1440
|
+
{
|
|
1441
|
+
script: { lang: "ts" },
|
|
1442
|
+
style: { allowNoLang: true }
|
|
1443
|
+
}
|
|
1444
|
+
],
|
|
1450
1445
|
"vue/block-order": [
|
|
1451
1446
|
"error",
|
|
1452
1447
|
{
|
|
1453
1448
|
order: ["script", "template", "style"]
|
|
1454
1449
|
}
|
|
1455
1450
|
],
|
|
1451
|
+
"vue/camelcase": "off",
|
|
1452
|
+
// builtin extension - checked by typescript
|
|
1453
|
+
"vue/component-api-style": ["error", ["script-setup", "composition"]],
|
|
1456
1454
|
"vue/component-name-in-template-casing": [
|
|
1457
1455
|
"error",
|
|
1458
1456
|
"PascalCase",
|
|
@@ -1464,12 +1462,43 @@ const vueRules = {
|
|
|
1464
1462
|
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
1465
1463
|
"vue/component-tags-order": "off",
|
|
1466
1464
|
// deprecated
|
|
1465
|
+
"vue/custom-event-name-casing": [
|
|
1466
|
+
"error",
|
|
1467
|
+
"camelCase",
|
|
1468
|
+
{
|
|
1469
|
+
ignores: []
|
|
1470
|
+
}
|
|
1471
|
+
],
|
|
1472
|
+
"vue/define-emits-declaration": ["error", "type-literal"],
|
|
1467
1473
|
"vue/define-macros-order": [
|
|
1468
1474
|
"error",
|
|
1469
1475
|
{
|
|
1470
1476
|
order: ["defineOptions", "defineProps", "defineEmits", "defineSlots"]
|
|
1471
1477
|
}
|
|
1472
1478
|
],
|
|
1479
|
+
"vue/define-props-declaration": ["error", "type-based"],
|
|
1480
|
+
"vue/dot-notation": "off",
|
|
1481
|
+
// builtin extension - checked by typescript?
|
|
1482
|
+
"vue/enforce-style-attribute": [
|
|
1483
|
+
"off",
|
|
1484
|
+
{ allow: ["scoped", "module", "plain"] }
|
|
1485
|
+
],
|
|
1486
|
+
"vue/eqeqeq": [
|
|
1487
|
+
"error",
|
|
1488
|
+
"always",
|
|
1489
|
+
{
|
|
1490
|
+
null: "ignore"
|
|
1491
|
+
}
|
|
1492
|
+
],
|
|
1493
|
+
// builtin extension
|
|
1494
|
+
"vue/html-button-has-type": [
|
|
1495
|
+
"error",
|
|
1496
|
+
{
|
|
1497
|
+
button: true,
|
|
1498
|
+
submit: true,
|
|
1499
|
+
reset: true
|
|
1500
|
+
}
|
|
1501
|
+
],
|
|
1473
1502
|
"vue/match-component-file-name": [
|
|
1474
1503
|
"error",
|
|
1475
1504
|
{
|
|
@@ -1477,15 +1506,177 @@ const vueRules = {
|
|
|
1477
1506
|
shouldMatchCase: false
|
|
1478
1507
|
}
|
|
1479
1508
|
],
|
|
1509
|
+
"vue/match-component-import-name": "error",
|
|
1510
|
+
"vue/max-lines-per-block": [
|
|
1511
|
+
"off",
|
|
1512
|
+
{
|
|
1513
|
+
script: 0,
|
|
1514
|
+
template: 0,
|
|
1515
|
+
style: 0,
|
|
1516
|
+
skipBlankLines: true
|
|
1517
|
+
}
|
|
1518
|
+
],
|
|
1519
|
+
"vue/next-tick-style": ["error", "promise"],
|
|
1520
|
+
"vue/no-bare-strings-in-template": ["off"],
|
|
1521
|
+
"vue/no-boolean-default": ["off", "no-default"],
|
|
1522
|
+
"vue/no-console": "error",
|
|
1523
|
+
// builtin extension
|
|
1524
|
+
"vue/no-constant-condition": "warn",
|
|
1525
|
+
// builtin extension
|
|
1526
|
+
"vue/no-custom-modifiers-on-v-model": "off",
|
|
1527
|
+
// vue2?
|
|
1528
|
+
"vue/no-deprecated-model-definition": "error",
|
|
1529
|
+
"vue/no-duplicate-attr-inheritance": "error",
|
|
1530
|
+
"vue/no-empty-component-block": "warn",
|
|
1531
|
+
"vue/no-empty-pattern": "error",
|
|
1532
|
+
// builtin extension
|
|
1533
|
+
"vue/no-invalid-model-keys": "off",
|
|
1534
|
+
// deprecated
|
|
1535
|
+
"vue/no-irregular-whitespace": "error",
|
|
1536
|
+
// builtin extension
|
|
1537
|
+
"vue/no-loss-of-precision": "off",
|
|
1538
|
+
// builtin extension - checked by typescript?
|
|
1539
|
+
"vue/no-multiple-objects-in-class": "error",
|
|
1540
|
+
"vue/no-multiple-template-root": "off",
|
|
1541
|
+
// vue2 - better to have in vue3, too?
|
|
1542
|
+
"vue/no-potential-component-option-typo": "off",
|
|
1543
|
+
// options api
|
|
1544
|
+
"vue/no-ref-object-destructure": "off",
|
|
1545
|
+
// deprecated
|
|
1546
|
+
"vue/no-ref-object-reactivity-loss": "warn",
|
|
1547
|
+
"vue/no-required-prop-with-default": ["warn", { autofix: false }],
|
|
1548
|
+
"vue/no-restricted-block": ["off"],
|
|
1549
|
+
"vue/no-restricted-call-after-await": ["off"],
|
|
1550
|
+
"vue/no-restricted-class": ["off"],
|
|
1551
|
+
"vue/no-restricted-component-names": ["off"],
|
|
1552
|
+
"vue/no-restricted-component-options": ["off"],
|
|
1553
|
+
"vue/no-restricted-custom-event": ["off"],
|
|
1554
|
+
"vue/no-restricted-html-elements": ["off"],
|
|
1555
|
+
"vue/no-restricted-props": ["off"],
|
|
1556
|
+
"vue/no-restricted-static-attribute": ["off"],
|
|
1480
1557
|
"vue/no-restricted-syntax": [
|
|
1481
1558
|
"error",
|
|
1482
1559
|
"DebuggerStatement",
|
|
1483
1560
|
"LabeledStatement",
|
|
1484
1561
|
"WithStatement"
|
|
1485
1562
|
],
|
|
1563
|
+
// builtin extension
|
|
1564
|
+
"vue/no-restricted-v-bind": ["off"],
|
|
1565
|
+
"vue/no-restricted-v-on": ["off"],
|
|
1566
|
+
"vue/no-root-v-if": "error",
|
|
1567
|
+
"vue/no-setup-props-destructure": "off",
|
|
1568
|
+
// deprecated
|
|
1569
|
+
"vue/no-setup-props-reactivity-loss": "error",
|
|
1486
1570
|
"vue/no-sparse-arrays": "error",
|
|
1571
|
+
// builtin extension
|
|
1572
|
+
"vue/no-static-inline-styles": [
|
|
1573
|
+
"error",
|
|
1574
|
+
{
|
|
1575
|
+
allowBinding: false
|
|
1576
|
+
}
|
|
1577
|
+
],
|
|
1578
|
+
"vue/no-template-target-blank": [
|
|
1579
|
+
"error",
|
|
1580
|
+
{
|
|
1581
|
+
allowReferrer: false,
|
|
1582
|
+
enforceDynamicLinks: "always"
|
|
1583
|
+
}
|
|
1584
|
+
],
|
|
1585
|
+
"vue/no-this-in-before-route-enter": "off",
|
|
1586
|
+
// options api & vue-router
|
|
1587
|
+
"vue/no-undef-components": "off",
|
|
1588
|
+
"vue/no-undef-properties": "error",
|
|
1589
|
+
"vue/no-unsupported-features": "off",
|
|
1590
|
+
"vue/no-unused-emit-declarations": "error",
|
|
1591
|
+
"vue/no-unused-properties": [
|
|
1592
|
+
"error",
|
|
1593
|
+
{
|
|
1594
|
+
groups: ["props"],
|
|
1595
|
+
deepData: false,
|
|
1596
|
+
ignorePublicMembers: false,
|
|
1597
|
+
unreferencedOptions: []
|
|
1598
|
+
}
|
|
1599
|
+
],
|
|
1487
1600
|
"vue/no-unused-refs": "error",
|
|
1488
|
-
"vue/no-
|
|
1601
|
+
"vue/no-use-v-else-with-v-for": "error",
|
|
1602
|
+
"vue/no-use-v-if-with-v-for": "error",
|
|
1603
|
+
"vue/no-useless-concat": "error",
|
|
1604
|
+
// builtin extension
|
|
1605
|
+
"vue/no-useless-mustaches": [
|
|
1606
|
+
"off",
|
|
1607
|
+
{
|
|
1608
|
+
ignoreIncludesComment: false,
|
|
1609
|
+
ignoreStringEscape: true
|
|
1610
|
+
}
|
|
1611
|
+
],
|
|
1612
|
+
"vue/no-useless-v-bind": "error",
|
|
1613
|
+
"vue/no-v-for-template-key": "off",
|
|
1614
|
+
// vue2
|
|
1615
|
+
"vue/no-v-for-template-key-on-child": "error",
|
|
1616
|
+
"vue/no-v-model-argument": "off",
|
|
1617
|
+
// vue2
|
|
1618
|
+
"vue/no-v-text": "off",
|
|
1619
|
+
"vue/object-shorthand": [
|
|
1620
|
+
"error",
|
|
1621
|
+
"always",
|
|
1622
|
+
{
|
|
1623
|
+
ignoreConstructors: false,
|
|
1624
|
+
avoidQuotes: true
|
|
1625
|
+
}
|
|
1626
|
+
],
|
|
1627
|
+
// builtin extension
|
|
1628
|
+
"vue/prefer-define-options": "error",
|
|
1629
|
+
"vue/prefer-prop-type-boolean-first": "error",
|
|
1630
|
+
"vue/prefer-separate-static-class": "error",
|
|
1631
|
+
"vue/prefer-template": "error",
|
|
1632
|
+
// builtin extension
|
|
1633
|
+
"vue/prefer-true-attribute-shorthand": "off",
|
|
1634
|
+
"vue/require-direct-export": [
|
|
1635
|
+
"error",
|
|
1636
|
+
{
|
|
1637
|
+
disallowFunctionalComponentFunction: false
|
|
1638
|
+
}
|
|
1639
|
+
],
|
|
1640
|
+
"vue/require-explicit-slots": "error",
|
|
1641
|
+
"vue/require-expose": "error",
|
|
1642
|
+
"vue/require-emit-validator": "off",
|
|
1643
|
+
// enable?
|
|
1644
|
+
"vue/require-macro-variable-name": [
|
|
1645
|
+
"error",
|
|
1646
|
+
{
|
|
1647
|
+
defineProps: "props",
|
|
1648
|
+
defineEmits: "emits",
|
|
1649
|
+
defineSlots: "slots",
|
|
1650
|
+
useSlots: "slots",
|
|
1651
|
+
useAttrs: "attrs"
|
|
1652
|
+
}
|
|
1653
|
+
],
|
|
1654
|
+
"vue/require-name-property": "error",
|
|
1655
|
+
"vue/require-prop-comment": [
|
|
1656
|
+
"warn",
|
|
1657
|
+
{
|
|
1658
|
+
type: "JSDoc"
|
|
1659
|
+
}
|
|
1660
|
+
],
|
|
1661
|
+
"vue/require-typed-object-prop": "error",
|
|
1662
|
+
"vue/require-typed-ref": "error",
|
|
1663
|
+
"vue/sort-keys": "off",
|
|
1664
|
+
// builtin extension
|
|
1665
|
+
"vue/script-setup-uses-vars": "off",
|
|
1666
|
+
// deprecated
|
|
1667
|
+
"vue/static-class-names-order": "error",
|
|
1668
|
+
"vue/v-if-else-key": "off",
|
|
1669
|
+
// vue2
|
|
1670
|
+
"vue/v-on-handler-style": "off",
|
|
1671
|
+
"vue/v-on-function-call": "off",
|
|
1672
|
+
// deprecated
|
|
1673
|
+
"vue/valid-define-emits": "error",
|
|
1674
|
+
"vue/valid-define-options": "error",
|
|
1675
|
+
"vue/valid-define-props": "error",
|
|
1676
|
+
"vue/valid-model-definition": "off",
|
|
1677
|
+
// vue2
|
|
1678
|
+
"vue/valid-v-bind-sync": "off"
|
|
1679
|
+
// vue2
|
|
1489
1680
|
};
|
|
1490
1681
|
|
|
1491
1682
|
const index$1 = {
|
|
@@ -1755,13 +1946,13 @@ const env = {
|
|
|
1755
1946
|
};
|
|
1756
1947
|
|
|
1757
1948
|
const meteorlxy = async (options, ...customConfigs) => [
|
|
1758
|
-
//
|
|
1949
|
+
// global ignores
|
|
1759
1950
|
...ignores(options.ignores),
|
|
1760
1951
|
// javascript core rules
|
|
1761
1952
|
...javascript(options.javascript),
|
|
1762
|
-
// react rules
|
|
1953
|
+
// react rules - should be placed before typescript rules
|
|
1763
1954
|
...options.react ? await react(options.react === true ? {} : options.react) : [],
|
|
1764
|
-
// typescript rules
|
|
1955
|
+
// typescript rules
|
|
1765
1956
|
...typescript(options.typescript),
|
|
1766
1957
|
// vue rules - should be placed after typescript rules
|
|
1767
1958
|
...options.vue ? await vue(options.vue === true ? {} : options.vue) : [],
|