@vinicunca/eslint-config 2.0.3 → 2.0.5
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 +173 -181
- package/dist/index.d.cts +48 -47
- package/dist/index.d.ts +48 -47
- package/dist/index.js +206 -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,84 +1712,79 @@ 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/prop-types": OFF,
|
|
1796
1778
|
"react/react-in-jsx-scope": OFF,
|
|
1779
|
+
"react/self-closing-comp": ERROR,
|
|
1780
|
+
"react/style-prop-object": ERROR,
|
|
1781
|
+
"style/jsx-quotes": [ERROR, "prefer-double"],
|
|
1797
1782
|
...overrides
|
|
1783
|
+
},
|
|
1784
|
+
settings: {
|
|
1785
|
+
react: {
|
|
1786
|
+
version: "detect"
|
|
1787
|
+
}
|
|
1798
1788
|
}
|
|
1799
1789
|
}
|
|
1800
1790
|
];
|
|
@@ -1804,8 +1794,8 @@ function react(options = {}) {
|
|
|
1804
1794
|
function sortPackageJson() {
|
|
1805
1795
|
return [
|
|
1806
1796
|
{
|
|
1807
|
-
name: "vinicunca:sort-package-json",
|
|
1808
1797
|
files: ["**/package.json"],
|
|
1798
|
+
name: "vinicunca:sort-package-json",
|
|
1809
1799
|
rules: {
|
|
1810
1800
|
"jsonc/sort-array-values": [
|
|
1811
1801
|
ERROR,
|
|
@@ -1893,8 +1883,8 @@ function sortPackageJson() {
|
|
|
1893
1883
|
function sortTsconfig() {
|
|
1894
1884
|
return [
|
|
1895
1885
|
{
|
|
1896
|
-
name: "vinicunca:sort-tsconfig",
|
|
1897
1886
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
1887
|
+
name: "vinicunca:sort-tsconfig",
|
|
1898
1888
|
rules: {
|
|
1899
1889
|
"jsonc/sort-keys": [
|
|
1900
1890
|
ERROR,
|
|
@@ -2022,18 +2012,19 @@ function stylistic() {
|
|
|
2022
2012
|
{
|
|
2023
2013
|
name: "vinicunca:stylistic",
|
|
2024
2014
|
plugins: {
|
|
2025
|
-
|
|
2026
|
-
|
|
2015
|
+
style: import_eslint_plugin.default,
|
|
2016
|
+
vinicunca: import_eslint_plugin_vinicunca.default
|
|
2027
2017
|
},
|
|
2028
2018
|
rules: {
|
|
2029
2019
|
"curly": [ERROR, "all"],
|
|
2030
2020
|
"style/array-bracket-newline": [ERROR, CONSISTENT],
|
|
2031
2021
|
"style/array-bracket-spacing": [ERROR, NEVER],
|
|
2032
2022
|
"style/array-element-newline": [ERROR, CONSISTENT],
|
|
2033
|
-
"style/arrow-spacing": [ERROR, {
|
|
2023
|
+
"style/arrow-spacing": [ERROR, { after: true, before: true }],
|
|
2034
2024
|
"style/block-spacing": [ERROR, ALWAYS],
|
|
2035
2025
|
"style/brace-style": [ERROR],
|
|
2036
|
-
"style/comma-
|
|
2026
|
+
"style/comma-dangle": [ERROR, "always-multiline"],
|
|
2027
|
+
"style/comma-spacing": [ERROR, { after: true, before: false }],
|
|
2037
2028
|
"style/comma-style": [ERROR, "last"],
|
|
2038
2029
|
"style/computed-property-spacing": [ERROR, NEVER, { enforceForClassMembers: true }],
|
|
2039
2030
|
"style/dot-location": [ERROR, "property"],
|
|
@@ -2077,8 +2068,8 @@ function stylistic() {
|
|
|
2077
2068
|
offsetTernaryExpressions: true,
|
|
2078
2069
|
outerIIFEBody: 1
|
|
2079
2070
|
}],
|
|
2080
|
-
"style/key-spacing": [ERROR, {
|
|
2081
|
-
"style/keyword-spacing": [ERROR, {
|
|
2071
|
+
"style/key-spacing": [ERROR, { afterColon: true, beforeColon: false }],
|
|
2072
|
+
"style/keyword-spacing": [ERROR, { after: true, before: true }],
|
|
2082
2073
|
"style/lines-between-class-members": [ERROR, ALWAYS, { exceptAfterSingleLine: true }],
|
|
2083
2074
|
"style/max-statements-per-line": [ERROR, { max: 1 }],
|
|
2084
2075
|
"style/member-delimiter-style": [ERROR],
|
|
@@ -2087,12 +2078,12 @@ function stylistic() {
|
|
|
2087
2078
|
"style/no-extra-parens": [ERROR, "functions"],
|
|
2088
2079
|
"style/no-floating-decimal": ERROR,
|
|
2089
2080
|
"style/no-mixed-operators": [ERROR, {
|
|
2081
|
+
allowSamePrecedence: true,
|
|
2090
2082
|
groups: [
|
|
2091
2083
|
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
2092
2084
|
["&&", "||"],
|
|
2093
2085
|
["in", "instanceof"]
|
|
2094
|
-
]
|
|
2095
|
-
allowSamePrecedence: true
|
|
2086
|
+
]
|
|
2096
2087
|
}],
|
|
2097
2088
|
"style/no-mixed-spaces-and-tabs": ERROR,
|
|
2098
2089
|
"style/no-multi-spaces": ERROR,
|
|
@@ -2100,34 +2091,34 @@ function stylistic() {
|
|
|
2100
2091
|
"style/no-tabs": ERROR,
|
|
2101
2092
|
"style/no-trailing-spaces": ERROR,
|
|
2102
2093
|
"style/no-whitespace-before-property": ERROR,
|
|
2103
|
-
"style/object-curly-newline": [ERROR, {
|
|
2094
|
+
"style/object-curly-newline": [ERROR, { consistent: true, multiline: true }],
|
|
2104
2095
|
"style/object-curly-spacing": [ERROR, ALWAYS],
|
|
2105
2096
|
"style/object-property-newline": [ERROR, { allowMultiplePropertiesPerLine: true }],
|
|
2106
2097
|
"style/operator-linebreak": [ERROR, "before"],
|
|
2107
|
-
"style/padded-blocks": [ERROR, { blocks: NEVER,
|
|
2098
|
+
"style/padded-blocks": [ERROR, { blocks: NEVER, classes: NEVER, switches: NEVER }],
|
|
2108
2099
|
"style/quote-props": [ERROR, "consistent-as-needed"],
|
|
2109
2100
|
"style/quotes": [ERROR, "single"],
|
|
2110
2101
|
"style/rest-spread-spacing": [ERROR, NEVER],
|
|
2111
2102
|
"style/semi": [ERROR, ALWAYS],
|
|
2112
|
-
"style/semi-spacing": [ERROR, {
|
|
2103
|
+
"style/semi-spacing": [ERROR, { after: true, before: false }],
|
|
2113
2104
|
"style/space-before-blocks": [ERROR, ALWAYS],
|
|
2114
2105
|
"style/space-before-function-paren": [ERROR, {
|
|
2115
2106
|
anonymous: NEVER,
|
|
2116
|
-
|
|
2117
|
-
|
|
2107
|
+
asyncArrow: ALWAYS,
|
|
2108
|
+
named: NEVER
|
|
2118
2109
|
}],
|
|
2119
2110
|
"style/space-in-parens": [ERROR, NEVER],
|
|
2120
2111
|
"style/space-infix-ops": ERROR,
|
|
2121
|
-
"style/space-unary-ops": [ERROR, {
|
|
2112
|
+
"style/space-unary-ops": [ERROR, { nonwords: false, words: true }],
|
|
2122
2113
|
"style/spaced-comment": [ERROR, "always", {
|
|
2123
|
-
line: {
|
|
2124
|
-
markers: ["/"],
|
|
2125
|
-
exceptions: ["/", "#"]
|
|
2126
|
-
},
|
|
2127
2114
|
block: {
|
|
2128
|
-
|
|
2115
|
+
balanced: true,
|
|
2129
2116
|
exceptions: ["*"],
|
|
2130
|
-
|
|
2117
|
+
markers: ["!"]
|
|
2118
|
+
},
|
|
2119
|
+
line: {
|
|
2120
|
+
exceptions: ["/", "#"],
|
|
2121
|
+
markers: ["/"]
|
|
2131
2122
|
}
|
|
2132
2123
|
}],
|
|
2133
2124
|
"style/template-curly-spacing": ERROR,
|
|
@@ -2137,7 +2128,6 @@ function stylistic() {
|
|
|
2137
2128
|
functionPrototypeMethods: true
|
|
2138
2129
|
}],
|
|
2139
2130
|
"style/yield-star-spacing": [ERROR, "both"],
|
|
2140
|
-
"style/comma-dangle": [ERROR, "always-multiline"],
|
|
2141
2131
|
"vinicunca/consistent-list-newline": ERROR,
|
|
2142
2132
|
"vinicunca/if-newline": ERROR,
|
|
2143
2133
|
"vinicunca/top-level-function": ERROR
|
|
@@ -2173,8 +2163,8 @@ function test(options = {}) {
|
|
|
2173
2163
|
}
|
|
2174
2164
|
},
|
|
2175
2165
|
{
|
|
2176
|
-
name: "vinicunca:test:rules",
|
|
2177
2166
|
files: GLOB_TESTS,
|
|
2167
|
+
name: "vinicunca:test:rules",
|
|
2178
2168
|
rules: {
|
|
2179
2169
|
"test/consistent-test-it": [ERROR, { fn: "it", withinDescribe: "it" }],
|
|
2180
2170
|
"test/no-identical-title": ERROR,
|
|
@@ -2223,11 +2213,11 @@ function typescript(options) {
|
|
|
2223
2213
|
"ts/no-floating-promises": ERROR,
|
|
2224
2214
|
"ts/no-for-in-array": ERROR,
|
|
2225
2215
|
"ts/no-implied-eval": ERROR,
|
|
2226
|
-
|
|
2216
|
+
// Temporary turning it off due to performance
|
|
2217
|
+
"ts/no-misused-promises": OFF,
|
|
2227
2218
|
"ts/no-throw-literal": ERROR,
|
|
2228
2219
|
"ts/restrict-plus-operands": ERROR,
|
|
2229
|
-
"ts/restrict-template-expressions": ERROR
|
|
2230
|
-
"ts/unbound-method": ERROR
|
|
2220
|
+
"ts/restrict-template-expressions": ERROR
|
|
2231
2221
|
};
|
|
2232
2222
|
let tsConfigOptions = {};
|
|
2233
2223
|
let additionalTypeAwareRules = {};
|
|
@@ -2243,13 +2233,12 @@ function typescript(options) {
|
|
|
2243
2233
|
// Install the plugins without globs, so they can be configured separately.
|
|
2244
2234
|
name: "vinicunca:typescript:setup",
|
|
2245
2235
|
plugins: {
|
|
2246
|
-
vinicunca: import_eslint_plugin_vinicunca.default,
|
|
2247
2236
|
import: pluginImport,
|
|
2248
|
-
ts: import_eslint_plugin2.default
|
|
2237
|
+
ts: import_eslint_plugin2.default,
|
|
2238
|
+
vinicunca: import_eslint_plugin_vinicunca.default
|
|
2249
2239
|
}
|
|
2250
2240
|
},
|
|
2251
2241
|
{
|
|
2252
|
-
name: "vinicunca:typescript:rules",
|
|
2253
2242
|
files: [
|
|
2254
2243
|
GLOB_SRC,
|
|
2255
2244
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
@@ -2257,11 +2246,13 @@ function typescript(options) {
|
|
|
2257
2246
|
languageOptions: {
|
|
2258
2247
|
parser: parserTs,
|
|
2259
2248
|
parserOptions: {
|
|
2249
|
+
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
2260
2250
|
sourceType: "module",
|
|
2261
2251
|
...tsConfigOptions,
|
|
2262
2252
|
...parserOptions
|
|
2263
2253
|
}
|
|
2264
2254
|
},
|
|
2255
|
+
name: "vinicunca:typescript:rules",
|
|
2265
2256
|
rules: {
|
|
2266
2257
|
...renameRules(
|
|
2267
2258
|
import_eslint_plugin2.default.configs["eslint-recommended"].overrides[0].rules,
|
|
@@ -2274,37 +2265,37 @@ function typescript(options) {
|
|
|
2274
2265
|
"ts/"
|
|
2275
2266
|
),
|
|
2276
2267
|
"no-dupe-class-members": OFF,
|
|
2277
|
-
"ts/no-dupe-class-members": ERROR,
|
|
2278
2268
|
"no-invalid-this": OFF,
|
|
2279
|
-
"ts/no-invalid-this": ERROR,
|
|
2280
2269
|
"no-loss-of-precision": OFF,
|
|
2281
|
-
"ts/no-loss-of-precision": ERROR,
|
|
2282
2270
|
"no-redeclare": OFF,
|
|
2283
|
-
"
|
|
2271
|
+
"no-unused-vars": OFF,
|
|
2284
2272
|
"no-use-before-define": OFF,
|
|
2285
|
-
"ts/no-use-before-define": [ERROR, { functions: false, classes: false, variables: true }],
|
|
2286
2273
|
"no-useless-constructor": OFF,
|
|
2287
2274
|
"ts/ban-ts-comment": [ERROR, { "ts-ignore": "allow-with-description" }],
|
|
2288
2275
|
"ts/ban-types": [ERROR, { types: { Function: false } }],
|
|
2289
2276
|
"ts/consistent-type-definitions": [ERROR, "interface"],
|
|
2290
|
-
"ts/consistent-type-imports": [ERROR, { prefer: "type-imports"
|
|
2277
|
+
"ts/consistent-type-imports": [ERROR, { disallowTypeAnnotations: false, prefer: "type-imports" }],
|
|
2291
2278
|
"ts/explicit-function-return-type": OFF,
|
|
2292
2279
|
"ts/explicit-member-accessibility": OFF,
|
|
2293
2280
|
"ts/explicit-module-boundary-types": OFF,
|
|
2294
2281
|
"ts/naming-convention": OFF,
|
|
2282
|
+
"ts/no-dupe-class-members": ERROR,
|
|
2295
2283
|
"ts/no-empty-function": OFF,
|
|
2296
2284
|
"ts/no-empty-interface": OFF,
|
|
2297
2285
|
"ts/no-explicit-any": OFF,
|
|
2298
2286
|
"ts/no-import-type-side-effects": ERROR,
|
|
2287
|
+
"ts/no-invalid-this": ERROR,
|
|
2299
2288
|
"ts/no-invalid-void-type": OFF,
|
|
2289
|
+
"ts/no-loss-of-precision": ERROR,
|
|
2300
2290
|
"ts/no-non-null-assertion": OFF,
|
|
2291
|
+
"ts/no-redeclare": ERROR,
|
|
2301
2292
|
"ts/no-require-imports": ERROR,
|
|
2302
|
-
"no-unused-vars": OFF,
|
|
2303
2293
|
"ts/no-unused-vars": [ERROR, {
|
|
2304
2294
|
argsIgnorePattern: "^_",
|
|
2305
2295
|
destructuredArrayIgnorePattern: "^_",
|
|
2306
2296
|
ignoreRestSiblings: true
|
|
2307
2297
|
}],
|
|
2298
|
+
"ts/no-use-before-define": [ERROR, { classes: false, functions: false, variables: true }],
|
|
2308
2299
|
"ts/parameter-properties": OFF,
|
|
2309
2300
|
"ts/prefer-ts-expect-error": ERROR,
|
|
2310
2301
|
"ts/triple-slash-reference": OFF,
|
|
@@ -2317,8 +2308,8 @@ function typescript(options) {
|
|
|
2317
2308
|
}
|
|
2318
2309
|
},
|
|
2319
2310
|
{
|
|
2320
|
-
name: "vinicunca:typescript:dts-overrides",
|
|
2321
2311
|
files: ["**/*.d.ts"],
|
|
2312
|
+
name: "vinicunca:typescript:dts-overrides",
|
|
2322
2313
|
rules: {
|
|
2323
2314
|
"eslint-comments/no-unlimited-disable": OFF,
|
|
2324
2315
|
"import/no-duplicates": OFF,
|
|
@@ -2326,15 +2317,15 @@ function typescript(options) {
|
|
|
2326
2317
|
}
|
|
2327
2318
|
},
|
|
2328
2319
|
{
|
|
2329
|
-
name: "vinicunca:typescript:tests-overrides",
|
|
2330
2320
|
files: ["**/*.{test,spec}.ts?(x)"],
|
|
2321
|
+
name: "vinicunca:typescript:tests-overrides",
|
|
2331
2322
|
rules: {
|
|
2332
2323
|
"no-unused-expressions": OFF
|
|
2333
2324
|
}
|
|
2334
2325
|
},
|
|
2335
2326
|
{
|
|
2336
|
-
name: "vinicunca:typescript:javascript-overrides",
|
|
2337
2327
|
files: ["**/*.js", "**/*.cjs"],
|
|
2328
|
+
name: "vinicunca:typescript:javascript-overrides",
|
|
2338
2329
|
rules: {
|
|
2339
2330
|
"ts/no-require-imports": OFF,
|
|
2340
2331
|
"ts/no-var-requires": OFF
|
|
@@ -2361,11 +2352,11 @@ function unicorn(options = {}) {
|
|
|
2361
2352
|
"unicorn/no-new-array": ERROR,
|
|
2362
2353
|
"unicorn/no-new-buffer": ERROR,
|
|
2363
2354
|
"unicorn/number-literal-case": ERROR,
|
|
2355
|
+
"unicorn/prefer-dom-node-text-content": ERROR,
|
|
2364
2356
|
"unicorn/prefer-includes": ERROR,
|
|
2365
2357
|
"unicorn/prefer-node-protocol": ERROR,
|
|
2366
2358
|
"unicorn/prefer-number-properties": ERROR,
|
|
2367
2359
|
"unicorn/prefer-string-starts-ends-with": ERROR,
|
|
2368
|
-
"unicorn/prefer-dom-node-text-content": ERROR,
|
|
2369
2360
|
"unicorn/prefer-type-error": ERROR,
|
|
2370
2361
|
"unicorn/throw-new-error": ERROR,
|
|
2371
2362
|
...overrides
|
|
@@ -2378,8 +2369,8 @@ function unicorn(options = {}) {
|
|
|
2378
2369
|
var import_node_process2 = __toESM(require("process"), 1);
|
|
2379
2370
|
function vue(options = {}) {
|
|
2380
2371
|
const {
|
|
2381
|
-
|
|
2382
|
-
|
|
2372
|
+
overrides = {},
|
|
2373
|
+
typescript: typescript2 = {}
|
|
2383
2374
|
} = options;
|
|
2384
2375
|
let tsConfigOptions = {};
|
|
2385
2376
|
const tsconfigPath = typescript2.tsconfigPath ?? [];
|
|
@@ -2397,7 +2388,6 @@ function vue(options = {}) {
|
|
|
2397
2388
|
}
|
|
2398
2389
|
},
|
|
2399
2390
|
{
|
|
2400
|
-
name: "vinicunca:vue:rules",
|
|
2401
2391
|
files: [GLOB_VUE],
|
|
2402
2392
|
languageOptions: {
|
|
2403
2393
|
parser: import_vue_eslint_parser.default,
|
|
@@ -2411,6 +2401,7 @@ function vue(options = {}) {
|
|
|
2411
2401
|
...tsConfigOptions
|
|
2412
2402
|
}
|
|
2413
2403
|
},
|
|
2404
|
+
name: "vinicunca:vue:rules",
|
|
2414
2405
|
processor: import_eslint_plugin_vue.default.processors[".vue"],
|
|
2415
2406
|
rules: {
|
|
2416
2407
|
...import_eslint_plugin_vue.default.configs.base.rules,
|
|
@@ -2480,7 +2471,7 @@ function vue(options = {}) {
|
|
|
2480
2471
|
"vue/no-useless-v-bind": ERROR,
|
|
2481
2472
|
"vue/no-v-html": OFF,
|
|
2482
2473
|
"vue/no-v-text-v-html-on-component": OFF,
|
|
2483
|
-
"vue/object-curly-newline": [ERROR, {
|
|
2474
|
+
"vue/object-curly-newline": [ERROR, { consistent: true, multiline: true }],
|
|
2484
2475
|
"vue/object-curly-spacing": [ERROR, ALWAYS],
|
|
2485
2476
|
"vue/object-property-newline": [ERROR, { allowMultiplePropertiesPerLine: true }],
|
|
2486
2477
|
"vue/object-shorthand": [ERROR, ALWAYS, {
|
|
@@ -2521,11 +2512,11 @@ function yaml(options = {}) {
|
|
|
2521
2512
|
}
|
|
2522
2513
|
},
|
|
2523
2514
|
{
|
|
2524
|
-
name: "vinicunca:yaml:rules",
|
|
2525
2515
|
files: [GLOB_YAML],
|
|
2526
2516
|
languageOptions: {
|
|
2527
2517
|
parser: import_yaml_eslint_parser.default
|
|
2528
2518
|
},
|
|
2519
|
+
name: "vinicunca:yaml:rules",
|
|
2529
2520
|
rules: {
|
|
2530
2521
|
"style/spaced-comment": OFF,
|
|
2531
2522
|
"yaml/block-mapping": ERROR,
|
|
@@ -2561,17 +2552,17 @@ var VuePackages = [
|
|
|
2561
2552
|
];
|
|
2562
2553
|
function vinicuncaESLint({ options = {}, userConfigs = [] } = {}) {
|
|
2563
2554
|
const {
|
|
2555
|
+
componentExts = [],
|
|
2564
2556
|
isInEditor = !!((import_node_process3.default.env.VSCODE_PID || import_node_process3.default.env.JETBRAINS_IDE) && !import_node_process3.default.env.CI),
|
|
2565
|
-
vue: enableVue = VuePackages.some((i) => (0, import_local_pkg.isPackageExists)(i)),
|
|
2566
|
-
typescript: tsOptions = {},
|
|
2567
|
-
stylistic: enableStylistic = true,
|
|
2568
|
-
test: enableTest = true,
|
|
2569
2557
|
jsonc: enableJsonc = true,
|
|
2570
|
-
yaml: enableYaml = true,
|
|
2571
2558
|
markdown: enableMarkdown = true,
|
|
2572
|
-
react: enableReact = false,
|
|
2573
2559
|
overrides = {},
|
|
2574
|
-
|
|
2560
|
+
react: enableReact = false,
|
|
2561
|
+
stylistic: enableStylistic = true,
|
|
2562
|
+
test: enableTest = true,
|
|
2563
|
+
typescript: tsOptions = {},
|
|
2564
|
+
vue: enableVue = VuePackages.some((i) => (0, import_local_pkg.isPackageExists)(i)),
|
|
2565
|
+
yaml: enableYaml = true
|
|
2575
2566
|
} = options;
|
|
2576
2567
|
const configs = [];
|
|
2577
2568
|
configs.push(
|
|
@@ -2611,11 +2602,11 @@ function vinicuncaESLint({ options = {}, userConfigs = [] } = {}) {
|
|
|
2611
2602
|
;
|
|
2612
2603
|
if (enableVue) {
|
|
2613
2604
|
configs.push(vue({
|
|
2605
|
+
overrides: overrides.vue,
|
|
2614
2606
|
typescript: {
|
|
2615
2607
|
enabled: tsEnabled,
|
|
2616
2608
|
...tsParams
|
|
2617
|
-
}
|
|
2618
|
-
overrides: overrides.vue
|
|
2609
|
+
}
|
|
2619
2610
|
}));
|
|
2620
2611
|
}
|
|
2621
2612
|
;
|
|
@@ -2692,6 +2683,7 @@ var src_default = vinicuncaESLint;
|
|
|
2692
2683
|
pluginMarkdown,
|
|
2693
2684
|
pluginNoOnlyTests,
|
|
2694
2685
|
pluginNode,
|
|
2686
|
+
pluginPerfectionist,
|
|
2695
2687
|
pluginReact,
|
|
2696
2688
|
pluginReactHooks,
|
|
2697
2689
|
pluginStylistic,
|