@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.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/base.ts
|
|
2
|
-
import process3 from "process";
|
|
3
2
|
import { isPackageExists } from "local-pkg";
|
|
3
|
+
import process3 from "process";
|
|
4
4
|
|
|
5
5
|
// src/flags.ts
|
|
6
6
|
var ERROR = "error";
|
|
@@ -12,9 +12,9 @@ var ALWAYS = "always";
|
|
|
12
12
|
|
|
13
13
|
// src/plugins.ts
|
|
14
14
|
import { default as default2 } from "@stylistic/eslint-plugin";
|
|
15
|
-
import { default as default3 } from "@
|
|
16
|
-
import { default as default4 } from "@typescript-eslint/eslint-plugin";
|
|
15
|
+
import { default as default3 } from "@typescript-eslint/eslint-plugin";
|
|
17
16
|
import * as parserTs from "@typescript-eslint/parser";
|
|
17
|
+
import { default as default4 } from "@vinicunca/eslint-plugin-vinicunca";
|
|
18
18
|
import { default as default5 } from "eslint-plugin-eslint-comments";
|
|
19
19
|
import * as pluginImport from "eslint-plugin-i";
|
|
20
20
|
import { default as default6 } from "eslint-plugin-jsdoc";
|
|
@@ -22,16 +22,17 @@ import * as pluginJsonc from "eslint-plugin-jsonc";
|
|
|
22
22
|
import { default as default7 } from "eslint-plugin-markdown";
|
|
23
23
|
import { default as default8 } from "eslint-plugin-n";
|
|
24
24
|
import { default as default9 } from "eslint-plugin-no-only-tests";
|
|
25
|
-
import { default as default10 } from "eslint-plugin-
|
|
26
|
-
import { default as default11 } from "eslint-plugin-
|
|
27
|
-
import { default as default12 } from "eslint-plugin-react";
|
|
28
|
-
import { default as default13 } from "eslint-plugin-
|
|
29
|
-
import { default as default14 } from "eslint-plugin-
|
|
30
|
-
import * as pluginYaml from "eslint-plugin-yml";
|
|
25
|
+
import { default as default10 } from "eslint-plugin-perfectionist";
|
|
26
|
+
import { default as default11 } from "eslint-plugin-react";
|
|
27
|
+
import { default as default12 } from "eslint-plugin-react-hooks";
|
|
28
|
+
import { default as default13 } from "eslint-plugin-unicorn";
|
|
29
|
+
import { default as default14 } from "eslint-plugin-unused-imports";
|
|
31
30
|
import { default as default15 } from "eslint-plugin-vitest";
|
|
32
|
-
import { default as default16 } from "
|
|
33
|
-
import
|
|
34
|
-
import { default as
|
|
31
|
+
import { default as default16 } from "eslint-plugin-vue";
|
|
32
|
+
import * as pluginYaml from "eslint-plugin-yml";
|
|
33
|
+
import { default as default17 } from "jsonc-eslint-parser";
|
|
34
|
+
import { default as default18 } from "vue-eslint-parser";
|
|
35
|
+
import { default as default19 } from "yaml-eslint-parser";
|
|
35
36
|
|
|
36
37
|
// src/configs/comments.ts
|
|
37
38
|
function comments() {
|
|
@@ -51,10 +52,6 @@ function comments() {
|
|
|
51
52
|
];
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
// src/configs/ignores.ts
|
|
55
|
-
import fs from "fs";
|
|
56
|
-
import parseGitignore from "parse-gitignore";
|
|
57
|
-
|
|
58
55
|
// ../node_modules/.pnpm/@vinicunca+perkakas@0.0.10/node_modules/@vinicunca/perkakas/dist/index.js
|
|
59
56
|
function purry(fn, args, lazy) {
|
|
60
57
|
const diff = fn.length - args.length;
|
|
@@ -1029,6 +1026,10 @@ function toPairs(object) {
|
|
|
1029
1026
|
toPairs2.strict = strict;
|
|
1030
1027
|
})(toPairs || (toPairs = {}));
|
|
1031
1028
|
|
|
1029
|
+
// src/configs/ignores.ts
|
|
1030
|
+
import fs from "fs";
|
|
1031
|
+
import parseGitignore from "parse-gitignore";
|
|
1032
|
+
|
|
1032
1033
|
// src/globs.ts
|
|
1033
1034
|
var GLOB_JS = "**/*.?([cm])js";
|
|
1034
1035
|
var GLOB_JSX = "**/*.?([cm])jsx";
|
|
@@ -1083,19 +1084,17 @@ function ignores({
|
|
|
1083
1084
|
replace = false
|
|
1084
1085
|
} = {}) {
|
|
1085
1086
|
const ignoreList = [];
|
|
1086
|
-
if (enableGitignore) {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
ignoreList.push(...glob.patterns.map((pattern) => `!${pattern}`));
|
|
1096
|
-
}
|
|
1097
|
-
;
|
|
1087
|
+
if (enableGitignore && fs.existsSync(".gitignore")) {
|
|
1088
|
+
const gitignoreContent = fs.readFileSync(".gitignore", "utf8");
|
|
1089
|
+
const parsed = parseGitignore(gitignoreContent);
|
|
1090
|
+
const globs = parsed.globs();
|
|
1091
|
+
for (const glob of globs) {
|
|
1092
|
+
if (glob.type === "ignore") {
|
|
1093
|
+
ignoreList.push(...glob.patterns);
|
|
1094
|
+
} else if (glob.type === "unignore") {
|
|
1095
|
+
ignoreList.push(...glob.patterns.map((pattern) => `!${pattern}`));
|
|
1098
1096
|
}
|
|
1097
|
+
;
|
|
1099
1098
|
}
|
|
1100
1099
|
}
|
|
1101
1100
|
if (replace) {
|
|
@@ -1117,12 +1116,12 @@ function imports() {
|
|
|
1117
1116
|
name: "vinicunca:imports",
|
|
1118
1117
|
plugins: {
|
|
1119
1118
|
import: pluginImport,
|
|
1120
|
-
vinicunca:
|
|
1119
|
+
vinicunca: default4
|
|
1121
1120
|
},
|
|
1122
1121
|
rules: {
|
|
1123
1122
|
"import/export": ERROR,
|
|
1124
1123
|
"import/first": ERROR,
|
|
1125
|
-
"import/newline-after-import": [
|
|
1124
|
+
"import/newline-after-import": [OFF, {
|
|
1126
1125
|
considerComments: true,
|
|
1127
1126
|
count: 1
|
|
1128
1127
|
}],
|
|
@@ -1131,7 +1130,8 @@ function imports() {
|
|
|
1131
1130
|
"import/no-named-default": ERROR,
|
|
1132
1131
|
"import/no-self-import": ERROR,
|
|
1133
1132
|
"import/no-webpack-loader-syntax": ERROR,
|
|
1134
|
-
|
|
1133
|
+
// Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-imports
|
|
1134
|
+
"import/order": OFF,
|
|
1135
1135
|
"vinicunca/import-dedupe": ERROR,
|
|
1136
1136
|
"vinicunca/no-import-node-modules-by-path": ERROR
|
|
1137
1137
|
}
|
|
@@ -1148,7 +1148,6 @@ function javascript(options = {}) {
|
|
|
1148
1148
|
} = options;
|
|
1149
1149
|
return [
|
|
1150
1150
|
{
|
|
1151
|
-
name: "vinicunca:javascript",
|
|
1152
1151
|
languageOptions: {
|
|
1153
1152
|
ecmaVersion: 2022,
|
|
1154
1153
|
globals: {
|
|
@@ -1168,22 +1167,24 @@ function javascript(options = {}) {
|
|
|
1168
1167
|
linterOptions: {
|
|
1169
1168
|
reportUnusedDisableDirectives: true
|
|
1170
1169
|
},
|
|
1170
|
+
name: "vinicunca:javascript",
|
|
1171
1171
|
plugins: {
|
|
1172
|
-
"
|
|
1173
|
-
"unused-imports":
|
|
1172
|
+
"perfectionist": default10,
|
|
1173
|
+
"unused-imports": default14,
|
|
1174
|
+
"vinicunca": default4
|
|
1174
1175
|
},
|
|
1175
1176
|
rules: {
|
|
1176
1177
|
"accessor-pairs": [ERROR, {
|
|
1177
|
-
|
|
1178
|
-
|
|
1178
|
+
enforceForClassMembers: true,
|
|
1179
|
+
setWithoutGet: true
|
|
1179
1180
|
}],
|
|
1180
1181
|
"array-callback-return": [ERROR, { checkForEach: true }],
|
|
1181
1182
|
"arrow-parens": [ERROR, ALWAYS],
|
|
1182
1183
|
"block-scoped-var": ERROR,
|
|
1183
1184
|
"camelcase": [ERROR, {
|
|
1184
1185
|
allow: ["^UNSAFE_"],
|
|
1185
|
-
|
|
1186
|
-
|
|
1186
|
+
ignoreGlobals: true,
|
|
1187
|
+
properties: NEVER
|
|
1187
1188
|
}],
|
|
1188
1189
|
"constructor-super": ERROR,
|
|
1189
1190
|
"default-case-last": ERROR,
|
|
@@ -1202,10 +1203,10 @@ function javascript(options = {}) {
|
|
|
1202
1203
|
"no-case-declarations": ERROR,
|
|
1203
1204
|
"no-class-assign": ERROR,
|
|
1204
1205
|
"no-compare-neg-zero": ERROR,
|
|
1206
|
+
"no-cond-assign": [ERROR, ALWAYS],
|
|
1205
1207
|
"no-console": [ERROR, {
|
|
1206
1208
|
allow: [WARN, ERROR]
|
|
1207
1209
|
}],
|
|
1208
|
-
"no-cond-assign": [ERROR, ALWAYS],
|
|
1209
1210
|
"no-const-assign": ERROR,
|
|
1210
1211
|
"no-constant-binary-expression": ERROR,
|
|
1211
1212
|
"no-constant-condition": [ERROR, {
|
|
@@ -1235,8 +1236,8 @@ function javascript(options = {}) {
|
|
|
1235
1236
|
"no-global-assign": ERROR,
|
|
1236
1237
|
"no-implied-eval": ERROR,
|
|
1237
1238
|
"no-import-assign": ERROR,
|
|
1238
|
-
"no-invalid-this": ERROR,
|
|
1239
1239
|
"no-invalid-regexp": ERROR,
|
|
1240
|
+
"no-invalid-this": ERROR,
|
|
1240
1241
|
"no-irregular-whitespace": ERROR,
|
|
1241
1242
|
"no-iterator": ERROR,
|
|
1242
1243
|
"no-labels": ERROR,
|
|
@@ -1263,35 +1264,35 @@ function javascript(options = {}) {
|
|
|
1263
1264
|
"no-restricted-globals": [
|
|
1264
1265
|
ERROR,
|
|
1265
1266
|
{
|
|
1266
|
-
|
|
1267
|
-
|
|
1267
|
+
message: "Use `globalThis` instead.",
|
|
1268
|
+
name: "global"
|
|
1268
1269
|
},
|
|
1269
1270
|
{
|
|
1270
|
-
|
|
1271
|
-
|
|
1271
|
+
message: "Use `globalThis` instead.",
|
|
1272
|
+
name: "self"
|
|
1272
1273
|
}
|
|
1273
1274
|
],
|
|
1274
1275
|
"no-restricted-properties": [
|
|
1275
1276
|
ERROR,
|
|
1276
1277
|
{
|
|
1277
|
-
|
|
1278
|
-
|
|
1278
|
+
message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",
|
|
1279
|
+
property: "__proto__"
|
|
1279
1280
|
},
|
|
1280
1281
|
{
|
|
1281
|
-
|
|
1282
|
-
|
|
1282
|
+
message: "Use `Object.defineProperty` instead.",
|
|
1283
|
+
property: "__defineGetter__"
|
|
1283
1284
|
},
|
|
1284
1285
|
{
|
|
1285
|
-
|
|
1286
|
-
|
|
1286
|
+
message: "Use `Object.defineProperty` instead.",
|
|
1287
|
+
property: "__defineSetter__"
|
|
1287
1288
|
},
|
|
1288
1289
|
{
|
|
1289
|
-
|
|
1290
|
-
|
|
1290
|
+
message: "Use `Object.getOwnPropertyDescriptor` instead.",
|
|
1291
|
+
property: "__lookupGetter__"
|
|
1291
1292
|
},
|
|
1292
1293
|
{
|
|
1293
|
-
|
|
1294
|
-
|
|
1294
|
+
message: "Use `Object.getOwnPropertyDescriptor` instead.",
|
|
1295
|
+
property: "__lookupSetter__"
|
|
1295
1296
|
}
|
|
1296
1297
|
],
|
|
1297
1298
|
"no-restricted-syntax": [
|
|
@@ -1327,8 +1328,8 @@ function javascript(options = {}) {
|
|
|
1327
1328
|
"no-unsafe-negation": ERROR,
|
|
1328
1329
|
"no-unused-expressions": [ERROR, {
|
|
1329
1330
|
allowShortCircuit: true,
|
|
1330
|
-
|
|
1331
|
-
|
|
1331
|
+
allowTaggedTemplates: true,
|
|
1332
|
+
allowTernary: true
|
|
1332
1333
|
}],
|
|
1333
1334
|
"no-unused-vars": [ERROR, {
|
|
1334
1335
|
args: "none",
|
|
@@ -1337,8 +1338,8 @@ function javascript(options = {}) {
|
|
|
1337
1338
|
vars: "all"
|
|
1338
1339
|
}],
|
|
1339
1340
|
"no-use-before-define": [ERROR, {
|
|
1340
|
-
functions: false,
|
|
1341
1341
|
classes: false,
|
|
1342
|
+
functions: false,
|
|
1342
1343
|
variables: true
|
|
1343
1344
|
}],
|
|
1344
1345
|
"no-useless-backreference": ERROR,
|
|
@@ -1352,8 +1353,8 @@ function javascript(options = {}) {
|
|
|
1352
1353
|
"no-void": ERROR,
|
|
1353
1354
|
"no-with": ERROR,
|
|
1354
1355
|
"object-shorthand": [ERROR, ALWAYS, {
|
|
1355
|
-
|
|
1356
|
-
|
|
1356
|
+
avoidQuotes: true,
|
|
1357
|
+
ignoreConstructors: false
|
|
1357
1358
|
}],
|
|
1358
1359
|
"one-var": [ERROR, {
|
|
1359
1360
|
initialized: NEVER
|
|
@@ -1371,44 +1372,36 @@ function javascript(options = {}) {
|
|
|
1371
1372
|
"prefer-rest-params": ERROR,
|
|
1372
1373
|
"prefer-spread": ERROR,
|
|
1373
1374
|
"prefer-template": ERROR,
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
ignoreDeclarationSort: true,
|
|
1377
|
-
ignoreMemberSort: false,
|
|
1378
|
-
memberSyntaxSortOrder: [
|
|
1379
|
-
"none",
|
|
1380
|
-
"all",
|
|
1381
|
-
"multiple",
|
|
1382
|
-
"single"
|
|
1383
|
-
],
|
|
1384
|
-
allowSeparatedGroups: false
|
|
1385
|
-
}],
|
|
1375
|
+
// Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-imports
|
|
1376
|
+
"sort-imports": [OFF],
|
|
1386
1377
|
"symbol-description": ERROR,
|
|
1387
1378
|
"unicode-bom": [ERROR, NEVER],
|
|
1379
|
+
"unused-imports/no-unused-imports": isInEditor ? OFF : ERROR,
|
|
1380
|
+
"unused-imports/no-unused-vars": [WARN, {
|
|
1381
|
+
args: "after-used",
|
|
1382
|
+
argsIgnorePattern: "^_",
|
|
1383
|
+
ignoreRestSiblings: true,
|
|
1384
|
+
vars: "all",
|
|
1385
|
+
varsIgnorePattern: "^_"
|
|
1386
|
+
}],
|
|
1388
1387
|
"use-isnan": [ERROR, {
|
|
1389
|
-
|
|
1390
|
-
|
|
1388
|
+
enforceForIndexOf: true,
|
|
1389
|
+
enforceForSwitchCase: true
|
|
1391
1390
|
}],
|
|
1392
1391
|
"valid-typeof": [ERROR, {
|
|
1393
1392
|
requireStringLiterals: true
|
|
1394
1393
|
}],
|
|
1395
1394
|
"vars-on-top": ERROR,
|
|
1396
1395
|
"yoda": [ERROR, NEVER],
|
|
1397
|
-
|
|
1398
|
-
"
|
|
1399
|
-
|
|
1400
|
-
varsIgnorePattern: "^_",
|
|
1401
|
-
args: "after-used",
|
|
1402
|
-
argsIgnorePattern: "^_",
|
|
1403
|
-
ignoreRestSiblings: true
|
|
1404
|
-
}],
|
|
1405
|
-
...default3.configs.recommended.rules,
|
|
1396
|
+
...default4.configs.recommended.rules,
|
|
1397
|
+
...default10.configs["recommended-natural"].rules,
|
|
1398
|
+
"perfectionist/sort-vue-attributes": [OFF],
|
|
1406
1399
|
...overrides
|
|
1407
1400
|
}
|
|
1408
1401
|
},
|
|
1409
1402
|
{
|
|
1410
|
-
name: "vinicunca:javascript:overrides",
|
|
1411
1403
|
files: [`**/scripts/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
|
|
1404
|
+
name: "vinicunca:javascript:overrides",
|
|
1412
1405
|
rules: {
|
|
1413
1406
|
"no-console": OFF
|
|
1414
1407
|
}
|
|
@@ -1462,11 +1455,11 @@ function jsonc(options = {}) {
|
|
|
1462
1455
|
}
|
|
1463
1456
|
},
|
|
1464
1457
|
{
|
|
1465
|
-
name: "vinicunca:jsonc:rules",
|
|
1466
1458
|
files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
|
|
1467
1459
|
languageOptions: {
|
|
1468
|
-
parser:
|
|
1460
|
+
parser: default17
|
|
1469
1461
|
},
|
|
1462
|
+
name: "vinicunca:jsonc:rules",
|
|
1470
1463
|
rules: {
|
|
1471
1464
|
"jsonc/array-bracket-spacing": [ERROR, NEVER],
|
|
1472
1465
|
"jsonc/comma-dangle": [ERROR, NEVER],
|
|
@@ -1524,12 +1517,11 @@ function markdown(options = {}) {
|
|
|
1524
1517
|
}
|
|
1525
1518
|
},
|
|
1526
1519
|
{
|
|
1527
|
-
name: "vinicunca:markdown:processor",
|
|
1528
1520
|
files: [GLOB_MARKDOWN],
|
|
1521
|
+
name: "vinicunca:markdown:processor",
|
|
1529
1522
|
processor: "markdown/markdown"
|
|
1530
1523
|
},
|
|
1531
1524
|
{
|
|
1532
|
-
name: "vinicunca:markdown:rules",
|
|
1533
1525
|
files: [
|
|
1534
1526
|
GLOB_MARKDOWN_CODE,
|
|
1535
1527
|
...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
|
|
@@ -1541,6 +1533,7 @@ function markdown(options = {}) {
|
|
|
1541
1533
|
}
|
|
1542
1534
|
}
|
|
1543
1535
|
},
|
|
1536
|
+
name: "vinicunca:markdown:rules",
|
|
1544
1537
|
rules: {
|
|
1545
1538
|
"no-alert": OFF,
|
|
1546
1539
|
"no-console": OFF,
|
|
@@ -1611,6 +1604,7 @@ function node() {
|
|
|
1611
1604
|
}
|
|
1612
1605
|
|
|
1613
1606
|
// src/configs/react.ts
|
|
1607
|
+
var STR_PARENS_NEW_LINE = "parens-new-line";
|
|
1614
1608
|
function react(options = {}) {
|
|
1615
1609
|
const {
|
|
1616
1610
|
overrides = {}
|
|
@@ -1619,89 +1613,84 @@ function react(options = {}) {
|
|
|
1619
1613
|
{
|
|
1620
1614
|
name: "vinicunca:react:setup",
|
|
1621
1615
|
plugins: {
|
|
1622
|
-
"react":
|
|
1623
|
-
"react-hooks":
|
|
1616
|
+
"react": default11,
|
|
1617
|
+
"react-hooks": default12
|
|
1624
1618
|
}
|
|
1625
1619
|
},
|
|
1626
1620
|
{
|
|
1627
1621
|
name: "vinicunca:react:rules",
|
|
1628
|
-
settings: {
|
|
1629
|
-
react: {
|
|
1630
|
-
version: "detect"
|
|
1631
|
-
}
|
|
1632
|
-
},
|
|
1633
1622
|
rules: {
|
|
1623
|
+
...default11.configs.recommended.rules,
|
|
1634
1624
|
...default12.configs.recommended.rules,
|
|
1635
|
-
|
|
1636
|
-
|
|
1625
|
+
"react/boolean-prop-naming": [OFF, {
|
|
1626
|
+
message: "",
|
|
1627
|
+
propTypeNames: ["bool", "mutuallyExclusiveTrueProps"],
|
|
1628
|
+
rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+"
|
|
1629
|
+
}],
|
|
1630
|
+
"react/destructuring-assignment": [ERROR, "always"],
|
|
1637
1631
|
"react/jsx-boolean-value": [ERROR, NEVER, { always: [] }],
|
|
1632
|
+
"react/jsx-child-element-spacing": OFF,
|
|
1638
1633
|
"react/jsx-closing-bracket-location": [ERROR, "line-aligned"],
|
|
1639
1634
|
"react/jsx-closing-tag-location": ERROR,
|
|
1635
|
+
"react/jsx-curly-brace-presence": [ERROR, { children: NEVER, props: NEVER }],
|
|
1636
|
+
"react/jsx-curly-newline": [ERROR, {
|
|
1637
|
+
multiline: "consistent",
|
|
1638
|
+
singleline: "consistent"
|
|
1639
|
+
}],
|
|
1640
1640
|
"react/jsx-curly-spacing": [ERROR, {
|
|
1641
|
-
|
|
1641
|
+
children: true,
|
|
1642
1642
|
spacing: {
|
|
1643
1643
|
objectLiterals: NEVER
|
|
1644
1644
|
},
|
|
1645
|
-
|
|
1645
|
+
when: "always"
|
|
1646
1646
|
}],
|
|
1647
|
+
"react/jsx-equals-spacing": [ERROR, NEVER],
|
|
1648
|
+
"react/jsx-first-prop-new-line": [ERROR, "multiline-multiprop"],
|
|
1649
|
+
"react/jsx-indent": [ERROR, 2],
|
|
1647
1650
|
"react/jsx-indent-props": [ERROR, 2],
|
|
1648
1651
|
"react/jsx-key": OFF,
|
|
1652
|
+
"react/jsx-max-depth": OFF,
|
|
1649
1653
|
"react/jsx-max-props-per-line": [ERROR, { maximum: 1, when: "multiline" }],
|
|
1654
|
+
"react/jsx-newline": ERROR,
|
|
1650
1655
|
"react/jsx-no-duplicate-props": [ERROR, { ignoreCase: true }],
|
|
1651
1656
|
"react/jsx-no-literals": [OFF, { noStrings: true }],
|
|
1657
|
+
"react/jsx-one-expression-per-line": [ERROR, { allow: "single-child" }],
|
|
1652
1658
|
"react/jsx-pascal-case": [ERROR, {
|
|
1653
1659
|
allowAllCaps: true,
|
|
1654
1660
|
ignore: []
|
|
1655
1661
|
}],
|
|
1656
|
-
"react/jsx-
|
|
1657
|
-
ignoreCase: true,
|
|
1658
|
-
callbacksLast: false,
|
|
1659
|
-
shorthandFirst: false,
|
|
1660
|
-
shorthandLast: false,
|
|
1661
|
-
noSortAlphabetically: false,
|
|
1662
|
-
reservedFirst: true
|
|
1663
|
-
}],
|
|
1662
|
+
"react/jsx-props-no-multi-spaces": ERROR,
|
|
1664
1663
|
"react/jsx-sort-default-props": [OFF, {
|
|
1665
1664
|
ignoreCase: true
|
|
1666
1665
|
}],
|
|
1667
|
-
|
|
1668
|
-
"react/
|
|
1669
|
-
"react/jsx-wrap-multilines": [ERROR, {
|
|
1670
|
-
declaration: "parens-new-line",
|
|
1671
|
-
assignment: "parens-new-line",
|
|
1672
|
-
return: "parens-new-line",
|
|
1673
|
-
arrow: "parens-new-line",
|
|
1674
|
-
condition: "parens-new-line",
|
|
1675
|
-
logical: "parens-new-line",
|
|
1676
|
-
prop: "parens-new-line"
|
|
1677
|
-
}],
|
|
1678
|
-
"react/jsx-first-prop-new-line": [ERROR, "multiline-multiprop"],
|
|
1679
|
-
"react/jsx-equals-spacing": [ERROR, NEVER],
|
|
1680
|
-
"react/jsx-indent": [ERROR, 2],
|
|
1681
|
-
"react/style-prop-object": ERROR,
|
|
1666
|
+
// Turned off to avoid conflicts with Perfectionist. https://eslint-plugin-perfectionist.azat.io/rules/sort-jsx-props
|
|
1667
|
+
"react/jsx-sort-props": [OFF],
|
|
1682
1668
|
"react/jsx-tag-spacing": [ERROR, {
|
|
1683
|
-
closingSlash: NEVER,
|
|
1684
|
-
beforeSelfClosing: "always",
|
|
1685
1669
|
afterOpening: NEVER,
|
|
1686
|
-
beforeClosing: NEVER
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
propTypeNames: ["bool", "mutuallyExclusiveTrueProps"],
|
|
1690
|
-
rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+",
|
|
1691
|
-
message: ""
|
|
1670
|
+
beforeClosing: NEVER,
|
|
1671
|
+
beforeSelfClosing: "always",
|
|
1672
|
+
closingSlash: NEVER
|
|
1692
1673
|
}],
|
|
1693
|
-
"react/jsx-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
singleline: "consistent"
|
|
1674
|
+
"react/jsx-wrap-multilines": [ERROR, {
|
|
1675
|
+
arrow: STR_PARENS_NEW_LINE,
|
|
1676
|
+
assignment: STR_PARENS_NEW_LINE,
|
|
1677
|
+
condition: STR_PARENS_NEW_LINE,
|
|
1678
|
+
declaration: STR_PARENS_NEW_LINE,
|
|
1679
|
+
logical: STR_PARENS_NEW_LINE,
|
|
1680
|
+
prop: STR_PARENS_NEW_LINE,
|
|
1681
|
+
return: STR_PARENS_NEW_LINE
|
|
1702
1682
|
}],
|
|
1703
|
-
"react/
|
|
1683
|
+
"react/no-danger": WARN,
|
|
1684
|
+
"react/react-in-jsx-scope": OFF,
|
|
1685
|
+
"react/self-closing-comp": ERROR,
|
|
1686
|
+
"react/style-prop-object": ERROR,
|
|
1687
|
+
"style/jsx-quotes": [ERROR, "prefer-double"],
|
|
1704
1688
|
...overrides
|
|
1689
|
+
},
|
|
1690
|
+
settings: {
|
|
1691
|
+
react: {
|
|
1692
|
+
version: "detect"
|
|
1693
|
+
}
|
|
1705
1694
|
}
|
|
1706
1695
|
}
|
|
1707
1696
|
];
|
|
@@ -1711,8 +1700,8 @@ function react(options = {}) {
|
|
|
1711
1700
|
function sortPackageJson() {
|
|
1712
1701
|
return [
|
|
1713
1702
|
{
|
|
1714
|
-
name: "vinicunca:sort-package-json",
|
|
1715
1703
|
files: ["**/package.json"],
|
|
1704
|
+
name: "vinicunca:sort-package-json",
|
|
1716
1705
|
rules: {
|
|
1717
1706
|
"jsonc/sort-array-values": [
|
|
1718
1707
|
ERROR,
|
|
@@ -1800,8 +1789,8 @@ function sortPackageJson() {
|
|
|
1800
1789
|
function sortTsconfig() {
|
|
1801
1790
|
return [
|
|
1802
1791
|
{
|
|
1803
|
-
name: "vinicunca:sort-tsconfig",
|
|
1804
1792
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
1793
|
+
name: "vinicunca:sort-tsconfig",
|
|
1805
1794
|
rules: {
|
|
1806
1795
|
"jsonc/sort-keys": [
|
|
1807
1796
|
ERROR,
|
|
@@ -1929,18 +1918,19 @@ function stylistic() {
|
|
|
1929
1918
|
{
|
|
1930
1919
|
name: "vinicunca:stylistic",
|
|
1931
1920
|
plugins: {
|
|
1932
|
-
|
|
1933
|
-
|
|
1921
|
+
style: default2,
|
|
1922
|
+
vinicunca: default4
|
|
1934
1923
|
},
|
|
1935
1924
|
rules: {
|
|
1936
1925
|
"curly": [ERROR, "all"],
|
|
1937
1926
|
"style/array-bracket-newline": [ERROR, CONSISTENT],
|
|
1938
1927
|
"style/array-bracket-spacing": [ERROR, NEVER],
|
|
1939
1928
|
"style/array-element-newline": [ERROR, CONSISTENT],
|
|
1940
|
-
"style/arrow-spacing": [ERROR, {
|
|
1929
|
+
"style/arrow-spacing": [ERROR, { after: true, before: true }],
|
|
1941
1930
|
"style/block-spacing": [ERROR, ALWAYS],
|
|
1942
1931
|
"style/brace-style": [ERROR],
|
|
1943
|
-
"style/comma-
|
|
1932
|
+
"style/comma-dangle": [ERROR, "always-multiline"],
|
|
1933
|
+
"style/comma-spacing": [ERROR, { after: true, before: false }],
|
|
1944
1934
|
"style/comma-style": [ERROR, "last"],
|
|
1945
1935
|
"style/computed-property-spacing": [ERROR, NEVER, { enforceForClassMembers: true }],
|
|
1946
1936
|
"style/dot-location": [ERROR, "property"],
|
|
@@ -1984,8 +1974,8 @@ function stylistic() {
|
|
|
1984
1974
|
offsetTernaryExpressions: true,
|
|
1985
1975
|
outerIIFEBody: 1
|
|
1986
1976
|
}],
|
|
1987
|
-
"style/key-spacing": [ERROR, {
|
|
1988
|
-
"style/keyword-spacing": [ERROR, {
|
|
1977
|
+
"style/key-spacing": [ERROR, { afterColon: true, beforeColon: false }],
|
|
1978
|
+
"style/keyword-spacing": [ERROR, { after: true, before: true }],
|
|
1989
1979
|
"style/lines-between-class-members": [ERROR, ALWAYS, { exceptAfterSingleLine: true }],
|
|
1990
1980
|
"style/max-statements-per-line": [ERROR, { max: 1 }],
|
|
1991
1981
|
"style/member-delimiter-style": [ERROR],
|
|
@@ -1994,12 +1984,12 @@ function stylistic() {
|
|
|
1994
1984
|
"style/no-extra-parens": [ERROR, "functions"],
|
|
1995
1985
|
"style/no-floating-decimal": ERROR,
|
|
1996
1986
|
"style/no-mixed-operators": [ERROR, {
|
|
1987
|
+
allowSamePrecedence: true,
|
|
1997
1988
|
groups: [
|
|
1998
1989
|
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
1999
1990
|
["&&", "||"],
|
|
2000
1991
|
["in", "instanceof"]
|
|
2001
|
-
]
|
|
2002
|
-
allowSamePrecedence: true
|
|
1992
|
+
]
|
|
2003
1993
|
}],
|
|
2004
1994
|
"style/no-mixed-spaces-and-tabs": ERROR,
|
|
2005
1995
|
"style/no-multi-spaces": ERROR,
|
|
@@ -2007,34 +1997,34 @@ function stylistic() {
|
|
|
2007
1997
|
"style/no-tabs": ERROR,
|
|
2008
1998
|
"style/no-trailing-spaces": ERROR,
|
|
2009
1999
|
"style/no-whitespace-before-property": ERROR,
|
|
2010
|
-
"style/object-curly-newline": [ERROR, {
|
|
2000
|
+
"style/object-curly-newline": [ERROR, { consistent: true, multiline: true }],
|
|
2011
2001
|
"style/object-curly-spacing": [ERROR, ALWAYS],
|
|
2012
2002
|
"style/object-property-newline": [ERROR, { allowMultiplePropertiesPerLine: true }],
|
|
2013
2003
|
"style/operator-linebreak": [ERROR, "before"],
|
|
2014
|
-
"style/padded-blocks": [ERROR, { blocks: NEVER,
|
|
2004
|
+
"style/padded-blocks": [ERROR, { blocks: NEVER, classes: NEVER, switches: NEVER }],
|
|
2015
2005
|
"style/quote-props": [ERROR, "consistent-as-needed"],
|
|
2016
2006
|
"style/quotes": [ERROR, "single"],
|
|
2017
2007
|
"style/rest-spread-spacing": [ERROR, NEVER],
|
|
2018
2008
|
"style/semi": [ERROR, ALWAYS],
|
|
2019
|
-
"style/semi-spacing": [ERROR, {
|
|
2009
|
+
"style/semi-spacing": [ERROR, { after: true, before: false }],
|
|
2020
2010
|
"style/space-before-blocks": [ERROR, ALWAYS],
|
|
2021
2011
|
"style/space-before-function-paren": [ERROR, {
|
|
2022
2012
|
anonymous: NEVER,
|
|
2023
|
-
|
|
2024
|
-
|
|
2013
|
+
asyncArrow: ALWAYS,
|
|
2014
|
+
named: NEVER
|
|
2025
2015
|
}],
|
|
2026
2016
|
"style/space-in-parens": [ERROR, NEVER],
|
|
2027
2017
|
"style/space-infix-ops": ERROR,
|
|
2028
|
-
"style/space-unary-ops": [ERROR, {
|
|
2018
|
+
"style/space-unary-ops": [ERROR, { nonwords: false, words: true }],
|
|
2029
2019
|
"style/spaced-comment": [ERROR, "always", {
|
|
2030
|
-
line: {
|
|
2031
|
-
markers: ["/"],
|
|
2032
|
-
exceptions: ["/", "#"]
|
|
2033
|
-
},
|
|
2034
2020
|
block: {
|
|
2035
|
-
|
|
2021
|
+
balanced: true,
|
|
2036
2022
|
exceptions: ["*"],
|
|
2037
|
-
|
|
2023
|
+
markers: ["!"]
|
|
2024
|
+
},
|
|
2025
|
+
line: {
|
|
2026
|
+
exceptions: ["/", "#"],
|
|
2027
|
+
markers: ["/"]
|
|
2038
2028
|
}
|
|
2039
2029
|
}],
|
|
2040
2030
|
"style/template-curly-spacing": ERROR,
|
|
@@ -2044,11 +2034,16 @@ function stylistic() {
|
|
|
2044
2034
|
functionPrototypeMethods: true
|
|
2045
2035
|
}],
|
|
2046
2036
|
"style/yield-star-spacing": [ERROR, "both"],
|
|
2047
|
-
"style/comma-dangle": [ERROR, "always-multiline"],
|
|
2048
2037
|
"vinicunca/consistent-list-newline": ERROR,
|
|
2049
2038
|
"vinicunca/if-newline": ERROR,
|
|
2050
2039
|
"vinicunca/top-level-function": ERROR
|
|
2051
2040
|
}
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
files: [GLOB_JSX, GLOB_TSX],
|
|
2044
|
+
rules: {
|
|
2045
|
+
"vinicunca/consistent-list-newline": OFF
|
|
2046
|
+
}
|
|
2052
2047
|
}
|
|
2053
2048
|
];
|
|
2054
2049
|
}
|
|
@@ -2074,8 +2069,8 @@ function test(options = {}) {
|
|
|
2074
2069
|
}
|
|
2075
2070
|
},
|
|
2076
2071
|
{
|
|
2077
|
-
name: "vinicunca:test:rules",
|
|
2078
2072
|
files: GLOB_TESTS,
|
|
2073
|
+
name: "vinicunca:test:rules",
|
|
2079
2074
|
rules: {
|
|
2080
2075
|
"test/consistent-test-it": [ERROR, { fn: "it", withinDescribe: "it" }],
|
|
2081
2076
|
"test/no-identical-title": ERROR,
|
|
@@ -2124,11 +2119,11 @@ function typescript(options) {
|
|
|
2124
2119
|
"ts/no-floating-promises": ERROR,
|
|
2125
2120
|
"ts/no-for-in-array": ERROR,
|
|
2126
2121
|
"ts/no-implied-eval": ERROR,
|
|
2127
|
-
|
|
2122
|
+
// Temporary turning it off due to performance
|
|
2123
|
+
"ts/no-misused-promises": OFF,
|
|
2128
2124
|
"ts/no-throw-literal": ERROR,
|
|
2129
2125
|
"ts/restrict-plus-operands": ERROR,
|
|
2130
|
-
"ts/restrict-template-expressions": ERROR
|
|
2131
|
-
"ts/unbound-method": ERROR
|
|
2126
|
+
"ts/restrict-template-expressions": ERROR
|
|
2132
2127
|
};
|
|
2133
2128
|
let tsConfigOptions = {};
|
|
2134
2129
|
let additionalTypeAwareRules = {};
|
|
@@ -2144,13 +2139,12 @@ function typescript(options) {
|
|
|
2144
2139
|
// Install the plugins without globs, so they can be configured separately.
|
|
2145
2140
|
name: "vinicunca:typescript:setup",
|
|
2146
2141
|
plugins: {
|
|
2147
|
-
vinicunca: default3,
|
|
2148
2142
|
import: pluginImport,
|
|
2149
|
-
ts:
|
|
2143
|
+
ts: default3,
|
|
2144
|
+
vinicunca: default4
|
|
2150
2145
|
}
|
|
2151
2146
|
},
|
|
2152
2147
|
{
|
|
2153
|
-
name: "vinicunca:typescript:rules",
|
|
2154
2148
|
files: [
|
|
2155
2149
|
GLOB_SRC,
|
|
2156
2150
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
@@ -2158,54 +2152,56 @@ function typescript(options) {
|
|
|
2158
2152
|
languageOptions: {
|
|
2159
2153
|
parser: parserTs,
|
|
2160
2154
|
parserOptions: {
|
|
2155
|
+
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
2161
2156
|
sourceType: "module",
|
|
2162
2157
|
...tsConfigOptions,
|
|
2163
2158
|
...parserOptions
|
|
2164
2159
|
}
|
|
2165
2160
|
},
|
|
2161
|
+
name: "vinicunca:typescript:rules",
|
|
2166
2162
|
rules: {
|
|
2167
2163
|
...renameRules(
|
|
2168
|
-
|
|
2164
|
+
default3.configs["eslint-recommended"].overrides[0].rules,
|
|
2169
2165
|
"@typescript-eslint/",
|
|
2170
2166
|
"ts/"
|
|
2171
2167
|
),
|
|
2172
2168
|
...renameRules(
|
|
2173
|
-
|
|
2169
|
+
default3.configs.strict.rules,
|
|
2174
2170
|
"@typescript-eslint/",
|
|
2175
2171
|
"ts/"
|
|
2176
2172
|
),
|
|
2177
2173
|
"no-dupe-class-members": OFF,
|
|
2178
|
-
"ts/no-dupe-class-members": ERROR,
|
|
2179
2174
|
"no-invalid-this": OFF,
|
|
2180
|
-
"ts/no-invalid-this": ERROR,
|
|
2181
2175
|
"no-loss-of-precision": OFF,
|
|
2182
|
-
"ts/no-loss-of-precision": ERROR,
|
|
2183
2176
|
"no-redeclare": OFF,
|
|
2184
|
-
"
|
|
2177
|
+
"no-unused-vars": OFF,
|
|
2185
2178
|
"no-use-before-define": OFF,
|
|
2186
|
-
"ts/no-use-before-define": [ERROR, { functions: false, classes: false, variables: true }],
|
|
2187
2179
|
"no-useless-constructor": OFF,
|
|
2188
2180
|
"ts/ban-ts-comment": [ERROR, { "ts-ignore": "allow-with-description" }],
|
|
2189
2181
|
"ts/ban-types": [ERROR, { types: { Function: false } }],
|
|
2190
2182
|
"ts/consistent-type-definitions": [ERROR, "interface"],
|
|
2191
|
-
"ts/consistent-type-imports": [ERROR, { prefer: "type-imports"
|
|
2183
|
+
"ts/consistent-type-imports": [ERROR, { disallowTypeAnnotations: false, prefer: "type-imports" }],
|
|
2192
2184
|
"ts/explicit-function-return-type": OFF,
|
|
2193
2185
|
"ts/explicit-member-accessibility": OFF,
|
|
2194
2186
|
"ts/explicit-module-boundary-types": OFF,
|
|
2195
2187
|
"ts/naming-convention": OFF,
|
|
2188
|
+
"ts/no-dupe-class-members": ERROR,
|
|
2196
2189
|
"ts/no-empty-function": OFF,
|
|
2197
2190
|
"ts/no-empty-interface": OFF,
|
|
2198
2191
|
"ts/no-explicit-any": OFF,
|
|
2199
2192
|
"ts/no-import-type-side-effects": ERROR,
|
|
2193
|
+
"ts/no-invalid-this": ERROR,
|
|
2200
2194
|
"ts/no-invalid-void-type": OFF,
|
|
2195
|
+
"ts/no-loss-of-precision": ERROR,
|
|
2201
2196
|
"ts/no-non-null-assertion": OFF,
|
|
2197
|
+
"ts/no-redeclare": ERROR,
|
|
2202
2198
|
"ts/no-require-imports": ERROR,
|
|
2203
|
-
"no-unused-vars": OFF,
|
|
2204
2199
|
"ts/no-unused-vars": [ERROR, {
|
|
2205
2200
|
argsIgnorePattern: "^_",
|
|
2206
2201
|
destructuredArrayIgnorePattern: "^_",
|
|
2207
2202
|
ignoreRestSiblings: true
|
|
2208
2203
|
}],
|
|
2204
|
+
"ts/no-use-before-define": [ERROR, { classes: false, functions: false, variables: true }],
|
|
2209
2205
|
"ts/parameter-properties": OFF,
|
|
2210
2206
|
"ts/prefer-ts-expect-error": ERROR,
|
|
2211
2207
|
"ts/triple-slash-reference": OFF,
|
|
@@ -2218,8 +2214,8 @@ function typescript(options) {
|
|
|
2218
2214
|
}
|
|
2219
2215
|
},
|
|
2220
2216
|
{
|
|
2221
|
-
name: "vinicunca:typescript:dts-overrides",
|
|
2222
2217
|
files: ["**/*.d.ts"],
|
|
2218
|
+
name: "vinicunca:typescript:dts-overrides",
|
|
2223
2219
|
rules: {
|
|
2224
2220
|
"eslint-comments/no-unlimited-disable": OFF,
|
|
2225
2221
|
"import/no-duplicates": OFF,
|
|
@@ -2227,15 +2223,15 @@ function typescript(options) {
|
|
|
2227
2223
|
}
|
|
2228
2224
|
},
|
|
2229
2225
|
{
|
|
2230
|
-
name: "vinicunca:typescript:tests-overrides",
|
|
2231
2226
|
files: ["**/*.{test,spec}.ts?(x)"],
|
|
2227
|
+
name: "vinicunca:typescript:tests-overrides",
|
|
2232
2228
|
rules: {
|
|
2233
2229
|
"no-unused-expressions": OFF
|
|
2234
2230
|
}
|
|
2235
2231
|
},
|
|
2236
2232
|
{
|
|
2237
|
-
name: "vinicunca:typescript:javascript-overrides",
|
|
2238
2233
|
files: ["**/*.js", "**/*.cjs"],
|
|
2234
|
+
name: "vinicunca:typescript:javascript-overrides",
|
|
2239
2235
|
rules: {
|
|
2240
2236
|
"ts/no-require-imports": OFF,
|
|
2241
2237
|
"ts/no-var-requires": OFF
|
|
@@ -2253,7 +2249,7 @@ function unicorn(options = {}) {
|
|
|
2253
2249
|
{
|
|
2254
2250
|
name: "vinicunca:unicorn",
|
|
2255
2251
|
plugins: {
|
|
2256
|
-
unicorn:
|
|
2252
|
+
unicorn: default13
|
|
2257
2253
|
},
|
|
2258
2254
|
rules: {
|
|
2259
2255
|
"unicorn/error-message": ERROR,
|
|
@@ -2262,11 +2258,11 @@ function unicorn(options = {}) {
|
|
|
2262
2258
|
"unicorn/no-new-array": ERROR,
|
|
2263
2259
|
"unicorn/no-new-buffer": ERROR,
|
|
2264
2260
|
"unicorn/number-literal-case": ERROR,
|
|
2261
|
+
"unicorn/prefer-dom-node-text-content": ERROR,
|
|
2265
2262
|
"unicorn/prefer-includes": ERROR,
|
|
2266
2263
|
"unicorn/prefer-node-protocol": ERROR,
|
|
2267
2264
|
"unicorn/prefer-number-properties": ERROR,
|
|
2268
2265
|
"unicorn/prefer-string-starts-ends-with": ERROR,
|
|
2269
|
-
"unicorn/prefer-dom-node-text-content": ERROR,
|
|
2270
2266
|
"unicorn/prefer-type-error": ERROR,
|
|
2271
2267
|
"unicorn/throw-new-error": ERROR,
|
|
2272
2268
|
...overrides
|
|
@@ -2279,8 +2275,8 @@ function unicorn(options = {}) {
|
|
|
2279
2275
|
import process2 from "process";
|
|
2280
2276
|
function vue(options = {}) {
|
|
2281
2277
|
const {
|
|
2282
|
-
|
|
2283
|
-
|
|
2278
|
+
overrides = {},
|
|
2279
|
+
typescript: typescript2 = {}
|
|
2284
2280
|
} = options;
|
|
2285
2281
|
let tsConfigOptions = {};
|
|
2286
2282
|
const tsconfigPath = typescript2.tsconfigPath ?? [];
|
|
@@ -2294,14 +2290,13 @@ function vue(options = {}) {
|
|
|
2294
2290
|
{
|
|
2295
2291
|
name: "vinicunca:vue:setup",
|
|
2296
2292
|
plugins: {
|
|
2297
|
-
vue:
|
|
2293
|
+
vue: default16
|
|
2298
2294
|
}
|
|
2299
2295
|
},
|
|
2300
2296
|
{
|
|
2301
|
-
name: "vinicunca:vue:rules",
|
|
2302
2297
|
files: [GLOB_VUE],
|
|
2303
2298
|
languageOptions: {
|
|
2304
|
-
parser:
|
|
2299
|
+
parser: default18,
|
|
2305
2300
|
parserOptions: {
|
|
2306
2301
|
ecmaFeatures: {
|
|
2307
2302
|
jsx: true
|
|
@@ -2312,12 +2307,13 @@ function vue(options = {}) {
|
|
|
2312
2307
|
...tsConfigOptions
|
|
2313
2308
|
}
|
|
2314
2309
|
},
|
|
2315
|
-
|
|
2310
|
+
name: "vinicunca:vue:rules",
|
|
2311
|
+
processor: default16.processors[".vue"],
|
|
2316
2312
|
rules: {
|
|
2317
|
-
...
|
|
2318
|
-
...
|
|
2319
|
-
...
|
|
2320
|
-
...
|
|
2313
|
+
...default16.configs.base.rules,
|
|
2314
|
+
...default16.configs["vue3-essential"].rules,
|
|
2315
|
+
...default16.configs["vue3-strongly-recommended"].rules,
|
|
2316
|
+
...default16.configs["vue3-recommended"].rules,
|
|
2321
2317
|
"node/prefer-global/process": OFF,
|
|
2322
2318
|
"vue/array-bracket-spacing": [ERROR, NEVER],
|
|
2323
2319
|
"vue/arrow-spacing": [ERROR, {
|
|
@@ -2381,7 +2377,7 @@ function vue(options = {}) {
|
|
|
2381
2377
|
"vue/no-useless-v-bind": ERROR,
|
|
2382
2378
|
"vue/no-v-html": OFF,
|
|
2383
2379
|
"vue/no-v-text-v-html-on-component": OFF,
|
|
2384
|
-
"vue/object-curly-newline": [ERROR, {
|
|
2380
|
+
"vue/object-curly-newline": [ERROR, { consistent: true, multiline: true }],
|
|
2385
2381
|
"vue/object-curly-spacing": [ERROR, ALWAYS],
|
|
2386
2382
|
"vue/object-property-newline": [ERROR, { allowMultiplePropertiesPerLine: true }],
|
|
2387
2383
|
"vue/object-shorthand": [ERROR, ALWAYS, {
|
|
@@ -2422,11 +2418,11 @@ function yaml(options = {}) {
|
|
|
2422
2418
|
}
|
|
2423
2419
|
},
|
|
2424
2420
|
{
|
|
2425
|
-
name: "vinicunca:yaml:rules",
|
|
2426
2421
|
files: [GLOB_YAML],
|
|
2427
2422
|
languageOptions: {
|
|
2428
|
-
parser:
|
|
2423
|
+
parser: default19
|
|
2429
2424
|
},
|
|
2425
|
+
name: "vinicunca:yaml:rules",
|
|
2430
2426
|
rules: {
|
|
2431
2427
|
"style/spaced-comment": OFF,
|
|
2432
2428
|
"yaml/block-mapping": ERROR,
|
|
@@ -2462,17 +2458,17 @@ var VuePackages = [
|
|
|
2462
2458
|
];
|
|
2463
2459
|
function vinicuncaESLint({ options = {}, userConfigs = [] } = {}) {
|
|
2464
2460
|
const {
|
|
2461
|
+
componentExts = [],
|
|
2465
2462
|
isInEditor = !!((process3.env.VSCODE_PID || process3.env.JETBRAINS_IDE) && !process3.env.CI),
|
|
2466
|
-
vue: enableVue = VuePackages.some((i) => isPackageExists(i)),
|
|
2467
|
-
typescript: tsOptions = {},
|
|
2468
|
-
stylistic: enableStylistic = true,
|
|
2469
|
-
test: enableTest = true,
|
|
2470
2463
|
jsonc: enableJsonc = true,
|
|
2471
|
-
yaml: enableYaml = true,
|
|
2472
2464
|
markdown: enableMarkdown = true,
|
|
2473
|
-
react: enableReact = false,
|
|
2474
2465
|
overrides = {},
|
|
2475
|
-
|
|
2466
|
+
react: enableReact = false,
|
|
2467
|
+
stylistic: enableStylistic = true,
|
|
2468
|
+
test: enableTest = true,
|
|
2469
|
+
typescript: tsOptions = {},
|
|
2470
|
+
vue: enableVue = VuePackages.some((i) => isPackageExists(i)),
|
|
2471
|
+
yaml: enableYaml = true
|
|
2476
2472
|
} = options;
|
|
2477
2473
|
const configs = [];
|
|
2478
2474
|
configs.push(
|
|
@@ -2512,11 +2508,11 @@ function vinicuncaESLint({ options = {}, userConfigs = [] } = {}) {
|
|
|
2512
2508
|
;
|
|
2513
2509
|
if (enableVue) {
|
|
2514
2510
|
configs.push(vue({
|
|
2511
|
+
overrides: overrides.vue,
|
|
2515
2512
|
typescript: {
|
|
2516
2513
|
enabled: tsEnabled,
|
|
2517
2514
|
...tsParams
|
|
2518
|
-
}
|
|
2519
|
-
overrides: overrides.vue
|
|
2515
|
+
}
|
|
2520
2516
|
}));
|
|
2521
2517
|
}
|
|
2522
2518
|
;
|
|
@@ -2582,10 +2578,10 @@ export {
|
|
|
2582
2578
|
jsonc,
|
|
2583
2579
|
markdown,
|
|
2584
2580
|
node,
|
|
2585
|
-
|
|
2581
|
+
default17 as parserJsonc,
|
|
2586
2582
|
parserTs,
|
|
2587
|
-
|
|
2588
|
-
|
|
2583
|
+
default18 as parserVue,
|
|
2584
|
+
default19 as parserYaml,
|
|
2589
2585
|
default5 as pluginComments,
|
|
2590
2586
|
pluginImport,
|
|
2591
2587
|
default6 as pluginJsdoc,
|
|
@@ -2593,15 +2589,16 @@ export {
|
|
|
2593
2589
|
default7 as pluginMarkdown,
|
|
2594
2590
|
default9 as pluginNoOnlyTests,
|
|
2595
2591
|
default8 as pluginNode,
|
|
2596
|
-
|
|
2597
|
-
|
|
2592
|
+
default10 as pluginPerfectionist,
|
|
2593
|
+
default11 as pluginReact,
|
|
2594
|
+
default12 as pluginReactHooks,
|
|
2598
2595
|
default2 as pluginStylistic,
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2596
|
+
default3 as pluginTs,
|
|
2597
|
+
default13 as pluginUnicorn,
|
|
2598
|
+
default14 as pluginUnusedImports,
|
|
2599
|
+
default4 as pluginVinicunca,
|
|
2603
2600
|
default15 as pluginVitest,
|
|
2604
|
-
|
|
2601
|
+
default16 as pluginVue,
|
|
2605
2602
|
pluginYaml,
|
|
2606
2603
|
react,
|
|
2607
2604
|
renameRules,
|