@vinicunca/eslint-config 2.4.2 → 2.4.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 +51 -49
- package/dist/index.d.cts +321 -300
- package/dist/index.d.ts +321 -300
- package/dist/index.js +52 -50
- package/package.json +18 -17
package/dist/index.cjs
CHANGED
|
@@ -877,7 +877,7 @@ var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-
|
|
|
877
877
|
async function comments() {
|
|
878
878
|
return [
|
|
879
879
|
{
|
|
880
|
-
name: "vinicunca
|
|
880
|
+
name: "vinicunca/eslint-comments",
|
|
881
881
|
plugins: {
|
|
882
882
|
"eslint-comments": import_eslint_plugin_eslint_comments.default
|
|
883
883
|
},
|
|
@@ -1054,7 +1054,7 @@ async function stylistic(options = {}) {
|
|
|
1054
1054
|
});
|
|
1055
1055
|
return [
|
|
1056
1056
|
{
|
|
1057
|
-
name: "vinicunca
|
|
1057
|
+
name: "vinicunca/stylistic/rules",
|
|
1058
1058
|
plugins: {
|
|
1059
1059
|
style: pluginStylistic,
|
|
1060
1060
|
vinicunca: import_eslint_plugin_vinicunca.default
|
|
@@ -1174,7 +1174,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1174
1174
|
const pluginFormat = await interopDefault(import("eslint-plugin-format"));
|
|
1175
1175
|
const configs = [
|
|
1176
1176
|
{
|
|
1177
|
-
name: "vinicunca
|
|
1177
|
+
name: "vinicunca/formatter/setup",
|
|
1178
1178
|
plugins: {
|
|
1179
1179
|
format: pluginFormat
|
|
1180
1180
|
}
|
|
@@ -1187,7 +1187,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1187
1187
|
languageOptions: {
|
|
1188
1188
|
parser: parserPlain
|
|
1189
1189
|
},
|
|
1190
|
-
name: "vinicunca
|
|
1190
|
+
name: "vinicunca/formatter/css",
|
|
1191
1191
|
rules: {
|
|
1192
1192
|
"format/prettier": [
|
|
1193
1193
|
"error",
|
|
@@ -1203,7 +1203,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1203
1203
|
languageOptions: {
|
|
1204
1204
|
parser: parserPlain
|
|
1205
1205
|
},
|
|
1206
|
-
name: "vinicunca
|
|
1206
|
+
name: "vinicunca/formatter/scss",
|
|
1207
1207
|
rules: {
|
|
1208
1208
|
"format/prettier": [
|
|
1209
1209
|
"error",
|
|
@@ -1219,7 +1219,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1219
1219
|
languageOptions: {
|
|
1220
1220
|
parser: parserPlain
|
|
1221
1221
|
},
|
|
1222
|
-
name: "vinicunca
|
|
1222
|
+
name: "vinicunca/formatter/less",
|
|
1223
1223
|
rules: {
|
|
1224
1224
|
"format/prettier": [
|
|
1225
1225
|
"error",
|
|
@@ -1238,7 +1238,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1238
1238
|
languageOptions: {
|
|
1239
1239
|
parser: parserPlain
|
|
1240
1240
|
},
|
|
1241
|
-
name: "vinicunca
|
|
1241
|
+
name: "vinicunca/formatter/html",
|
|
1242
1242
|
rules: {
|
|
1243
1243
|
"format/prettier": [
|
|
1244
1244
|
"error",
|
|
@@ -1257,7 +1257,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1257
1257
|
languageOptions: {
|
|
1258
1258
|
parser: parserPlain
|
|
1259
1259
|
},
|
|
1260
|
-
name: "vinicunca
|
|
1260
|
+
name: "vinicunca/formatter/markdown",
|
|
1261
1261
|
rules: {
|
|
1262
1262
|
[`format/${formater}`]: [
|
|
1263
1263
|
"error",
|
|
@@ -1280,7 +1280,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
1280
1280
|
languageOptions: {
|
|
1281
1281
|
parser: parserPlain
|
|
1282
1282
|
},
|
|
1283
|
-
name: "vinicunca
|
|
1283
|
+
name: "vinicunca/formatter/graphql",
|
|
1284
1284
|
rules: {
|
|
1285
1285
|
"format/prettier": [
|
|
1286
1286
|
"error",
|
|
@@ -1308,7 +1308,7 @@ async function ignores() {
|
|
|
1308
1308
|
async function imports() {
|
|
1309
1309
|
return [
|
|
1310
1310
|
{
|
|
1311
|
-
name: "vinicunca
|
|
1311
|
+
name: "vinicunca/imports/rules",
|
|
1312
1312
|
plugins: {
|
|
1313
1313
|
import: pluginImport,
|
|
1314
1314
|
vinicunca: import_eslint_plugin_vinicunca.default
|
|
@@ -1365,7 +1365,7 @@ async function javascript(options = {}) {
|
|
|
1365
1365
|
linterOptions: {
|
|
1366
1366
|
reportUnusedDisableDirectives: true
|
|
1367
1367
|
},
|
|
1368
|
-
name: "vinicunca
|
|
1368
|
+
name: "vinicunca/javascript/rules",
|
|
1369
1369
|
plugins: {
|
|
1370
1370
|
"unused-imports": import_eslint_plugin_unused_imports.default,
|
|
1371
1371
|
"vinicunca": import_eslint_plugin_vinicunca.default
|
|
@@ -1594,7 +1594,7 @@ async function javascript(options = {}) {
|
|
|
1594
1594
|
},
|
|
1595
1595
|
{
|
|
1596
1596
|
files: [`**/scripts/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
|
|
1597
|
-
name: "vinicunca
|
|
1597
|
+
name: "vinicunca/javascript/disables",
|
|
1598
1598
|
rules: {
|
|
1599
1599
|
"no-console": OFF
|
|
1600
1600
|
}
|
|
@@ -1609,7 +1609,7 @@ async function jsdoc(options = {}) {
|
|
|
1609
1609
|
} = options;
|
|
1610
1610
|
return [
|
|
1611
1611
|
{
|
|
1612
|
-
name: "vinicunca
|
|
1612
|
+
name: "vinicunca/jsdoc/rules",
|
|
1613
1613
|
plugins: {
|
|
1614
1614
|
jsdoc: await interopDefault(import("eslint-plugin-jsdoc"))
|
|
1615
1615
|
},
|
|
@@ -1661,7 +1661,7 @@ async function jsonc(options = {}) {
|
|
|
1661
1661
|
]);
|
|
1662
1662
|
return [
|
|
1663
1663
|
{
|
|
1664
|
-
name: "vinicunca
|
|
1664
|
+
name: "vinicunca/jsonc/setup",
|
|
1665
1665
|
plugins: {
|
|
1666
1666
|
jsonc: pluginJsonc
|
|
1667
1667
|
}
|
|
@@ -1671,7 +1671,7 @@ async function jsonc(options = {}) {
|
|
|
1671
1671
|
languageOptions: {
|
|
1672
1672
|
parser: parserJsonc
|
|
1673
1673
|
},
|
|
1674
|
-
name: "vinicunca
|
|
1674
|
+
name: "vinicunca/jsonc/rules",
|
|
1675
1675
|
rules: {
|
|
1676
1676
|
"jsonc/no-bigint-literals": ERROR,
|
|
1677
1677
|
"jsonc/no-binary-expression": ERROR,
|
|
@@ -1728,7 +1728,7 @@ async function markdown(options = {}) {
|
|
|
1728
1728
|
const markdown2 = await interopDefault(import("eslint-plugin-markdown"));
|
|
1729
1729
|
return [
|
|
1730
1730
|
{
|
|
1731
|
-
name: "vinicunca
|
|
1731
|
+
name: "vinicunca/markdown/setup",
|
|
1732
1732
|
plugins: {
|
|
1733
1733
|
markdown: markdown2
|
|
1734
1734
|
}
|
|
@@ -1736,7 +1736,7 @@ async function markdown(options = {}) {
|
|
|
1736
1736
|
{
|
|
1737
1737
|
files,
|
|
1738
1738
|
ignores: [GLOB_MARKDOWN_IN_MARKDOWN],
|
|
1739
|
-
name: "vinicunca
|
|
1739
|
+
name: "vinicunca/markdown/processor",
|
|
1740
1740
|
/**
|
|
1741
1741
|
* `eslint-plugin-markdown` only creates virtual files for code blocks,
|
|
1742
1742
|
* but not the markdown file itself. We use `eslint-merge-processors` to
|
|
@@ -1752,7 +1752,7 @@ async function markdown(options = {}) {
|
|
|
1752
1752
|
languageOptions: {
|
|
1753
1753
|
parser: parserPlain
|
|
1754
1754
|
},
|
|
1755
|
-
name: "vinicunca
|
|
1755
|
+
name: "vinicunca/markdown/parser"
|
|
1756
1756
|
},
|
|
1757
1757
|
{
|
|
1758
1758
|
files: [
|
|
@@ -1766,7 +1766,7 @@ async function markdown(options = {}) {
|
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
1768
|
},
|
|
1769
|
-
name: "vinicunca
|
|
1769
|
+
name: "vinicunca/markdown/disables",
|
|
1770
1770
|
rules: {
|
|
1771
1771
|
"import/newline-after-import": OFF,
|
|
1772
1772
|
"no-alert": OFF,
|
|
@@ -1817,7 +1817,7 @@ async function markdown(options = {}) {
|
|
|
1817
1817
|
async function node() {
|
|
1818
1818
|
return [
|
|
1819
1819
|
{
|
|
1820
|
-
name: "vinicunca
|
|
1820
|
+
name: "vinicunca/node/rules",
|
|
1821
1821
|
plugins: {
|
|
1822
1822
|
node: import_eslint_plugin_n.default
|
|
1823
1823
|
},
|
|
@@ -1840,7 +1840,7 @@ async function node() {
|
|
|
1840
1840
|
async function perfectionist() {
|
|
1841
1841
|
return [
|
|
1842
1842
|
{
|
|
1843
|
-
name: "vinicunca
|
|
1843
|
+
name: "vinicunca/perfectionist/rules",
|
|
1844
1844
|
plugins: {
|
|
1845
1845
|
perfectionist: import_eslint_plugin_perfectionist.default
|
|
1846
1846
|
},
|
|
@@ -1891,7 +1891,7 @@ async function react(options = {}) {
|
|
|
1891
1891
|
]);
|
|
1892
1892
|
return [
|
|
1893
1893
|
{
|
|
1894
|
-
name: "vinicunca
|
|
1894
|
+
name: "vinicunca/react/setup",
|
|
1895
1895
|
plugins: {
|
|
1896
1896
|
"react": pluginReact,
|
|
1897
1897
|
"react-hooks": pluginReactHooks
|
|
@@ -1911,7 +1911,7 @@ async function react(options = {}) {
|
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
1913
|
},
|
|
1914
|
-
name: "vinicunca
|
|
1914
|
+
name: "vinicunca/react/rules",
|
|
1915
1915
|
rules: {
|
|
1916
1916
|
...pluginReact.configs.recommended.rules,
|
|
1917
1917
|
...pluginReactHooks.configs.recommended.rules,
|
|
@@ -1950,7 +1950,7 @@ async function sortPackageJson() {
|
|
|
1950
1950
|
return [
|
|
1951
1951
|
{
|
|
1952
1952
|
files: ["**/package.json"],
|
|
1953
|
-
name: "vinicunca
|
|
1953
|
+
name: "vinicunca/sort/package-json",
|
|
1954
1954
|
rules: {
|
|
1955
1955
|
"jsonc/sort-array-values": [
|
|
1956
1956
|
ERROR,
|
|
@@ -2055,7 +2055,7 @@ function sortTsconfig() {
|
|
|
2055
2055
|
return [
|
|
2056
2056
|
{
|
|
2057
2057
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
2058
|
-
name: "vinicunca
|
|
2058
|
+
name: "vinicunca/sort/tsconfig",
|
|
2059
2059
|
rules: {
|
|
2060
2060
|
"jsonc/sort-keys": [
|
|
2061
2061
|
ERROR,
|
|
@@ -2178,6 +2178,7 @@ function sortTsconfig() {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
|
|
2180
2180
|
// src/configs/test.ts
|
|
2181
|
+
var _pluginTest;
|
|
2181
2182
|
async function test(options = {}) {
|
|
2182
2183
|
const {
|
|
2183
2184
|
files = GLOB_TESTS,
|
|
@@ -2192,23 +2193,24 @@ async function test(options = {}) {
|
|
|
2192
2193
|
// @ts-expect-error missing types
|
|
2193
2194
|
interopDefault(import("eslint-plugin-no-only-tests"))
|
|
2194
2195
|
]);
|
|
2196
|
+
_pluginTest = _pluginTest || {
|
|
2197
|
+
...pluginVitest,
|
|
2198
|
+
rules: {
|
|
2199
|
+
...pluginVitest.rules,
|
|
2200
|
+
// extend `test/no-only-tests` rule
|
|
2201
|
+
...pluginNoOnlyTests.rules
|
|
2202
|
+
}
|
|
2203
|
+
};
|
|
2195
2204
|
return [
|
|
2196
2205
|
{
|
|
2197
|
-
name: "vinicunca
|
|
2206
|
+
name: "vinicunca/test/setup",
|
|
2198
2207
|
plugins: {
|
|
2199
|
-
test:
|
|
2200
|
-
...pluginVitest,
|
|
2201
|
-
rules: {
|
|
2202
|
-
...pluginVitest.rules,
|
|
2203
|
-
// extend `test/no-only-tests` rule
|
|
2204
|
-
...pluginNoOnlyTests.rules
|
|
2205
|
-
}
|
|
2206
|
-
}
|
|
2208
|
+
test: _pluginTest
|
|
2207
2209
|
}
|
|
2208
2210
|
},
|
|
2209
2211
|
{
|
|
2210
2212
|
files,
|
|
2211
|
-
name: "vinicunca
|
|
2213
|
+
name: "vinicunca/test/rules",
|
|
2212
2214
|
rules: {
|
|
2213
2215
|
"node/prefer-global/process": OFF,
|
|
2214
2216
|
"test/consistent-test-it": [ERROR, { fn: "it", withinDescribe: "it" }],
|
|
@@ -2275,13 +2277,13 @@ async function typescript(options = {}) {
|
|
|
2275
2277
|
...parserOptions
|
|
2276
2278
|
}
|
|
2277
2279
|
},
|
|
2278
|
-
name: `vinicunca
|
|
2280
|
+
name: `vinicunca/typescript/${typeAware ? "type-aware-parser" : "parser"}`
|
|
2279
2281
|
};
|
|
2280
2282
|
}
|
|
2281
2283
|
return [
|
|
2282
2284
|
{
|
|
2283
2285
|
// Install the plugins without globs, so they can be configured separately.
|
|
2284
|
-
name: "vinicunca
|
|
2286
|
+
name: "vinicunca/typescript/setup",
|
|
2285
2287
|
plugins: {
|
|
2286
2288
|
ts: pluginTs,
|
|
2287
2289
|
vinicunca: import_eslint_plugin_vinicunca.default
|
|
@@ -2294,7 +2296,7 @@ async function typescript(options = {}) {
|
|
|
2294
2296
|
] : [makeParser({ files, typeAware: false })],
|
|
2295
2297
|
{
|
|
2296
2298
|
files,
|
|
2297
|
-
name: "vinicunca
|
|
2299
|
+
name: "vinicunca/typescript/rules",
|
|
2298
2300
|
rules: {
|
|
2299
2301
|
...renameRules(
|
|
2300
2302
|
pluginTs.configs["eslint-recommended"].overrides[0].rules,
|
|
@@ -2348,7 +2350,7 @@ async function typescript(options = {}) {
|
|
|
2348
2350
|
},
|
|
2349
2351
|
{
|
|
2350
2352
|
files: filesTypeAware,
|
|
2351
|
-
name: "vinicunca
|
|
2353
|
+
name: "vinicunca/typescript/rules-type-aware",
|
|
2352
2354
|
rules: {
|
|
2353
2355
|
...tsconfigPath ? typeAwareRules : {},
|
|
2354
2356
|
...overrides
|
|
@@ -2356,7 +2358,7 @@ async function typescript(options = {}) {
|
|
|
2356
2358
|
},
|
|
2357
2359
|
{
|
|
2358
2360
|
files: ["**/*.d.ts"],
|
|
2359
|
-
name: "vinicunca
|
|
2361
|
+
name: "vinicunca/typescript/disables/dts",
|
|
2360
2362
|
rules: {
|
|
2361
2363
|
"eslint-comments/no-unlimited-disable": OFF,
|
|
2362
2364
|
"import/no-duplicates": OFF,
|
|
@@ -2366,14 +2368,14 @@ async function typescript(options = {}) {
|
|
|
2366
2368
|
},
|
|
2367
2369
|
{
|
|
2368
2370
|
files: ["**/*.{test,spec}.ts?(x)"],
|
|
2369
|
-
name: "vinicunca
|
|
2371
|
+
name: "vinicunca/typescript/disables/tests",
|
|
2370
2372
|
rules: {
|
|
2371
2373
|
"no-unused-expressions": OFF
|
|
2372
2374
|
}
|
|
2373
2375
|
},
|
|
2374
2376
|
{
|
|
2375
2377
|
files: ["**/*.js", "**/*.cjs"],
|
|
2376
|
-
name: "vinicunca
|
|
2378
|
+
name: "vinicunca/typescript/disables/javascript",
|
|
2377
2379
|
rules: {
|
|
2378
2380
|
"ts/no-require-imports": OFF,
|
|
2379
2381
|
"ts/no-var-requires": OFF
|
|
@@ -2386,7 +2388,7 @@ async function typescript(options = {}) {
|
|
|
2386
2388
|
async function unicorn() {
|
|
2387
2389
|
return [
|
|
2388
2390
|
{
|
|
2389
|
-
name: "vinicunca
|
|
2391
|
+
name: "vinicunca/unicorn/rules",
|
|
2390
2392
|
plugins: {
|
|
2391
2393
|
unicorn: import_eslint_plugin_unicorn.default
|
|
2392
2394
|
},
|
|
@@ -2422,7 +2424,7 @@ async function unocss(options = {}) {
|
|
|
2422
2424
|
]);
|
|
2423
2425
|
return [
|
|
2424
2426
|
{
|
|
2425
|
-
name: "vinicunca
|
|
2427
|
+
name: "vinicunca/unocss",
|
|
2426
2428
|
plugins: {
|
|
2427
2429
|
unocss: pluginUnoCSS
|
|
2428
2430
|
},
|
|
@@ -2463,7 +2465,7 @@ async function vue(options = {}) {
|
|
|
2463
2465
|
]);
|
|
2464
2466
|
return [
|
|
2465
2467
|
{
|
|
2466
|
-
name: "vinicunca
|
|
2468
|
+
name: "vinicunca/vue/setup",
|
|
2467
2469
|
plugins: {
|
|
2468
2470
|
vue: pluginVue
|
|
2469
2471
|
}
|
|
@@ -2481,7 +2483,7 @@ async function vue(options = {}) {
|
|
|
2481
2483
|
sourceType: "module"
|
|
2482
2484
|
}
|
|
2483
2485
|
},
|
|
2484
|
-
name: "vinicunca
|
|
2486
|
+
name: "vinicunca/vue/rules",
|
|
2485
2487
|
processor: sfcBlocks === false ? pluginVue.processors[".vue"] : (0, import_eslint_merge_processors2.mergeProcessors)([
|
|
2486
2488
|
pluginVue.processors[".vue"],
|
|
2487
2489
|
processorVueBlocks({
|
|
@@ -2611,7 +2613,7 @@ async function yaml(options = {}) {
|
|
|
2611
2613
|
]);
|
|
2612
2614
|
return [
|
|
2613
2615
|
{
|
|
2614
|
-
name: "vinicunca
|
|
2616
|
+
name: "vinicunca/yaml/setup",
|
|
2615
2617
|
plugins: {
|
|
2616
2618
|
yaml: pluginYaml
|
|
2617
2619
|
}
|
|
@@ -2621,7 +2623,7 @@ async function yaml(options = {}) {
|
|
|
2621
2623
|
languageOptions: {
|
|
2622
2624
|
parser: parserYaml
|
|
2623
2625
|
},
|
|
2624
|
-
name: "vinicunca
|
|
2626
|
+
name: "vinicunca/yaml/rules",
|
|
2625
2627
|
rules: {
|
|
2626
2628
|
"style/spaced-comment": OFF,
|
|
2627
2629
|
"yaml/block-mapping": ERROR,
|
|
@@ -2806,7 +2808,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2806
2808
|
configs.push([fusedConfig]);
|
|
2807
2809
|
}
|
|
2808
2810
|
;
|
|
2809
|
-
let pipeline = new import_eslint_flat_config_utils.
|
|
2811
|
+
let pipeline = new import_eslint_flat_config_utils.FlatConfigComposer();
|
|
2810
2812
|
pipeline = pipeline.append(
|
|
2811
2813
|
...configs,
|
|
2812
2814
|
...userConfigs
|