@vinicunca/eslint-config 2.0.1 → 2.0.4
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 +179 -181
- package/dist/index.d.cts +48 -47
- package/dist/index.d.ts +48 -47
- package/dist/index.js +212 -215
- package/package.json +10 -9
package/dist/index.cjs
CHANGED
|
@@ -66,6 +66,7 @@ __export(src_exports, {
|
|
|
66
66
|
pluginMarkdown: () => import_eslint_plugin_markdown.default,
|
|
67
67
|
pluginNoOnlyTests: () => import_eslint_plugin_no_only_tests.default,
|
|
68
68
|
pluginNode: () => import_eslint_plugin_n.default,
|
|
69
|
+
pluginPerfectionist: () => import_eslint_plugin_perfectionist.default,
|
|
69
70
|
pluginReact: () => import_eslint_plugin_react.default,
|
|
70
71
|
pluginReactHooks: () => import_eslint_plugin_react_hooks.default,
|
|
71
72
|
pluginStylistic: () => import_eslint_plugin.default,
|
|
@@ -91,8 +92,8 @@ __export(src_exports, {
|
|
|
91
92
|
module.exports = __toCommonJS(src_exports);
|
|
92
93
|
|
|
93
94
|
// src/base.ts
|
|
94
|
-
var import_node_process3 = __toESM(require("process"), 1);
|
|
95
95
|
var import_local_pkg = require("local-pkg");
|
|
96
|
+
var import_node_process3 = __toESM(require("process"), 1);
|
|
96
97
|
|
|
97
98
|
// src/flags.ts
|
|
98
99
|
var ERROR = "error";
|
|
@@ -104,9 +105,9 @@ var ALWAYS = "always";
|
|
|
104
105
|
|
|
105
106
|
// src/plugins.ts
|
|
106
107
|
var import_eslint_plugin = __toESM(require("@stylistic/eslint-plugin"), 1);
|
|
107
|
-
var import_eslint_plugin_vinicunca = __toESM(require("@vinicunca/eslint-plugin-vinicunca"), 1);
|
|
108
108
|
var import_eslint_plugin2 = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
|
|
109
109
|
var parserTs = __toESM(require("@typescript-eslint/parser"), 1);
|
|
110
|
+
var import_eslint_plugin_vinicunca = __toESM(require("@vinicunca/eslint-plugin-vinicunca"), 1);
|
|
110
111
|
var import_eslint_plugin_eslint_comments = __toESM(require("eslint-plugin-eslint-comments"), 1);
|
|
111
112
|
var pluginImport = __toESM(require("eslint-plugin-i"), 1);
|
|
112
113
|
var import_eslint_plugin_jsdoc = __toESM(require("eslint-plugin-jsdoc"), 1);
|
|
@@ -114,13 +115,14 @@ var pluginJsonc = __toESM(require("eslint-plugin-jsonc"), 1);
|
|
|
114
115
|
var import_eslint_plugin_markdown = __toESM(require("eslint-plugin-markdown"), 1);
|
|
115
116
|
var import_eslint_plugin_n = __toESM(require("eslint-plugin-n"), 1);
|
|
116
117
|
var import_eslint_plugin_no_only_tests = __toESM(require("eslint-plugin-no-only-tests"), 1);
|
|
117
|
-
var
|
|
118
|
-
var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-imports"), 1);
|
|
118
|
+
var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
119
119
|
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
120
120
|
var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
121
|
+
var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
|
|
122
|
+
var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-imports"), 1);
|
|
123
|
+
var import_eslint_plugin_vitest = __toESM(require("eslint-plugin-vitest"), 1);
|
|
121
124
|
var import_eslint_plugin_vue = __toESM(require("eslint-plugin-vue"), 1);
|
|
122
125
|
var pluginYaml = __toESM(require("eslint-plugin-yml"), 1);
|
|
123
|
-
var import_eslint_plugin_vitest = __toESM(require("eslint-plugin-vitest"), 1);
|
|
124
126
|
var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
|
|
125
127
|
var import_vue_eslint_parser = __toESM(require("vue-eslint-parser"), 1);
|
|
126
128
|
var import_yaml_eslint_parser = __toESM(require("yaml-eslint-parser"), 1);
|
|
@@ -143,10 +145,6 @@ function comments() {
|
|
|
143
145
|
];
|
|
144
146
|
}
|
|
145
147
|
|
|
146
|
-
// src/configs/ignores.ts
|
|
147
|
-
var import_node_fs = __toESM(require("fs"), 1);
|
|
148
|
-
var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
|
|
149
|
-
|
|
150
148
|
// ../node_modules/.pnpm/@vinicunca+perkakas@0.0.10/node_modules/@vinicunca/perkakas/dist/index.js
|
|
151
149
|
function purry(fn, args, lazy) {
|
|
152
150
|
const diff = fn.length - args.length;
|
|
@@ -1121,6 +1119,10 @@ function toPairs(object) {
|
|
|
1121
1119
|
toPairs2.strict = strict;
|
|
1122
1120
|
})(toPairs || (toPairs = {}));
|
|
1123
1121
|
|
|
1122
|
+
// src/configs/ignores.ts
|
|
1123
|
+
var import_node_fs = __toESM(require("fs"), 1);
|
|
1124
|
+
var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
|
|
1125
|
+
|
|
1124
1126
|
// src/globs.ts
|
|
1125
1127
|
var GLOB_JS = "**/*.?([cm])js";
|
|
1126
1128
|
var GLOB_JSX = "**/*.?([cm])jsx";
|
|
@@ -1175,19 +1177,17 @@ function ignores({
|
|
|
1175
1177
|
replace = false
|
|
1176
1178
|
} = {}) {
|
|
1177
1179
|
const ignoreList = [];
|
|
1178
|
-
if (enableGitignore) {
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
ignoreList.push(...glob.patterns.map((pattern) => `!${pattern}`));
|
|
1188
|
-
}
|
|
1189
|
-
;
|
|
1180
|
+
if (enableGitignore && import_node_fs.default.existsSync(".gitignore")) {
|
|
1181
|
+
const gitignoreContent = import_node_fs.default.readFileSync(".gitignore", "utf8");
|
|
1182
|
+
const parsed = (0, import_parse_gitignore.default)(gitignoreContent);
|
|
1183
|
+
const globs = parsed.globs();
|
|
1184
|
+
for (const glob of globs) {
|
|
1185
|
+
if (glob.type === "ignore") {
|
|
1186
|
+
ignoreList.push(...glob.patterns);
|
|
1187
|
+
} else if (glob.type === "unignore") {
|
|
1188
|
+
ignoreList.push(...glob.patterns.map((pattern) => `!${pattern}`));
|
|
1190
1189
|
}
|
|
1190
|
+
;
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
1193
|
if (replace) {
|
|
@@ -1214,7 +1214,7 @@ function imports() {
|
|
|
1214
1214
|
rules: {
|
|
1215
1215
|
"import/export": ERROR,
|
|
1216
1216
|
"import/first": ERROR,
|
|
1217
|
-
"import/newline-after-import": [
|
|
1217
|
+
"import/newline-after-import": [OFF, {
|
|
1218
1218
|
considerComments: true,
|
|
1219
1219
|
count: 1
|
|
1220
1220
|
}],
|
|
@@ -1223,7 +1223,8 @@ function imports() {
|
|
|
1223
1223
|
"import/no-named-default": ERROR,
|
|
1224
1224
|
"import/no-self-import": ERROR,
|
|
1225
1225
|
"import/no-webpack-loader-syntax": ERROR,
|
|
1226
|
-
|
|
1226
|
+
// Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-imports
|
|
1227
|
+
"import/order": OFF,
|
|
1227
1228
|
"vinicunca/import-dedupe": ERROR,
|
|
1228
1229
|
"vinicunca/no-import-node-modules-by-path": ERROR
|
|
1229
1230
|
}
|
|
@@ -1240,7 +1241,6 @@ function javascript(options = {}) {
|
|
|
1240
1241
|
} = options;
|
|
1241
1242
|
return [
|
|
1242
1243
|
{
|
|
1243
|
-
name: "vinicunca:javascript",
|
|
1244
1244
|
languageOptions: {
|
|
1245
1245
|
ecmaVersion: 2022,
|
|
1246
1246
|
globals: {
|
|
@@ -1260,22 +1260,24 @@ function javascript(options = {}) {
|
|
|
1260
1260
|
linterOptions: {
|
|
1261
1261
|
reportUnusedDisableDirectives: true
|
|
1262
1262
|
},
|
|
1263
|
+
name: "vinicunca:javascript",
|
|
1263
1264
|
plugins: {
|
|
1264
|
-
"
|
|
1265
|
-
"unused-imports": import_eslint_plugin_unused_imports.default
|
|
1265
|
+
"perfectionist": import_eslint_plugin_perfectionist.default,
|
|
1266
|
+
"unused-imports": import_eslint_plugin_unused_imports.default,
|
|
1267
|
+
"vinicunca": import_eslint_plugin_vinicunca.default
|
|
1266
1268
|
},
|
|
1267
1269
|
rules: {
|
|
1268
1270
|
"accessor-pairs": [ERROR, {
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
+
enforceForClassMembers: true,
|
|
1272
|
+
setWithoutGet: true
|
|
1271
1273
|
}],
|
|
1272
1274
|
"array-callback-return": [ERROR, { checkForEach: true }],
|
|
1273
1275
|
"arrow-parens": [ERROR, ALWAYS],
|
|
1274
1276
|
"block-scoped-var": ERROR,
|
|
1275
1277
|
"camelcase": [ERROR, {
|
|
1276
1278
|
allow: ["^UNSAFE_"],
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
+
ignoreGlobals: true,
|
|
1280
|
+
properties: NEVER
|
|
1279
1281
|
}],
|
|
1280
1282
|
"constructor-super": ERROR,
|
|
1281
1283
|
"default-case-last": ERROR,
|
|
@@ -1294,10 +1296,10 @@ function javascript(options = {}) {
|
|
|
1294
1296
|
"no-case-declarations": ERROR,
|
|
1295
1297
|
"no-class-assign": ERROR,
|
|
1296
1298
|
"no-compare-neg-zero": ERROR,
|
|
1299
|
+
"no-cond-assign": [ERROR, ALWAYS],
|
|
1297
1300
|
"no-console": [ERROR, {
|
|
1298
1301
|
allow: [WARN, ERROR]
|
|
1299
1302
|
}],
|
|
1300
|
-
"no-cond-assign": [ERROR, ALWAYS],
|
|
1301
1303
|
"no-const-assign": ERROR,
|
|
1302
1304
|
"no-constant-binary-expression": ERROR,
|
|
1303
1305
|
"no-constant-condition": [ERROR, {
|
|
@@ -1327,8 +1329,8 @@ function javascript(options = {}) {
|
|
|
1327
1329
|
"no-global-assign": ERROR,
|
|
1328
1330
|
"no-implied-eval": ERROR,
|
|
1329
1331
|
"no-import-assign": ERROR,
|
|
1330
|
-
"no-invalid-this": ERROR,
|
|
1331
1332
|
"no-invalid-regexp": ERROR,
|
|
1333
|
+
"no-invalid-this": ERROR,
|
|
1332
1334
|
"no-irregular-whitespace": ERROR,
|
|
1333
1335
|
"no-iterator": ERROR,
|
|
1334
1336
|
"no-labels": ERROR,
|
|
@@ -1355,35 +1357,35 @@ function javascript(options = {}) {
|
|
|
1355
1357
|
"no-restricted-globals": [
|
|
1356
1358
|
ERROR,
|
|
1357
1359
|
{
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
+
message: "Use `globalThis` instead.",
|
|
1361
|
+
name: "global"
|
|
1360
1362
|
},
|
|
1361
1363
|
{
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
+
message: "Use `globalThis` instead.",
|
|
1365
|
+
name: "self"
|
|
1364
1366
|
}
|
|
1365
1367
|
],
|
|
1366
1368
|
"no-restricted-properties": [
|
|
1367
1369
|
ERROR,
|
|
1368
1370
|
{
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
+
message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",
|
|
1372
|
+
property: "__proto__"
|
|
1371
1373
|
},
|
|
1372
1374
|
{
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
+
message: "Use `Object.defineProperty` instead.",
|
|
1376
|
+
property: "__defineGetter__"
|
|
1375
1377
|
},
|
|
1376
1378
|
{
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
+
message: "Use `Object.defineProperty` instead.",
|
|
1380
|
+
property: "__defineSetter__"
|
|
1379
1381
|
},
|
|
1380
1382
|
{
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
+
message: "Use `Object.getOwnPropertyDescriptor` instead.",
|
|
1384
|
+
property: "__lookupGetter__"
|
|
1383
1385
|
},
|
|
1384
1386
|
{
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
+
message: "Use `Object.getOwnPropertyDescriptor` instead.",
|
|
1388
|
+
property: "__lookupSetter__"
|
|
1387
1389
|
}
|
|
1388
1390
|
],
|
|
1389
1391
|
"no-restricted-syntax": [
|
|
@@ -1419,8 +1421,8 @@ function javascript(options = {}) {
|
|
|
1419
1421
|
"no-unsafe-negation": ERROR,
|
|
1420
1422
|
"no-unused-expressions": [ERROR, {
|
|
1421
1423
|
allowShortCircuit: true,
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
+
allowTaggedTemplates: true,
|
|
1425
|
+
allowTernary: true
|
|
1424
1426
|
}],
|
|
1425
1427
|
"no-unused-vars": [ERROR, {
|
|
1426
1428
|
args: "none",
|
|
@@ -1429,8 +1431,8 @@ function javascript(options = {}) {
|
|
|
1429
1431
|
vars: "all"
|
|
1430
1432
|
}],
|
|
1431
1433
|
"no-use-before-define": [ERROR, {
|
|
1432
|
-
functions: false,
|
|
1433
1434
|
classes: false,
|
|
1435
|
+
functions: false,
|
|
1434
1436
|
variables: true
|
|
1435
1437
|
}],
|
|
1436
1438
|
"no-useless-backreference": ERROR,
|
|
@@ -1444,8 +1446,8 @@ function javascript(options = {}) {
|
|
|
1444
1446
|
"no-void": ERROR,
|
|
1445
1447
|
"no-with": ERROR,
|
|
1446
1448
|
"object-shorthand": [ERROR, ALWAYS, {
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
+
avoidQuotes: true,
|
|
1450
|
+
ignoreConstructors: false
|
|
1449
1451
|
}],
|
|
1450
1452
|
"one-var": [ERROR, {
|
|
1451
1453
|
initialized: NEVER
|
|
@@ -1463,44 +1465,36 @@ function javascript(options = {}) {
|
|
|
1463
1465
|
"prefer-rest-params": ERROR,
|
|
1464
1466
|
"prefer-spread": ERROR,
|
|
1465
1467
|
"prefer-template": ERROR,
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
ignoreDeclarationSort: true,
|
|
1469
|
-
ignoreMemberSort: false,
|
|
1470
|
-
memberSyntaxSortOrder: [
|
|
1471
|
-
"none",
|
|
1472
|
-
"all",
|
|
1473
|
-
"multiple",
|
|
1474
|
-
"single"
|
|
1475
|
-
],
|
|
1476
|
-
allowSeparatedGroups: false
|
|
1477
|
-
}],
|
|
1468
|
+
// Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-imports
|
|
1469
|
+
"sort-imports": [OFF],
|
|
1478
1470
|
"symbol-description": ERROR,
|
|
1479
1471
|
"unicode-bom": [ERROR, NEVER],
|
|
1472
|
+
"unused-imports/no-unused-imports": isInEditor ? OFF : ERROR,
|
|
1473
|
+
"unused-imports/no-unused-vars": [WARN, {
|
|
1474
|
+
args: "after-used",
|
|
1475
|
+
argsIgnorePattern: "^_",
|
|
1476
|
+
ignoreRestSiblings: true,
|
|
1477
|
+
vars: "all",
|
|
1478
|
+
varsIgnorePattern: "^_"
|
|
1479
|
+
}],
|
|
1480
1480
|
"use-isnan": [ERROR, {
|
|
1481
|
-
|
|
1482
|
-
|
|
1481
|
+
enforceForIndexOf: true,
|
|
1482
|
+
enforceForSwitchCase: true
|
|
1483
1483
|
}],
|
|
1484
1484
|
"valid-typeof": [ERROR, {
|
|
1485
1485
|
requireStringLiterals: true
|
|
1486
1486
|
}],
|
|
1487
1487
|
"vars-on-top": ERROR,
|
|
1488
1488
|
"yoda": [ERROR, NEVER],
|
|
1489
|
-
"unused-imports/no-unused-imports": isInEditor ? OFF : ERROR,
|
|
1490
|
-
"unused-imports/no-unused-vars": [WARN, {
|
|
1491
|
-
vars: "all",
|
|
1492
|
-
varsIgnorePattern: "^_",
|
|
1493
|
-
args: "after-used",
|
|
1494
|
-
argsIgnorePattern: "^_",
|
|
1495
|
-
ignoreRestSiblings: true
|
|
1496
|
-
}],
|
|
1497
1489
|
...import_eslint_plugin_vinicunca.default.configs.recommended.rules,
|
|
1490
|
+
...import_eslint_plugin_perfectionist.default.configs["recommended-natural"].rules,
|
|
1491
|
+
"perfectionist/sort-vue-attributes": [OFF],
|
|
1498
1492
|
...overrides
|
|
1499
1493
|
}
|
|
1500
1494
|
},
|
|
1501
1495
|
{
|
|
1502
|
-
name: "vinicunca:javascript:overrides",
|
|
1503
1496
|
files: [`**/scripts/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
|
|
1497
|
+
name: "vinicunca:javascript:overrides",
|
|
1504
1498
|
rules: {
|
|
1505
1499
|
"no-console": OFF
|
|
1506
1500
|
}
|
|
@@ -1554,11 +1548,11 @@ function jsonc(options = {}) {
|
|
|
1554
1548
|
}
|
|
1555
1549
|
},
|
|
1556
1550
|
{
|
|
1557
|
-
name: "vinicunca:jsonc:rules",
|
|
1558
1551
|
files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
|
|
1559
1552
|
languageOptions: {
|
|
1560
1553
|
parser: import_jsonc_eslint_parser.default
|
|
1561
1554
|
},
|
|
1555
|
+
name: "vinicunca:jsonc:rules",
|
|
1562
1556
|
rules: {
|
|
1563
1557
|
"jsonc/array-bracket-spacing": [ERROR, NEVER],
|
|
1564
1558
|
"jsonc/comma-dangle": [ERROR, NEVER],
|
|
@@ -1616,12 +1610,11 @@ function markdown(options = {}) {
|
|
|
1616
1610
|
}
|
|
1617
1611
|
},
|
|
1618
1612
|
{
|
|
1619
|
-
name: "vinicunca:markdown:processor",
|
|
1620
1613
|
files: [GLOB_MARKDOWN],
|
|
1614
|
+
name: "vinicunca:markdown:processor",
|
|
1621
1615
|
processor: "markdown/markdown"
|
|
1622
1616
|
},
|
|
1623
1617
|
{
|
|
1624
|
-
name: "vinicunca:markdown:rules",
|
|
1625
1618
|
files: [
|
|
1626
1619
|
GLOB_MARKDOWN_CODE,
|
|
1627
1620
|
...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
|
|
@@ -1633,6 +1626,7 @@ function markdown(options = {}) {
|
|
|
1633
1626
|
}
|
|
1634
1627
|
}
|
|
1635
1628
|
},
|
|
1629
|
+
name: "vinicunca:markdown:rules",
|
|
1636
1630
|
rules: {
|
|
1637
1631
|
"no-alert": OFF,
|
|
1638
1632
|
"no-console": OFF,
|
|
@@ -1703,6 +1697,7 @@ function node() {
|
|
|
1703
1697
|
}
|
|
1704
1698
|
|
|
1705
1699
|
// src/configs/react.ts
|
|
1700
|
+
var STR_PARENS_NEW_LINE = "parens-new-line";
|
|
1706
1701
|
function react(options = {}) {
|
|
1707
1702
|
const {
|
|
1708
1703
|
overrides = {}
|
|
@@ -1717,83 +1712,78 @@ function react(options = {}) {
|
|
|
1717
1712
|
},
|
|
1718
1713
|
{
|
|
1719
1714
|
name: "vinicunca:react:rules",
|
|
1720
|
-
settings: {
|
|
1721
|
-
react: {
|
|
1722
|
-
version: "detect"
|
|
1723
|
-
}
|
|
1724
|
-
},
|
|
1725
1715
|
rules: {
|
|
1726
1716
|
...import_eslint_plugin_react.default.configs.recommended.rules,
|
|
1727
1717
|
...import_eslint_plugin_react_hooks.default.configs.recommended.rules,
|
|
1728
|
-
"
|
|
1718
|
+
"react/boolean-prop-naming": [OFF, {
|
|
1719
|
+
message: "",
|
|
1720
|
+
propTypeNames: ["bool", "mutuallyExclusiveTrueProps"],
|
|
1721
|
+
rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+"
|
|
1722
|
+
}],
|
|
1723
|
+
"react/destructuring-assignment": [ERROR, "always"],
|
|
1729
1724
|
"react/jsx-boolean-value": [ERROR, NEVER, { always: [] }],
|
|
1725
|
+
"react/jsx-child-element-spacing": OFF,
|
|
1730
1726
|
"react/jsx-closing-bracket-location": [ERROR, "line-aligned"],
|
|
1731
1727
|
"react/jsx-closing-tag-location": ERROR,
|
|
1728
|
+
"react/jsx-curly-brace-presence": [ERROR, { children: NEVER, props: NEVER }],
|
|
1729
|
+
"react/jsx-curly-newline": [ERROR, {
|
|
1730
|
+
multiline: "consistent",
|
|
1731
|
+
singleline: "consistent"
|
|
1732
|
+
}],
|
|
1732
1733
|
"react/jsx-curly-spacing": [ERROR, {
|
|
1733
|
-
|
|
1734
|
+
children: true,
|
|
1734
1735
|
spacing: {
|
|
1735
1736
|
objectLiterals: NEVER
|
|
1736
1737
|
},
|
|
1737
|
-
|
|
1738
|
+
when: "always"
|
|
1738
1739
|
}],
|
|
1740
|
+
"react/jsx-equals-spacing": [ERROR, NEVER],
|
|
1741
|
+
"react/jsx-first-prop-new-line": [ERROR, "multiline-multiprop"],
|
|
1742
|
+
"react/jsx-indent": [ERROR, 2],
|
|
1739
1743
|
"react/jsx-indent-props": [ERROR, 2],
|
|
1740
1744
|
"react/jsx-key": OFF,
|
|
1745
|
+
"react/jsx-max-depth": OFF,
|
|
1741
1746
|
"react/jsx-max-props-per-line": [ERROR, { maximum: 1, when: "multiline" }],
|
|
1747
|
+
"react/jsx-newline": ERROR,
|
|
1742
1748
|
"react/jsx-no-duplicate-props": [ERROR, { ignoreCase: true }],
|
|
1743
1749
|
"react/jsx-no-literals": [OFF, { noStrings: true }],
|
|
1750
|
+
"react/jsx-one-expression-per-line": [ERROR, { allow: "single-child" }],
|
|
1744
1751
|
"react/jsx-pascal-case": [ERROR, {
|
|
1745
1752
|
allowAllCaps: true,
|
|
1746
1753
|
ignore: []
|
|
1747
1754
|
}],
|
|
1748
|
-
"react/jsx-
|
|
1749
|
-
ignoreCase: true,
|
|
1750
|
-
callbacksLast: false,
|
|
1751
|
-
shorthandFirst: false,
|
|
1752
|
-
shorthandLast: false,
|
|
1753
|
-
noSortAlphabetically: false,
|
|
1754
|
-
reservedFirst: true
|
|
1755
|
-
}],
|
|
1755
|
+
"react/jsx-props-no-multi-spaces": ERROR,
|
|
1756
1756
|
"react/jsx-sort-default-props": [OFF, {
|
|
1757
1757
|
ignoreCase: true
|
|
1758
1758
|
}],
|
|
1759
|
-
|
|
1760
|
-
"react/
|
|
1761
|
-
"react/jsx-wrap-multilines": [ERROR, {
|
|
1762
|
-
declaration: "parens-new-line",
|
|
1763
|
-
assignment: "parens-new-line",
|
|
1764
|
-
return: "parens-new-line",
|
|
1765
|
-
arrow: "parens-new-line",
|
|
1766
|
-
condition: "parens-new-line",
|
|
1767
|
-
logical: "parens-new-line",
|
|
1768
|
-
prop: "parens-new-line"
|
|
1769
|
-
}],
|
|
1770
|
-
"react/jsx-first-prop-new-line": [ERROR, "multiline-multiprop"],
|
|
1771
|
-
"react/jsx-equals-spacing": [ERROR, NEVER],
|
|
1772
|
-
"react/jsx-indent": [ERROR, 2],
|
|
1773
|
-
"react/style-prop-object": ERROR,
|
|
1759
|
+
// Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-jsx-props
|
|
1760
|
+
"react/jsx-sort-props": [OFF],
|
|
1774
1761
|
"react/jsx-tag-spacing": [ERROR, {
|
|
1775
|
-
closingSlash: NEVER,
|
|
1776
|
-
beforeSelfClosing: "always",
|
|
1777
1762
|
afterOpening: NEVER,
|
|
1778
|
-
beforeClosing: NEVER
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
propTypeNames: ["bool", "mutuallyExclusiveTrueProps"],
|
|
1782
|
-
rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+",
|
|
1783
|
-
message: ""
|
|
1763
|
+
beforeClosing: NEVER,
|
|
1764
|
+
beforeSelfClosing: "always",
|
|
1765
|
+
closingSlash: NEVER
|
|
1784
1766
|
}],
|
|
1785
|
-
"react/jsx-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
singleline: "consistent"
|
|
1767
|
+
"react/jsx-wrap-multilines": [ERROR, {
|
|
1768
|
+
arrow: STR_PARENS_NEW_LINE,
|
|
1769
|
+
assignment: STR_PARENS_NEW_LINE,
|
|
1770
|
+
condition: STR_PARENS_NEW_LINE,
|
|
1771
|
+
declaration: STR_PARENS_NEW_LINE,
|
|
1772
|
+
logical: STR_PARENS_NEW_LINE,
|
|
1773
|
+
prop: STR_PARENS_NEW_LINE,
|
|
1774
|
+
return: STR_PARENS_NEW_LINE
|
|
1794
1775
|
}],
|
|
1795
|
-
"react/
|
|
1776
|
+
"react/no-danger": WARN,
|
|
1777
|
+
"react/react-in-jsx-scope": OFF,
|
|
1778
|
+
"react/self-closing-comp": ERROR,
|
|
1779
|
+
"react/style-prop-object": ERROR,
|
|
1780
|
+
"style/jsx-quotes": [ERROR, "prefer-double"],
|
|
1796
1781
|
...overrides
|
|
1782
|
+
},
|
|
1783
|
+
settings: {
|
|
1784
|
+
react: {
|
|
1785
|
+
version: "detect"
|
|
1786
|
+
}
|
|
1797
1787
|
}
|
|
1798
1788
|
}
|
|
1799
1789
|
];
|
|
@@ -1803,8 +1793,8 @@ function react(options = {}) {
|
|
|
1803
1793
|
function sortPackageJson() {
|
|
1804
1794
|
return [
|
|
1805
1795
|
{
|
|
1806
|
-
name: "vinicunca:sort-package-json",
|
|
1807
1796
|
files: ["**/package.json"],
|
|
1797
|
+
name: "vinicunca:sort-package-json",
|
|
1808
1798
|
rules: {
|
|
1809
1799
|
"jsonc/sort-array-values": [
|
|
1810
1800
|
ERROR,
|
|
@@ -1892,8 +1882,8 @@ function sortPackageJson() {
|
|
|
1892
1882
|
function sortTsconfig() {
|
|
1893
1883
|
return [
|
|
1894
1884
|
{
|
|
1895
|
-
name: "vinicunca:sort-tsconfig",
|
|
1896
1885
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
1886
|
+
name: "vinicunca:sort-tsconfig",
|
|
1897
1887
|
rules: {
|
|
1898
1888
|
"jsonc/sort-keys": [
|
|
1899
1889
|
ERROR,
|
|
@@ -2021,18 +2011,19 @@ function stylistic() {
|
|
|
2021
2011
|
{
|
|
2022
2012
|
name: "vinicunca:stylistic",
|
|
2023
2013
|
plugins: {
|
|
2024
|
-
|
|
2025
|
-
|
|
2014
|
+
style: import_eslint_plugin.default,
|
|
2015
|
+
vinicunca: import_eslint_plugin_vinicunca.default
|
|
2026
2016
|
},
|
|
2027
2017
|
rules: {
|
|
2028
2018
|
"curly": [ERROR, "all"],
|
|
2029
2019
|
"style/array-bracket-newline": [ERROR, CONSISTENT],
|
|
2030
2020
|
"style/array-bracket-spacing": [ERROR, NEVER],
|
|
2031
2021
|
"style/array-element-newline": [ERROR, CONSISTENT],
|
|
2032
|
-
"style/arrow-spacing": [ERROR, {
|
|
2022
|
+
"style/arrow-spacing": [ERROR, { after: true, before: true }],
|
|
2033
2023
|
"style/block-spacing": [ERROR, ALWAYS],
|
|
2034
2024
|
"style/brace-style": [ERROR],
|
|
2035
|
-
"style/comma-
|
|
2025
|
+
"style/comma-dangle": [ERROR, "always-multiline"],
|
|
2026
|
+
"style/comma-spacing": [ERROR, { after: true, before: false }],
|
|
2036
2027
|
"style/comma-style": [ERROR, "last"],
|
|
2037
2028
|
"style/computed-property-spacing": [ERROR, NEVER, { enforceForClassMembers: true }],
|
|
2038
2029
|
"style/dot-location": [ERROR, "property"],
|
|
@@ -2076,8 +2067,8 @@ function stylistic() {
|
|
|
2076
2067
|
offsetTernaryExpressions: true,
|
|
2077
2068
|
outerIIFEBody: 1
|
|
2078
2069
|
}],
|
|
2079
|
-
"style/key-spacing": [ERROR, {
|
|
2080
|
-
"style/keyword-spacing": [ERROR, {
|
|
2070
|
+
"style/key-spacing": [ERROR, { afterColon: true, beforeColon: false }],
|
|
2071
|
+
"style/keyword-spacing": [ERROR, { after: true, before: true }],
|
|
2081
2072
|
"style/lines-between-class-members": [ERROR, ALWAYS, { exceptAfterSingleLine: true }],
|
|
2082
2073
|
"style/max-statements-per-line": [ERROR, { max: 1 }],
|
|
2083
2074
|
"style/member-delimiter-style": [ERROR],
|
|
@@ -2086,12 +2077,12 @@ function stylistic() {
|
|
|
2086
2077
|
"style/no-extra-parens": [ERROR, "functions"],
|
|
2087
2078
|
"style/no-floating-decimal": ERROR,
|
|
2088
2079
|
"style/no-mixed-operators": [ERROR, {
|
|
2080
|
+
allowSamePrecedence: true,
|
|
2089
2081
|
groups: [
|
|
2090
2082
|
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
2091
2083
|
["&&", "||"],
|
|
2092
2084
|
["in", "instanceof"]
|
|
2093
|
-
]
|
|
2094
|
-
allowSamePrecedence: true
|
|
2085
|
+
]
|
|
2095
2086
|
}],
|
|
2096
2087
|
"style/no-mixed-spaces-and-tabs": ERROR,
|
|
2097
2088
|
"style/no-multi-spaces": ERROR,
|
|
@@ -2099,34 +2090,34 @@ function stylistic() {
|
|
|
2099
2090
|
"style/no-tabs": ERROR,
|
|
2100
2091
|
"style/no-trailing-spaces": ERROR,
|
|
2101
2092
|
"style/no-whitespace-before-property": ERROR,
|
|
2102
|
-
"style/object-curly-newline": [ERROR, {
|
|
2093
|
+
"style/object-curly-newline": [ERROR, { consistent: true, multiline: true }],
|
|
2103
2094
|
"style/object-curly-spacing": [ERROR, ALWAYS],
|
|
2104
2095
|
"style/object-property-newline": [ERROR, { allowMultiplePropertiesPerLine: true }],
|
|
2105
2096
|
"style/operator-linebreak": [ERROR, "before"],
|
|
2106
|
-
"style/padded-blocks": [ERROR, { blocks: NEVER,
|
|
2097
|
+
"style/padded-blocks": [ERROR, { blocks: NEVER, classes: NEVER, switches: NEVER }],
|
|
2107
2098
|
"style/quote-props": [ERROR, "consistent-as-needed"],
|
|
2108
2099
|
"style/quotes": [ERROR, "single"],
|
|
2109
2100
|
"style/rest-spread-spacing": [ERROR, NEVER],
|
|
2110
2101
|
"style/semi": [ERROR, ALWAYS],
|
|
2111
|
-
"style/semi-spacing": [ERROR, {
|
|
2102
|
+
"style/semi-spacing": [ERROR, { after: true, before: false }],
|
|
2112
2103
|
"style/space-before-blocks": [ERROR, ALWAYS],
|
|
2113
2104
|
"style/space-before-function-paren": [ERROR, {
|
|
2114
2105
|
anonymous: NEVER,
|
|
2115
|
-
|
|
2116
|
-
|
|
2106
|
+
asyncArrow: ALWAYS,
|
|
2107
|
+
named: NEVER
|
|
2117
2108
|
}],
|
|
2118
2109
|
"style/space-in-parens": [ERROR, NEVER],
|
|
2119
2110
|
"style/space-infix-ops": ERROR,
|
|
2120
|
-
"style/space-unary-ops": [ERROR, {
|
|
2111
|
+
"style/space-unary-ops": [ERROR, { nonwords: false, words: true }],
|
|
2121
2112
|
"style/spaced-comment": [ERROR, "always", {
|
|
2122
|
-
line: {
|
|
2123
|
-
markers: ["/"],
|
|
2124
|
-
exceptions: ["/", "#"]
|
|
2125
|
-
},
|
|
2126
2113
|
block: {
|
|
2127
|
-
|
|
2114
|
+
balanced: true,
|
|
2128
2115
|
exceptions: ["*"],
|
|
2129
|
-
|
|
2116
|
+
markers: ["!"]
|
|
2117
|
+
},
|
|
2118
|
+
line: {
|
|
2119
|
+
exceptions: ["/", "#"],
|
|
2120
|
+
markers: ["/"]
|
|
2130
2121
|
}
|
|
2131
2122
|
}],
|
|
2132
2123
|
"style/template-curly-spacing": ERROR,
|
|
@@ -2136,11 +2127,16 @@ function stylistic() {
|
|
|
2136
2127
|
functionPrototypeMethods: true
|
|
2137
2128
|
}],
|
|
2138
2129
|
"style/yield-star-spacing": [ERROR, "both"],
|
|
2139
|
-
"style/comma-dangle": [ERROR, "always-multiline"],
|
|
2140
2130
|
"vinicunca/consistent-list-newline": ERROR,
|
|
2141
2131
|
"vinicunca/if-newline": ERROR,
|
|
2142
2132
|
"vinicunca/top-level-function": ERROR
|
|
2143
2133
|
}
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
files: [GLOB_JSX, GLOB_TSX],
|
|
2137
|
+
rules: {
|
|
2138
|
+
"vinicunca/consistent-list-newline": OFF
|
|
2139
|
+
}
|
|
2144
2140
|
}
|
|
2145
2141
|
];
|
|
2146
2142
|
}
|
|
@@ -2166,8 +2162,8 @@ function test(options = {}) {
|
|
|
2166
2162
|
}
|
|
2167
2163
|
},
|
|
2168
2164
|
{
|
|
2169
|
-
name: "vinicunca:test:rules",
|
|
2170
2165
|
files: GLOB_TESTS,
|
|
2166
|
+
name: "vinicunca:test:rules",
|
|
2171
2167
|
rules: {
|
|
2172
2168
|
"test/consistent-test-it": [ERROR, { fn: "it", withinDescribe: "it" }],
|
|
2173
2169
|
"test/no-identical-title": ERROR,
|
|
@@ -2216,11 +2212,11 @@ function typescript(options) {
|
|
|
2216
2212
|
"ts/no-floating-promises": ERROR,
|
|
2217
2213
|
"ts/no-for-in-array": ERROR,
|
|
2218
2214
|
"ts/no-implied-eval": ERROR,
|
|
2219
|
-
|
|
2215
|
+
// Temporary turning it off due to performance
|
|
2216
|
+
"ts/no-misused-promises": OFF,
|
|
2220
2217
|
"ts/no-throw-literal": ERROR,
|
|
2221
2218
|
"ts/restrict-plus-operands": ERROR,
|
|
2222
|
-
"ts/restrict-template-expressions": ERROR
|
|
2223
|
-
"ts/unbound-method": ERROR
|
|
2219
|
+
"ts/restrict-template-expressions": ERROR
|
|
2224
2220
|
};
|
|
2225
2221
|
let tsConfigOptions = {};
|
|
2226
2222
|
let additionalTypeAwareRules = {};
|
|
@@ -2236,13 +2232,12 @@ function typescript(options) {
|
|
|
2236
2232
|
// Install the plugins without globs, so they can be configured separately.
|
|
2237
2233
|
name: "vinicunca:typescript:setup",
|
|
2238
2234
|
plugins: {
|
|
2239
|
-
vinicunca: import_eslint_plugin_vinicunca.default,
|
|
2240
2235
|
import: pluginImport,
|
|
2241
|
-
ts: import_eslint_plugin2.default
|
|
2236
|
+
ts: import_eslint_plugin2.default,
|
|
2237
|
+
vinicunca: import_eslint_plugin_vinicunca.default
|
|
2242
2238
|
}
|
|
2243
2239
|
},
|
|
2244
2240
|
{
|
|
2245
|
-
name: "vinicunca:typescript:rules",
|
|
2246
2241
|
files: [
|
|
2247
2242
|
GLOB_SRC,
|
|
2248
2243
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
@@ -2250,11 +2245,13 @@ function typescript(options) {
|
|
|
2250
2245
|
languageOptions: {
|
|
2251
2246
|
parser: parserTs,
|
|
2252
2247
|
parserOptions: {
|
|
2248
|
+
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
2253
2249
|
sourceType: "module",
|
|
2254
2250
|
...tsConfigOptions,
|
|
2255
2251
|
...parserOptions
|
|
2256
2252
|
}
|
|
2257
2253
|
},
|
|
2254
|
+
name: "vinicunca:typescript:rules",
|
|
2258
2255
|
rules: {
|
|
2259
2256
|
...renameRules(
|
|
2260
2257
|
import_eslint_plugin2.default.configs["eslint-recommended"].overrides[0].rules,
|
|
@@ -2267,37 +2264,37 @@ function typescript(options) {
|
|
|
2267
2264
|
"ts/"
|
|
2268
2265
|
),
|
|
2269
2266
|
"no-dupe-class-members": OFF,
|
|
2270
|
-
"ts/no-dupe-class-members": ERROR,
|
|
2271
2267
|
"no-invalid-this": OFF,
|
|
2272
|
-
"ts/no-invalid-this": ERROR,
|
|
2273
2268
|
"no-loss-of-precision": OFF,
|
|
2274
|
-
"ts/no-loss-of-precision": ERROR,
|
|
2275
2269
|
"no-redeclare": OFF,
|
|
2276
|
-
"
|
|
2270
|
+
"no-unused-vars": OFF,
|
|
2277
2271
|
"no-use-before-define": OFF,
|
|
2278
|
-
"ts/no-use-before-define": [ERROR, { functions: false, classes: false, variables: true }],
|
|
2279
2272
|
"no-useless-constructor": OFF,
|
|
2280
2273
|
"ts/ban-ts-comment": [ERROR, { "ts-ignore": "allow-with-description" }],
|
|
2281
2274
|
"ts/ban-types": [ERROR, { types: { Function: false } }],
|
|
2282
2275
|
"ts/consistent-type-definitions": [ERROR, "interface"],
|
|
2283
|
-
"ts/consistent-type-imports": [ERROR, { prefer: "type-imports"
|
|
2276
|
+
"ts/consistent-type-imports": [ERROR, { disallowTypeAnnotations: false, prefer: "type-imports" }],
|
|
2284
2277
|
"ts/explicit-function-return-type": OFF,
|
|
2285
2278
|
"ts/explicit-member-accessibility": OFF,
|
|
2286
2279
|
"ts/explicit-module-boundary-types": OFF,
|
|
2287
2280
|
"ts/naming-convention": OFF,
|
|
2281
|
+
"ts/no-dupe-class-members": ERROR,
|
|
2288
2282
|
"ts/no-empty-function": OFF,
|
|
2289
2283
|
"ts/no-empty-interface": OFF,
|
|
2290
2284
|
"ts/no-explicit-any": OFF,
|
|
2291
2285
|
"ts/no-import-type-side-effects": ERROR,
|
|
2286
|
+
"ts/no-invalid-this": ERROR,
|
|
2292
2287
|
"ts/no-invalid-void-type": OFF,
|
|
2288
|
+
"ts/no-loss-of-precision": ERROR,
|
|
2293
2289
|
"ts/no-non-null-assertion": OFF,
|
|
2290
|
+
"ts/no-redeclare": ERROR,
|
|
2294
2291
|
"ts/no-require-imports": ERROR,
|
|
2295
|
-
"no-unused-vars": OFF,
|
|
2296
2292
|
"ts/no-unused-vars": [ERROR, {
|
|
2297
2293
|
argsIgnorePattern: "^_",
|
|
2298
2294
|
destructuredArrayIgnorePattern: "^_",
|
|
2299
2295
|
ignoreRestSiblings: true
|
|
2300
2296
|
}],
|
|
2297
|
+
"ts/no-use-before-define": [ERROR, { classes: false, functions: false, variables: true }],
|
|
2301
2298
|
"ts/parameter-properties": OFF,
|
|
2302
2299
|
"ts/prefer-ts-expect-error": ERROR,
|
|
2303
2300
|
"ts/triple-slash-reference": OFF,
|
|
@@ -2310,8 +2307,8 @@ function typescript(options) {
|
|
|
2310
2307
|
}
|
|
2311
2308
|
},
|
|
2312
2309
|
{
|
|
2313
|
-
name: "vinicunca:typescript:dts-overrides",
|
|
2314
2310
|
files: ["**/*.d.ts"],
|
|
2311
|
+
name: "vinicunca:typescript:dts-overrides",
|
|
2315
2312
|
rules: {
|
|
2316
2313
|
"eslint-comments/no-unlimited-disable": OFF,
|
|
2317
2314
|
"import/no-duplicates": OFF,
|
|
@@ -2319,15 +2316,15 @@ function typescript(options) {
|
|
|
2319
2316
|
}
|
|
2320
2317
|
},
|
|
2321
2318
|
{
|
|
2322
|
-
name: "vinicunca:typescript:tests-overrides",
|
|
2323
2319
|
files: ["**/*.{test,spec}.ts?(x)"],
|
|
2320
|
+
name: "vinicunca:typescript:tests-overrides",
|
|
2324
2321
|
rules: {
|
|
2325
2322
|
"no-unused-expressions": OFF
|
|
2326
2323
|
}
|
|
2327
2324
|
},
|
|
2328
2325
|
{
|
|
2329
|
-
name: "vinicunca:typescript:javascript-overrides",
|
|
2330
2326
|
files: ["**/*.js", "**/*.cjs"],
|
|
2327
|
+
name: "vinicunca:typescript:javascript-overrides",
|
|
2331
2328
|
rules: {
|
|
2332
2329
|
"ts/no-require-imports": OFF,
|
|
2333
2330
|
"ts/no-var-requires": OFF
|
|
@@ -2354,11 +2351,11 @@ function unicorn(options = {}) {
|
|
|
2354
2351
|
"unicorn/no-new-array": ERROR,
|
|
2355
2352
|
"unicorn/no-new-buffer": ERROR,
|
|
2356
2353
|
"unicorn/number-literal-case": ERROR,
|
|
2354
|
+
"unicorn/prefer-dom-node-text-content": ERROR,
|
|
2357
2355
|
"unicorn/prefer-includes": ERROR,
|
|
2358
2356
|
"unicorn/prefer-node-protocol": ERROR,
|
|
2359
2357
|
"unicorn/prefer-number-properties": ERROR,
|
|
2360
2358
|
"unicorn/prefer-string-starts-ends-with": ERROR,
|
|
2361
|
-
"unicorn/prefer-dom-node-text-content": ERROR,
|
|
2362
2359
|
"unicorn/prefer-type-error": ERROR,
|
|
2363
2360
|
"unicorn/throw-new-error": ERROR,
|
|
2364
2361
|
...overrides
|
|
@@ -2371,8 +2368,8 @@ function unicorn(options = {}) {
|
|
|
2371
2368
|
var import_node_process2 = __toESM(require("process"), 1);
|
|
2372
2369
|
function vue(options = {}) {
|
|
2373
2370
|
const {
|
|
2374
|
-
|
|
2375
|
-
|
|
2371
|
+
overrides = {},
|
|
2372
|
+
typescript: typescript2 = {}
|
|
2376
2373
|
} = options;
|
|
2377
2374
|
let tsConfigOptions = {};
|
|
2378
2375
|
const tsconfigPath = typescript2.tsconfigPath ?? [];
|
|
@@ -2390,7 +2387,6 @@ function vue(options = {}) {
|
|
|
2390
2387
|
}
|
|
2391
2388
|
},
|
|
2392
2389
|
{
|
|
2393
|
-
name: "vinicunca:vue:rules",
|
|
2394
2390
|
files: [GLOB_VUE],
|
|
2395
2391
|
languageOptions: {
|
|
2396
2392
|
parser: import_vue_eslint_parser.default,
|
|
@@ -2404,6 +2400,7 @@ function vue(options = {}) {
|
|
|
2404
2400
|
...tsConfigOptions
|
|
2405
2401
|
}
|
|
2406
2402
|
},
|
|
2403
|
+
name: "vinicunca:vue:rules",
|
|
2407
2404
|
processor: import_eslint_plugin_vue.default.processors[".vue"],
|
|
2408
2405
|
rules: {
|
|
2409
2406
|
...import_eslint_plugin_vue.default.configs.base.rules,
|
|
@@ -2473,7 +2470,7 @@ function vue(options = {}) {
|
|
|
2473
2470
|
"vue/no-useless-v-bind": ERROR,
|
|
2474
2471
|
"vue/no-v-html": OFF,
|
|
2475
2472
|
"vue/no-v-text-v-html-on-component": OFF,
|
|
2476
|
-
"vue/object-curly-newline": [ERROR, {
|
|
2473
|
+
"vue/object-curly-newline": [ERROR, { consistent: true, multiline: true }],
|
|
2477
2474
|
"vue/object-curly-spacing": [ERROR, ALWAYS],
|
|
2478
2475
|
"vue/object-property-newline": [ERROR, { allowMultiplePropertiesPerLine: true }],
|
|
2479
2476
|
"vue/object-shorthand": [ERROR, ALWAYS, {
|
|
@@ -2514,11 +2511,11 @@ function yaml(options = {}) {
|
|
|
2514
2511
|
}
|
|
2515
2512
|
},
|
|
2516
2513
|
{
|
|
2517
|
-
name: "vinicunca:yaml:rules",
|
|
2518
2514
|
files: [GLOB_YAML],
|
|
2519
2515
|
languageOptions: {
|
|
2520
2516
|
parser: import_yaml_eslint_parser.default
|
|
2521
2517
|
},
|
|
2518
|
+
name: "vinicunca:yaml:rules",
|
|
2522
2519
|
rules: {
|
|
2523
2520
|
"style/spaced-comment": OFF,
|
|
2524
2521
|
"yaml/block-mapping": ERROR,
|
|
@@ -2554,17 +2551,17 @@ var VuePackages = [
|
|
|
2554
2551
|
];
|
|
2555
2552
|
function vinicuncaESLint({ options = {}, userConfigs = [] } = {}) {
|
|
2556
2553
|
const {
|
|
2554
|
+
componentExts = [],
|
|
2557
2555
|
isInEditor = !!((import_node_process3.default.env.VSCODE_PID || import_node_process3.default.env.JETBRAINS_IDE) && !import_node_process3.default.env.CI),
|
|
2558
|
-
vue: enableVue = VuePackages.some((i) => (0, import_local_pkg.isPackageExists)(i)),
|
|
2559
|
-
typescript: tsOptions = {},
|
|
2560
|
-
stylistic: enableStylistic = true,
|
|
2561
|
-
test: enableTest = true,
|
|
2562
2556
|
jsonc: enableJsonc = true,
|
|
2563
|
-
yaml: enableYaml = true,
|
|
2564
2557
|
markdown: enableMarkdown = true,
|
|
2565
|
-
react: enableReact = false,
|
|
2566
2558
|
overrides = {},
|
|
2567
|
-
|
|
2559
|
+
react: enableReact = false,
|
|
2560
|
+
stylistic: enableStylistic = true,
|
|
2561
|
+
test: enableTest = true,
|
|
2562
|
+
typescript: tsOptions = {},
|
|
2563
|
+
vue: enableVue = VuePackages.some((i) => (0, import_local_pkg.isPackageExists)(i)),
|
|
2564
|
+
yaml: enableYaml = true
|
|
2568
2565
|
} = options;
|
|
2569
2566
|
const configs = [];
|
|
2570
2567
|
configs.push(
|
|
@@ -2604,11 +2601,11 @@ function vinicuncaESLint({ options = {}, userConfigs = [] } = {}) {
|
|
|
2604
2601
|
;
|
|
2605
2602
|
if (enableVue) {
|
|
2606
2603
|
configs.push(vue({
|
|
2604
|
+
overrides: overrides.vue,
|
|
2607
2605
|
typescript: {
|
|
2608
2606
|
enabled: tsEnabled,
|
|
2609
2607
|
...tsParams
|
|
2610
|
-
}
|
|
2611
|
-
overrides: overrides.vue
|
|
2608
|
+
}
|
|
2612
2609
|
}));
|
|
2613
2610
|
}
|
|
2614
2611
|
;
|
|
@@ -2685,6 +2682,7 @@ var src_default = vinicuncaESLint;
|
|
|
2685
2682
|
pluginMarkdown,
|
|
2686
2683
|
pluginNoOnlyTests,
|
|
2687
2684
|
pluginNode,
|
|
2685
|
+
pluginPerfectionist,
|
|
2688
2686
|
pluginReact,
|
|
2689
2687
|
pluginReactHooks,
|
|
2690
2688
|
pluginStylistic,
|