@exbotanical/eslint-config 1.1.0 → 1.1.2
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/chunk-6GNDNAEM.js +33 -0
- package/dist/flat-QQMMJZVN.js +750 -0
- package/dist/index.d.ts +9972 -483
- package/dist/index.js +86 -11
- package/dist/lib-C4ZW2PPJ.js +263 -0
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_esm_shims
|
|
3
|
+
} from "./chunk-6GNDNAEM.js";
|
|
4
|
+
|
|
5
|
+
// src/index.ts
|
|
6
|
+
init_esm_shims();
|
|
7
|
+
|
|
1
8
|
// src/factory.ts
|
|
9
|
+
init_esm_shims();
|
|
2
10
|
import { isPackageExists as isPackageExists3 } from "local-pkg";
|
|
3
11
|
|
|
12
|
+
// src/configs/index.ts
|
|
13
|
+
init_esm_shims();
|
|
14
|
+
|
|
4
15
|
// src/configs/comments.ts
|
|
16
|
+
init_esm_shims();
|
|
5
17
|
import plugin from "@eslint-community/eslint-plugin-eslint-comments";
|
|
6
18
|
var NAMESPACE = "exbotanical/comments";
|
|
7
19
|
async function comments() {
|
|
@@ -23,7 +35,11 @@ async function comments() {
|
|
|
23
35
|
];
|
|
24
36
|
}
|
|
25
37
|
|
|
38
|
+
// src/configs/disables.ts
|
|
39
|
+
init_esm_shims();
|
|
40
|
+
|
|
26
41
|
// src/filepaths.ts
|
|
42
|
+
init_esm_shims();
|
|
27
43
|
var GLOB_JS = "**/*.?([cm])js";
|
|
28
44
|
var GLOB_JSX = "**/*.?([cm])jsx";
|
|
29
45
|
var GLOB_TS = "**/*.?([cm])ts";
|
|
@@ -118,7 +134,11 @@ async function disables() {
|
|
|
118
134
|
];
|
|
119
135
|
}
|
|
120
136
|
|
|
137
|
+
// src/configs/graphql.ts
|
|
138
|
+
init_esm_shims();
|
|
139
|
+
|
|
121
140
|
// src/utils.ts
|
|
141
|
+
init_esm_shims();
|
|
122
142
|
import { fileURLToPath } from "node:url";
|
|
123
143
|
import { isPackageExists } from "local-pkg";
|
|
124
144
|
var parserPlain = {
|
|
@@ -217,14 +237,16 @@ async function graphql() {
|
|
|
217
237
|
plugins: {
|
|
218
238
|
"@graphql-eslint": graphqlPlugin
|
|
219
239
|
},
|
|
240
|
+
// @ts-expect-error weird rule types in gql plugin
|
|
220
241
|
rules
|
|
221
242
|
}
|
|
222
243
|
];
|
|
223
244
|
}
|
|
224
245
|
|
|
225
246
|
// src/configs/ignores.ts
|
|
247
|
+
init_esm_shims();
|
|
226
248
|
var NAMESPACE3 = "exbotanical/ignores";
|
|
227
|
-
async function ignores(
|
|
249
|
+
async function ignores(files = []) {
|
|
228
250
|
return [
|
|
229
251
|
{
|
|
230
252
|
name: NAMESPACE3,
|
|
@@ -234,6 +256,7 @@ async function ignores({ files = [] } = {}) {
|
|
|
234
256
|
}
|
|
235
257
|
|
|
236
258
|
// src/configs/imports.ts
|
|
259
|
+
init_esm_shims();
|
|
237
260
|
import plugin2 from "eslint-plugin-import";
|
|
238
261
|
var NAMESPACE4 = "exbotanical/imports";
|
|
239
262
|
async function imports() {
|
|
@@ -301,10 +324,12 @@ async function imports() {
|
|
|
301
324
|
}
|
|
302
325
|
|
|
303
326
|
// src/configs/javascript.ts
|
|
327
|
+
init_esm_shims();
|
|
304
328
|
import pluginUnusedImports from "eslint-plugin-unused-imports";
|
|
305
329
|
import globals from "globals";
|
|
306
330
|
|
|
307
331
|
// src/common.ts
|
|
332
|
+
init_esm_shims();
|
|
308
333
|
var VAR_IGNORE_PATTERN = "^_";
|
|
309
334
|
|
|
310
335
|
// src/configs/javascript.ts
|
|
@@ -576,6 +601,7 @@ async function javascript({ overrides = {} } = {}) {
|
|
|
576
601
|
}
|
|
577
602
|
|
|
578
603
|
// src/configs/jsdoc.ts
|
|
604
|
+
init_esm_shims();
|
|
579
605
|
var NAMESPACE6 = "exbotanical/jsdoc";
|
|
580
606
|
async function jsdoc() {
|
|
581
607
|
return [
|
|
@@ -607,7 +633,11 @@ async function jsdoc() {
|
|
|
607
633
|
];
|
|
608
634
|
}
|
|
609
635
|
|
|
636
|
+
// src/configs/jsonc.ts
|
|
637
|
+
init_esm_shims();
|
|
638
|
+
|
|
610
639
|
// src/defaults.ts
|
|
640
|
+
init_esm_shims();
|
|
611
641
|
var STYLE_DEFAULTS = {
|
|
612
642
|
indent: 2,
|
|
613
643
|
jsx: true,
|
|
@@ -691,6 +721,7 @@ async function jsonc({
|
|
|
691
721
|
}
|
|
692
722
|
|
|
693
723
|
// src/configs/jsx.ts
|
|
724
|
+
init_esm_shims();
|
|
694
725
|
var NAMESPACE8 = "exbotanical/jsx";
|
|
695
726
|
async function jsx() {
|
|
696
727
|
return [
|
|
@@ -709,6 +740,7 @@ async function jsx() {
|
|
|
709
740
|
}
|
|
710
741
|
|
|
711
742
|
// src/configs/markdown.ts
|
|
743
|
+
init_esm_shims();
|
|
712
744
|
var NAMESPACE9 = "exbotanical/markdown";
|
|
713
745
|
async function markdown({
|
|
714
746
|
files = [GLOB_MARKDOWN],
|
|
@@ -777,7 +809,11 @@ async function markdown({
|
|
|
777
809
|
];
|
|
778
810
|
}
|
|
779
811
|
|
|
812
|
+
// src/configs/misc/index.ts
|
|
813
|
+
init_esm_shims();
|
|
814
|
+
|
|
780
815
|
// src/configs/misc/perfectionist.ts
|
|
816
|
+
init_esm_shims();
|
|
781
817
|
import pluginPerfectionist from "eslint-plugin-perfectionist";
|
|
782
818
|
var NAMESPACE10 = "exbotanical/misc/perfectionist";
|
|
783
819
|
async function perfectionist() {
|
|
@@ -825,6 +861,7 @@ async function perfectionist() {
|
|
|
825
861
|
}
|
|
826
862
|
|
|
827
863
|
// src/configs/misc/unicorn.ts
|
|
864
|
+
init_esm_shims();
|
|
828
865
|
import pluginUnicorn from "eslint-plugin-unicorn";
|
|
829
866
|
var NAMESPACE11 = "exbotanical/misc/unicorn";
|
|
830
867
|
async function unicorn() {
|
|
@@ -839,13 +876,16 @@ async function unicorn() {
|
|
|
839
876
|
"unicorn/prevent-abbreviations": "off",
|
|
840
877
|
"unicorn/no-null": "off",
|
|
841
878
|
"unicorn/prefer-top-level-await": "off",
|
|
842
|
-
"unicorn/filename-case": "off"
|
|
879
|
+
"unicorn/filename-case": "off",
|
|
880
|
+
"unicorn/no-await-expression-member": "off",
|
|
881
|
+
"unicorn/throw-new-error": "off"
|
|
843
882
|
}
|
|
844
883
|
}
|
|
845
884
|
];
|
|
846
885
|
}
|
|
847
886
|
|
|
848
887
|
// src/configs/node.ts
|
|
888
|
+
init_esm_shims();
|
|
849
889
|
import plugin3 from "eslint-plugin-n";
|
|
850
890
|
var NAMESPACE12 = "exbotanical/node";
|
|
851
891
|
async function node() {
|
|
@@ -869,6 +909,7 @@ async function node() {
|
|
|
869
909
|
}
|
|
870
910
|
|
|
871
911
|
// src/configs/package.json.ts
|
|
912
|
+
init_esm_shims();
|
|
872
913
|
var NAMESPACE13 = "exbotanical/package.json";
|
|
873
914
|
async function packageJson() {
|
|
874
915
|
return [
|
|
@@ -968,7 +1009,11 @@ async function packageJson() {
|
|
|
968
1009
|
];
|
|
969
1010
|
}
|
|
970
1011
|
|
|
1012
|
+
// src/configs/prettier.ts
|
|
1013
|
+
init_esm_shims();
|
|
1014
|
+
|
|
971
1015
|
// src/vendor/plugins/eslint-config-prettier.ts
|
|
1016
|
+
init_esm_shims();
|
|
972
1017
|
var specialRule = 0;
|
|
973
1018
|
var eslint_config_prettier_default = {
|
|
974
1019
|
rules: {
|
|
@@ -1264,6 +1309,7 @@ async function prettier() {
|
|
|
1264
1309
|
}
|
|
1265
1310
|
|
|
1266
1311
|
// src/configs/react.ts
|
|
1312
|
+
init_esm_shims();
|
|
1267
1313
|
import { isPackageExists as isPackageExists2 } from "local-pkg";
|
|
1268
1314
|
var REACT_REFRESH_ALLOW_CONSTANT_EXPORT_PACKAGES = ["vite"];
|
|
1269
1315
|
var REACT_ROUTER_PACKAGES = [
|
|
@@ -1407,6 +1453,7 @@ async function react({
|
|
|
1407
1453
|
}
|
|
1408
1454
|
|
|
1409
1455
|
// src/configs/regexpr.ts
|
|
1456
|
+
init_esm_shims();
|
|
1410
1457
|
import { configs } from "eslint-plugin-regexp";
|
|
1411
1458
|
var NAMESPACE15 = "exbotanical/regexpr";
|
|
1412
1459
|
async function regexpr({
|
|
@@ -1435,10 +1482,11 @@ async function regexpr({
|
|
|
1435
1482
|
}
|
|
1436
1483
|
|
|
1437
1484
|
// src/configs/test.ts
|
|
1485
|
+
init_esm_shims();
|
|
1438
1486
|
var PLUGIN_RUNNER_MAP = {
|
|
1439
1487
|
tap: [
|
|
1440
1488
|
"eslint-plugin-tap",
|
|
1441
|
-
{
|
|
1489
|
+
() => ({
|
|
1442
1490
|
"tap/assertion-message": ["error", "always"],
|
|
1443
1491
|
"tap/max-asserts": ["error", 8],
|
|
1444
1492
|
"tap/no-identical-title": "error",
|
|
@@ -1454,19 +1502,25 @@ var PLUGIN_RUNNER_MAP = {
|
|
|
1454
1502
|
"tap/use-t-well": "error",
|
|
1455
1503
|
"tap/use-t": "error",
|
|
1456
1504
|
"tap/use-tap": "error"
|
|
1457
|
-
}
|
|
1505
|
+
})
|
|
1458
1506
|
],
|
|
1459
1507
|
vitest: [
|
|
1460
1508
|
"@vitest/eslint-plugin",
|
|
1461
|
-
{
|
|
1462
|
-
|
|
1463
|
-
}
|
|
1509
|
+
async () => ({
|
|
1510
|
+
...(await interopDefault(import("@vitest/eslint-plugin"))).configs.recommended.rules
|
|
1511
|
+
})
|
|
1464
1512
|
],
|
|
1465
|
-
jest: [
|
|
1513
|
+
jest: [
|
|
1514
|
+
"eslint-plugin-jest",
|
|
1515
|
+
async () => ({
|
|
1516
|
+
...(await interopDefault(import("./lib-C4ZW2PPJ.js"))).configs["flat/recommended"].rules
|
|
1517
|
+
})
|
|
1518
|
+
]
|
|
1466
1519
|
};
|
|
1467
1520
|
var NAMESPACE16 = "exbotanical/test";
|
|
1468
1521
|
async function test({
|
|
1469
1522
|
runner = "vitest",
|
|
1523
|
+
cypress = false,
|
|
1470
1524
|
files = GLOB_TESTS,
|
|
1471
1525
|
overrides = {}
|
|
1472
1526
|
}) {
|
|
@@ -1476,6 +1530,15 @@ async function test({
|
|
|
1476
1530
|
// @ts-expect-error no types
|
|
1477
1531
|
interopDefault(import("eslint-plugin-no-only-tests"))
|
|
1478
1532
|
]);
|
|
1533
|
+
const extraConfigs = [];
|
|
1534
|
+
if (cypress) {
|
|
1535
|
+
const pluginCypress = await interopDefault(import("./flat-QQMMJZVN.js"));
|
|
1536
|
+
extraConfigs.push({
|
|
1537
|
+
name: `${NAMESPACE16}/cypress/rules`,
|
|
1538
|
+
...pluginCypress.configs.recommended,
|
|
1539
|
+
...typeof cypress === "boolean" ? {} : cypress
|
|
1540
|
+
});
|
|
1541
|
+
}
|
|
1479
1542
|
return [
|
|
1480
1543
|
{
|
|
1481
1544
|
name: `${NAMESPACE16}/setup`,
|
|
@@ -1483,7 +1546,7 @@ async function test({
|
|
|
1483
1546
|
test: {
|
|
1484
1547
|
...pluginRunner,
|
|
1485
1548
|
rules: {
|
|
1486
|
-
...rules,
|
|
1549
|
+
...await Promise.resolve(rules()),
|
|
1487
1550
|
...pluginNoOnlyTests.rules
|
|
1488
1551
|
}
|
|
1489
1552
|
}
|
|
@@ -1495,11 +1558,13 @@ async function test({
|
|
|
1495
1558
|
rules: {
|
|
1496
1559
|
...overrides
|
|
1497
1560
|
}
|
|
1498
|
-
}
|
|
1561
|
+
},
|
|
1562
|
+
...extraConfigs
|
|
1499
1563
|
];
|
|
1500
1564
|
}
|
|
1501
1565
|
|
|
1502
1566
|
// src/configs/toml.ts
|
|
1567
|
+
init_esm_shims();
|
|
1503
1568
|
var NAMESPACE17 = "exbotanical/toml";
|
|
1504
1569
|
async function toml({ files = [GLOB_TOML], overrides = {} } = {}, { indent } = STYLE_DEFAULTS) {
|
|
1505
1570
|
const [plugin4, parser] = await Promise.all([
|
|
@@ -1547,6 +1612,7 @@ async function toml({ files = [GLOB_TOML], overrides = {} } = {}, { indent } = S
|
|
|
1547
1612
|
}
|
|
1548
1613
|
|
|
1549
1614
|
// src/configs/tsconfig.ts
|
|
1615
|
+
init_esm_shims();
|
|
1550
1616
|
var NAMESPACE18 = "exbotanical/tsconfig";
|
|
1551
1617
|
async function tsconfig() {
|
|
1552
1618
|
return [
|
|
@@ -1676,6 +1742,7 @@ async function tsconfig() {
|
|
|
1676
1742
|
}
|
|
1677
1743
|
|
|
1678
1744
|
// src/configs/typescript.ts
|
|
1745
|
+
init_esm_shims();
|
|
1679
1746
|
var NAMESPACE19 = "exbotanical/typescript";
|
|
1680
1747
|
async function typescript(options = {}) {
|
|
1681
1748
|
const {
|
|
@@ -1844,6 +1911,7 @@ async function typescript(options = {}) {
|
|
|
1844
1911
|
}
|
|
1845
1912
|
|
|
1846
1913
|
// src/configs/vue.ts
|
|
1914
|
+
init_esm_shims();
|
|
1847
1915
|
var NAMESPACE20 = "exbotanical/vue";
|
|
1848
1916
|
async function vue({
|
|
1849
1917
|
files = [GLOB_VUE],
|
|
@@ -2014,6 +2082,7 @@ async function vue({
|
|
|
2014
2082
|
}
|
|
2015
2083
|
|
|
2016
2084
|
// src/configs/yaml.ts
|
|
2085
|
+
init_esm_shims();
|
|
2017
2086
|
var NAMESPACE21 = "exbotanical/yaml";
|
|
2018
2087
|
async function yaml({ files = [GLOB_YAML], overrides = {} } = {}, { indent, quotes } = STYLE_DEFAULTS) {
|
|
2019
2088
|
const [plugin4, parser] = await Promise.all([
|
|
@@ -2133,7 +2202,7 @@ async function exbotanical({
|
|
|
2133
2202
|
if (formatter) {
|
|
2134
2203
|
configs2.push(prettier());
|
|
2135
2204
|
}
|
|
2136
|
-
configs2.push(disables(), ignores(
|
|
2205
|
+
configs2.push(disables(), ignores(optionsIgnore));
|
|
2137
2206
|
if (userConfigs.length > 0) {
|
|
2138
2207
|
const resolved2 = await Promise.all(userConfigs);
|
|
2139
2208
|
configs2.push(...resolved2.map((r) => Promise.resolve(Array.isArray(r) ? r : [r])));
|
|
@@ -2145,6 +2214,12 @@ function factoryConfig(options) {
|
|
|
2145
2214
|
if (!options) return {};
|
|
2146
2215
|
return typeof options === "boolean" ? {} : options;
|
|
2147
2216
|
}
|
|
2217
|
+
|
|
2218
|
+
// src/options.ts
|
|
2219
|
+
init_esm_shims();
|
|
2220
|
+
|
|
2221
|
+
// src/types.ts
|
|
2222
|
+
init_esm_shims();
|
|
2148
2223
|
export {
|
|
2149
2224
|
exbotanical as default
|
|
2150
2225
|
};
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__commonJS,
|
|
3
|
+
__dirname,
|
|
4
|
+
__require,
|
|
5
|
+
init_esm_shims
|
|
6
|
+
} from "./chunk-6GNDNAEM.js";
|
|
7
|
+
|
|
8
|
+
// node_modules/eslint-plugin-jest/package.json
|
|
9
|
+
var require_package = __commonJS({
|
|
10
|
+
"node_modules/eslint-plugin-jest/package.json"(exports, module) {
|
|
11
|
+
module.exports = {
|
|
12
|
+
name: "eslint-plugin-jest",
|
|
13
|
+
version: "28.11.0",
|
|
14
|
+
description: "ESLint rules for Jest",
|
|
15
|
+
keywords: [
|
|
16
|
+
"eslint",
|
|
17
|
+
"eslintplugin",
|
|
18
|
+
"eslint-plugin"
|
|
19
|
+
],
|
|
20
|
+
homepage: "https://github.com/jest-community/eslint-plugin-jest#readme",
|
|
21
|
+
bugs: {
|
|
22
|
+
url: "https://github.com/jest-community/eslint-plugin-jest/issues"
|
|
23
|
+
},
|
|
24
|
+
repository: {
|
|
25
|
+
type: "git",
|
|
26
|
+
url: "git+https://github.com/jest-community/eslint-plugin-jest.git"
|
|
27
|
+
},
|
|
28
|
+
license: "MIT",
|
|
29
|
+
author: {
|
|
30
|
+
name: "Jonathan Kim",
|
|
31
|
+
email: "hello@jkimbo.com",
|
|
32
|
+
url: "jkimbo.com"
|
|
33
|
+
},
|
|
34
|
+
main: "lib/index.js",
|
|
35
|
+
types: "index.d.ts",
|
|
36
|
+
files: [
|
|
37
|
+
"docs/",
|
|
38
|
+
"lib/",
|
|
39
|
+
"index.d.ts"
|
|
40
|
+
],
|
|
41
|
+
scripts: {
|
|
42
|
+
build: "babel --extensions .js,.ts src --out-dir lib --copy-files && rimraf --glob lib/__tests__ 'lib/**/__tests__'",
|
|
43
|
+
_postinstall: "is-ci || husky",
|
|
44
|
+
lint: "eslint . --ignore-pattern '!.eslintrc.js' --ext js,ts",
|
|
45
|
+
prepack: "rimraf lib && yarn build",
|
|
46
|
+
prepublishOnly: "pinst --disable",
|
|
47
|
+
"prettier:check": "prettier --check 'docs/**/*.md' README.md '.github/**' package.json tsconfig.json src/globals.json .yarnrc.yml",
|
|
48
|
+
"prettier:write": "prettier --write 'docs/**/*.md' README.md '.github/**' package.json tsconfig.json src/globals.json .yarnrc.yml",
|
|
49
|
+
postpublish: "pinst --enable",
|
|
50
|
+
"regenerate-docs": "yarn prepack && eslint-doc-generator",
|
|
51
|
+
test: "jest",
|
|
52
|
+
typecheck: "tsc -p ."
|
|
53
|
+
},
|
|
54
|
+
commitlint: {
|
|
55
|
+
extends: [
|
|
56
|
+
"@commitlint/config-conventional"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"lint-staged": {
|
|
60
|
+
"*.{js,ts}": "eslint --fix",
|
|
61
|
+
"*.{md,json,yml}": "prettier --write"
|
|
62
|
+
},
|
|
63
|
+
prettier: {
|
|
64
|
+
arrowParens: "avoid",
|
|
65
|
+
endOfLine: "auto",
|
|
66
|
+
proseWrap: "always",
|
|
67
|
+
singleQuote: true
|
|
68
|
+
},
|
|
69
|
+
release: {
|
|
70
|
+
plugins: [
|
|
71
|
+
"@semantic-release/commit-analyzer",
|
|
72
|
+
"@semantic-release/release-notes-generator",
|
|
73
|
+
"@semantic-release/changelog",
|
|
74
|
+
"@semantic-release/npm",
|
|
75
|
+
"@semantic-release/git",
|
|
76
|
+
"@semantic-release/github"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
dependencies: {
|
|
80
|
+
"@typescript-eslint/utils": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
81
|
+
},
|
|
82
|
+
devDependencies: {
|
|
83
|
+
"@babel/cli": "^7.4.4",
|
|
84
|
+
"@babel/core": "^7.4.4",
|
|
85
|
+
"@babel/preset-env": "^7.4.4",
|
|
86
|
+
"@babel/preset-typescript": "^7.3.3",
|
|
87
|
+
"@commitlint/cli": "^17.0.3",
|
|
88
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
89
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
|
90
|
+
"@schemastore/package": "^0.0.10",
|
|
91
|
+
"@semantic-release/changelog": "^6.0.0",
|
|
92
|
+
"@semantic-release/git": "^10.0.0",
|
|
93
|
+
"@tsconfig/node16": "^16.0.0",
|
|
94
|
+
"@types/eslint": "^8.4.6",
|
|
95
|
+
"@types/jest": "^29.0.0",
|
|
96
|
+
"@types/node": "^16.0.0",
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
98
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
99
|
+
"@typescript-eslint/utils": "^6.0.0",
|
|
100
|
+
"babel-jest": "^29.0.0",
|
|
101
|
+
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
|
|
102
|
+
dedent: "^1.5.0",
|
|
103
|
+
eslint: "^7.0.0 || ^8.0.0",
|
|
104
|
+
"eslint-config-prettier": "^10.0.0",
|
|
105
|
+
"eslint-doc-generator": "^1.0.0",
|
|
106
|
+
"eslint-plugin-eslint-plugin": "^6.0.0",
|
|
107
|
+
"eslint-plugin-import": "^2.25.1",
|
|
108
|
+
"eslint-plugin-n": "^17.0.0",
|
|
109
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
110
|
+
"eslint-remote-tester": "^3.0.0",
|
|
111
|
+
"eslint-remote-tester-repositories": "~1.0.0",
|
|
112
|
+
husky: "^9.0.1",
|
|
113
|
+
"is-ci": "^4.0.0",
|
|
114
|
+
jest: "^29.0.0",
|
|
115
|
+
"jest-runner-eslint": "^2.0.0",
|
|
116
|
+
"lint-staged": "^13.0.3",
|
|
117
|
+
"markdown-link-check": "~3.12.0",
|
|
118
|
+
pinst: "^3.0.0",
|
|
119
|
+
prettier: "^3.0.0",
|
|
120
|
+
rimraf: "^5.0.0",
|
|
121
|
+
"semantic-release": "^24.0.0",
|
|
122
|
+
semver: "^7.3.5",
|
|
123
|
+
"strip-ansi": "^6.0.0",
|
|
124
|
+
"ts-node": "^10.2.1",
|
|
125
|
+
typescript: "^5.0.4"
|
|
126
|
+
},
|
|
127
|
+
peerDependencies: {
|
|
128
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
129
|
+
eslint: "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
130
|
+
jest: "*"
|
|
131
|
+
},
|
|
132
|
+
peerDependenciesMeta: {
|
|
133
|
+
"@typescript-eslint/eslint-plugin": {
|
|
134
|
+
optional: true
|
|
135
|
+
},
|
|
136
|
+
jest: {
|
|
137
|
+
optional: true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
packageManager: "yarn@3.8.7",
|
|
141
|
+
engines: {
|
|
142
|
+
node: "^16.10.0 || ^18.12.0 || >=20.0.0"
|
|
143
|
+
},
|
|
144
|
+
publishConfig: {
|
|
145
|
+
provenance: true
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// node_modules/eslint-plugin-jest/lib/globals.json
|
|
152
|
+
var require_globals = __commonJS({
|
|
153
|
+
"node_modules/eslint-plugin-jest/lib/globals.json"(exports, module) {
|
|
154
|
+
module.exports = {
|
|
155
|
+
afterAll: false,
|
|
156
|
+
afterEach: false,
|
|
157
|
+
beforeAll: false,
|
|
158
|
+
beforeEach: false,
|
|
159
|
+
describe: false,
|
|
160
|
+
expect: false,
|
|
161
|
+
fit: false,
|
|
162
|
+
it: false,
|
|
163
|
+
jest: false,
|
|
164
|
+
test: false,
|
|
165
|
+
xdescribe: false,
|
|
166
|
+
xit: false,
|
|
167
|
+
xtest: false
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
// node_modules/eslint-plugin-jest/lib/index.js
|
|
173
|
+
var require_lib = __commonJS({
|
|
174
|
+
"node_modules/eslint-plugin-jest/lib/index.js"(exports, module) {
|
|
175
|
+
init_esm_shims();
|
|
176
|
+
var _fs = __require("fs");
|
|
177
|
+
var _path = __require("path");
|
|
178
|
+
var _package = require_package();
|
|
179
|
+
var _globals = _interopRequireDefault(require_globals());
|
|
180
|
+
function _interopRequireDefault(e) {
|
|
181
|
+
return e && e.__esModule ? e : { default: e };
|
|
182
|
+
}
|
|
183
|
+
var interopRequireDefault = (obj) => obj && obj.__esModule ? obj : {
|
|
184
|
+
default: obj
|
|
185
|
+
};
|
|
186
|
+
var importDefault = (moduleName) => (
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
188
|
+
interopRequireDefault(__require(moduleName)).default
|
|
189
|
+
);
|
|
190
|
+
var rulesDir = (0, _path.join)(__dirname, "rules");
|
|
191
|
+
var excludedFiles = ["__tests__", "detectJestVersion", "utils"];
|
|
192
|
+
var rules = Object.fromEntries((0, _fs.readdirSync)(rulesDir).map((rule) => (0, _path.parse)(rule).name).filter((rule) => !excludedFiles.includes(rule)).map((rule) => [rule, importDefault((0, _path.join)(rulesDir, rule))]));
|
|
193
|
+
var recommendedRules = {
|
|
194
|
+
"jest/expect-expect": "warn",
|
|
195
|
+
"jest/no-alias-methods": "error",
|
|
196
|
+
"jest/no-commented-out-tests": "warn",
|
|
197
|
+
"jest/no-conditional-expect": "error",
|
|
198
|
+
"jest/no-deprecated-functions": "error",
|
|
199
|
+
"jest/no-disabled-tests": "warn",
|
|
200
|
+
"jest/no-done-callback": "error",
|
|
201
|
+
"jest/no-export": "error",
|
|
202
|
+
"jest/no-focused-tests": "error",
|
|
203
|
+
"jest/no-identical-title": "error",
|
|
204
|
+
"jest/no-interpolation-in-snapshots": "error",
|
|
205
|
+
"jest/no-jasmine-globals": "error",
|
|
206
|
+
"jest/no-mocks-import": "error",
|
|
207
|
+
"jest/no-standalone-expect": "error",
|
|
208
|
+
"jest/no-test-prefixes": "error",
|
|
209
|
+
"jest/valid-describe-callback": "error",
|
|
210
|
+
"jest/valid-expect": "error",
|
|
211
|
+
"jest/valid-expect-in-promise": "error",
|
|
212
|
+
"jest/valid-title": "error"
|
|
213
|
+
};
|
|
214
|
+
var styleRules = {
|
|
215
|
+
"jest/no-alias-methods": "warn",
|
|
216
|
+
"jest/prefer-to-be": "error",
|
|
217
|
+
"jest/prefer-to-contain": "error",
|
|
218
|
+
"jest/prefer-to-have-length": "error"
|
|
219
|
+
};
|
|
220
|
+
var allRules = Object.fromEntries(Object.entries(rules).filter(([, rule]) => !rule.meta.deprecated).map(([name]) => [`jest/${name}`, "error"]));
|
|
221
|
+
var plugin = {
|
|
222
|
+
meta: {
|
|
223
|
+
name: _package.name,
|
|
224
|
+
version: _package.version
|
|
225
|
+
},
|
|
226
|
+
// ugly cast for now to keep TypeScript happy since
|
|
227
|
+
// we don't have types for flat config yet
|
|
228
|
+
configs: {},
|
|
229
|
+
environments: {
|
|
230
|
+
globals: {
|
|
231
|
+
globals: _globals.default
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
rules
|
|
235
|
+
};
|
|
236
|
+
var createRCConfig = (rules2) => ({
|
|
237
|
+
plugins: ["jest"],
|
|
238
|
+
env: {
|
|
239
|
+
"jest/globals": true
|
|
240
|
+
},
|
|
241
|
+
rules: rules2
|
|
242
|
+
});
|
|
243
|
+
var createFlatConfig = (rules2) => ({
|
|
244
|
+
plugins: {
|
|
245
|
+
jest: plugin
|
|
246
|
+
},
|
|
247
|
+
languageOptions: {
|
|
248
|
+
globals: _globals.default
|
|
249
|
+
},
|
|
250
|
+
rules: rules2
|
|
251
|
+
});
|
|
252
|
+
plugin.configs = {
|
|
253
|
+
all: createRCConfig(allRules),
|
|
254
|
+
recommended: createRCConfig(recommendedRules),
|
|
255
|
+
style: createRCConfig(styleRules),
|
|
256
|
+
"flat/all": createFlatConfig(allRules),
|
|
257
|
+
"flat/recommended": createFlatConfig(recommendedRules),
|
|
258
|
+
"flat/style": createFlatConfig(styleRules)
|
|
259
|
+
};
|
|
260
|
+
module.exports = plugin;
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
export default require_lib();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exbotanical/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Zito's eslint config",
|
|
7
7
|
"author": "Matthew Zito <exbotanical@protonmail.com> (https://github.com/exbotanical/)",
|
|
@@ -113,8 +113,11 @@
|
|
|
113
113
|
"@types/node": "^22.13.8",
|
|
114
114
|
"bumpp": "^10.0.3",
|
|
115
115
|
"eslint": "^9.21.0",
|
|
116
|
+
"eslint-plugin-cypress": "^4.2.0",
|
|
117
|
+
"eslint-plugin-jest": "^28.11.0",
|
|
116
118
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
117
119
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
120
|
+
"eslint-plugin-tap": "^1.2.1",
|
|
118
121
|
"eslint-plugin-vue": "^9.32.0",
|
|
119
122
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
120
123
|
"jiti": "^2.4.2",
|