@isentinel/eslint-config 0.8.0 → 0.9.0
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-PEUZU5TY.js → chunk-NPV2NF5N.js} +2 -2
- package/dist/cli.cjs +13 -7
- package/dist/cli.js +14 -8
- package/dist/index.cjs +131 -10
- package/dist/index.d.cts +532 -56
- package/dist/index.d.ts +532 -56
- package/dist/index.js +127 -9
- package/package.json +14 -8
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
30
|
-
// node_modules/.pnpm/tsup@8.3.0_jiti@1.
|
|
30
|
+
// node_modules/.pnpm/tsup@8.3.0_jiti@2.1.2_postcss@8.4.38_tsx@4.19.1_typescript@5.5.4_yaml@2.5.1/node_modules/tsup/assets/esm_shims.js
|
|
31
31
|
var init_esm_shims = __esm({
|
|
32
|
-
"node_modules/.pnpm/tsup@8.3.0_jiti@1.
|
|
32
|
+
"node_modules/.pnpm/tsup@8.3.0_jiti@2.1.2_postcss@8.4.38_tsx@4.19.1_typescript@5.5.4_yaml@2.5.1/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
}
|
|
35
35
|
});
|
package/dist/cli.cjs
CHANGED
|
@@ -37,7 +37,7 @@ var import_helpers = require("yargs/helpers");
|
|
|
37
37
|
// package.json
|
|
38
38
|
var package_default = {
|
|
39
39
|
name: "@isentinel/eslint-config",
|
|
40
|
-
version: "0.
|
|
40
|
+
version: "0.9.0",
|
|
41
41
|
description: "iSentinel's ESLint config",
|
|
42
42
|
keywords: [
|
|
43
43
|
"eslint-config",
|
|
@@ -110,6 +110,7 @@ var package_default = {
|
|
|
110
110
|
"eslint-plugin-jsonc": "2.16.0",
|
|
111
111
|
"eslint-plugin-markdown": "5.1.0",
|
|
112
112
|
"eslint-plugin-no-autofix": "2.1.0",
|
|
113
|
+
"eslint-plugin-no-only-tests": "3.3.0",
|
|
113
114
|
"eslint-plugin-package-json": "0.15.3",
|
|
114
115
|
"eslint-plugin-perfectionist": "3.6.0",
|
|
115
116
|
"eslint-plugin-promise": "7.1.0",
|
|
@@ -131,24 +132,25 @@ var package_default = {
|
|
|
131
132
|
},
|
|
132
133
|
devDependencies: {
|
|
133
134
|
"@antfu/ni": "0.23.0",
|
|
134
|
-
"@eslint-react/eslint-plugin": "1.14.
|
|
135
|
+
"@eslint-react/eslint-plugin": "1.14.3",
|
|
135
136
|
"@eslint/config-inspector": "0.5.4",
|
|
136
137
|
"@isentinel/eslint-config": "workspace:*",
|
|
137
138
|
"@stylistic/eslint-plugin-migrate": "2.8.0",
|
|
138
139
|
"@types/fs-extra": "11.0.4",
|
|
139
|
-
"@types/node": "22.
|
|
140
|
+
"@types/node": "22.7.4",
|
|
140
141
|
"@types/prompts": "2.4.9",
|
|
141
142
|
"@types/yargs": "17.0.33",
|
|
142
|
-
bumpp: "9.
|
|
143
|
-
eslint: "9.
|
|
143
|
+
bumpp: "9.7.1",
|
|
144
|
+
eslint: "9.13.0",
|
|
145
|
+
"eslint-plugin-jest": "28.9.0",
|
|
144
146
|
"eslint-plugin-react-roblox-hooks": "5.1.0-rbx.1",
|
|
145
147
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
146
148
|
"eslint-typegen": "0.3.2",
|
|
147
|
-
esno: "4.
|
|
149
|
+
esno: "4.8.0",
|
|
148
150
|
execa: "9.4.0",
|
|
149
151
|
"fast-glob": "3.3.2",
|
|
150
152
|
"fs-extra": "11.2.0",
|
|
151
|
-
jiti: "1.
|
|
153
|
+
jiti: "2.1.2",
|
|
152
154
|
"lint-staged": "15.2.10",
|
|
153
155
|
rimraf: "6.0.1",
|
|
154
156
|
"simple-git-hooks": "2.11.1",
|
|
@@ -158,6 +160,7 @@ var package_default = {
|
|
|
158
160
|
peerDependencies: {
|
|
159
161
|
"@eslint-react/eslint-plugin": "^1.14.0",
|
|
160
162
|
eslint: "^9.10.0",
|
|
163
|
+
"eslint-plugin-jest": "^28.9.0",
|
|
161
164
|
"eslint-plugin-react-roblox-hooks": "^5.1.0-rbx.1"
|
|
162
165
|
},
|
|
163
166
|
peerDependenciesMeta: {
|
|
@@ -166,6 +169,9 @@ var package_default = {
|
|
|
166
169
|
},
|
|
167
170
|
"eslint-plugin-react-roblox-hooks": {
|
|
168
171
|
optional: true
|
|
172
|
+
},
|
|
173
|
+
"eslint-plugin-jest": {
|
|
174
|
+
optional: true
|
|
169
175
|
}
|
|
170
176
|
},
|
|
171
177
|
packageManager: "pnpm@9.11.0",
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_esm_shims
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NPV2NF5N.js";
|
|
4
4
|
|
|
5
5
|
// src/cli.ts
|
|
6
6
|
init_esm_shims();
|
|
@@ -19,7 +19,7 @@ init_esm_shims();
|
|
|
19
19
|
// package.json
|
|
20
20
|
var package_default = {
|
|
21
21
|
name: "@isentinel/eslint-config",
|
|
22
|
-
version: "0.
|
|
22
|
+
version: "0.9.0",
|
|
23
23
|
description: "iSentinel's ESLint config",
|
|
24
24
|
keywords: [
|
|
25
25
|
"eslint-config",
|
|
@@ -92,6 +92,7 @@ var package_default = {
|
|
|
92
92
|
"eslint-plugin-jsonc": "2.16.0",
|
|
93
93
|
"eslint-plugin-markdown": "5.1.0",
|
|
94
94
|
"eslint-plugin-no-autofix": "2.1.0",
|
|
95
|
+
"eslint-plugin-no-only-tests": "3.3.0",
|
|
95
96
|
"eslint-plugin-package-json": "0.15.3",
|
|
96
97
|
"eslint-plugin-perfectionist": "3.6.0",
|
|
97
98
|
"eslint-plugin-promise": "7.1.0",
|
|
@@ -113,24 +114,25 @@ var package_default = {
|
|
|
113
114
|
},
|
|
114
115
|
devDependencies: {
|
|
115
116
|
"@antfu/ni": "0.23.0",
|
|
116
|
-
"@eslint-react/eslint-plugin": "1.14.
|
|
117
|
+
"@eslint-react/eslint-plugin": "1.14.3",
|
|
117
118
|
"@eslint/config-inspector": "0.5.4",
|
|
118
119
|
"@isentinel/eslint-config": "workspace:*",
|
|
119
120
|
"@stylistic/eslint-plugin-migrate": "2.8.0",
|
|
120
121
|
"@types/fs-extra": "11.0.4",
|
|
121
|
-
"@types/node": "22.
|
|
122
|
+
"@types/node": "22.7.4",
|
|
122
123
|
"@types/prompts": "2.4.9",
|
|
123
124
|
"@types/yargs": "17.0.33",
|
|
124
|
-
bumpp: "9.
|
|
125
|
-
eslint: "9.
|
|
125
|
+
bumpp: "9.7.1",
|
|
126
|
+
eslint: "9.13.0",
|
|
127
|
+
"eslint-plugin-jest": "28.9.0",
|
|
126
128
|
"eslint-plugin-react-roblox-hooks": "5.1.0-rbx.1",
|
|
127
129
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
128
130
|
"eslint-typegen": "0.3.2",
|
|
129
|
-
esno: "4.
|
|
131
|
+
esno: "4.8.0",
|
|
130
132
|
execa: "9.4.0",
|
|
131
133
|
"fast-glob": "3.3.2",
|
|
132
134
|
"fs-extra": "11.2.0",
|
|
133
|
-
jiti: "1.
|
|
135
|
+
jiti: "2.1.2",
|
|
134
136
|
"lint-staged": "15.2.10",
|
|
135
137
|
rimraf: "6.0.1",
|
|
136
138
|
"simple-git-hooks": "2.11.1",
|
|
@@ -140,6 +142,7 @@ var package_default = {
|
|
|
140
142
|
peerDependencies: {
|
|
141
143
|
"@eslint-react/eslint-plugin": "^1.14.0",
|
|
142
144
|
eslint: "^9.10.0",
|
|
145
|
+
"eslint-plugin-jest": "^28.9.0",
|
|
143
146
|
"eslint-plugin-react-roblox-hooks": "^5.1.0-rbx.1"
|
|
144
147
|
},
|
|
145
148
|
peerDependenciesMeta: {
|
|
@@ -148,6 +151,9 @@ var package_default = {
|
|
|
148
151
|
},
|
|
149
152
|
"eslint-plugin-react-roblox-hooks": {
|
|
150
153
|
optional: true
|
|
154
|
+
},
|
|
155
|
+
"eslint-plugin-jest": {
|
|
156
|
+
optional: true
|
|
151
157
|
}
|
|
152
158
|
},
|
|
153
159
|
packageManager: "pnpm@9.11.0",
|
package/dist/index.cjs
CHANGED
|
@@ -33,19 +33,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/tsup@8.3.0_jiti@1.
|
|
36
|
+
// node_modules/.pnpm/tsup@8.3.0_jiti@2.1.2_postcss@8.4.38_tsx@4.19.1_typescript@5.5.4_yaml@2.5.1/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var getImportMetaUrl, importMetaUrl;
|
|
38
38
|
var init_cjs_shims = __esm({
|
|
39
|
-
"node_modules/.pnpm/tsup@8.3.0_jiti@1.
|
|
39
|
+
"node_modules/.pnpm/tsup@8.3.0_jiti@2.1.2_postcss@8.4.38_tsx@4.19.1_typescript@5.5.4_yaml@2.5.1/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
42
42
|
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.
|
|
46
|
+
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.13.0_jiti@2.1.2_/node_modules/eslint-plugin-simple-import-sort/shared.js
|
|
47
47
|
var require_shared = __commonJS({
|
|
48
|
-
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.
|
|
48
|
+
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.13.0_jiti@2.1.2_/node_modules/eslint-plugin-simple-import-sort/shared.js"(exports2, module2) {
|
|
49
49
|
"use strict";
|
|
50
50
|
init_cjs_shims();
|
|
51
51
|
function extractChunks(parentNode, isPartOfChunk) {
|
|
@@ -584,9 +584,9 @@ var require_shared = __commonJS({
|
|
|
584
584
|
}
|
|
585
585
|
});
|
|
586
586
|
|
|
587
|
-
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.
|
|
587
|
+
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.13.0_jiti@2.1.2_/node_modules/eslint-plugin-simple-import-sort/imports.js
|
|
588
588
|
var require_imports = __commonJS({
|
|
589
|
-
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.
|
|
589
|
+
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.13.0_jiti@2.1.2_/node_modules/eslint-plugin-simple-import-sort/imports.js"(exports2, module2) {
|
|
590
590
|
"use strict";
|
|
591
591
|
init_cjs_shims();
|
|
592
592
|
var shared = require_shared();
|
|
@@ -712,9 +712,9 @@ var require_imports = __commonJS({
|
|
|
712
712
|
}
|
|
713
713
|
});
|
|
714
714
|
|
|
715
|
-
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.
|
|
715
|
+
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.13.0_jiti@2.1.2_/node_modules/eslint-plugin-simple-import-sort/exports.js
|
|
716
716
|
var require_exports = __commonJS({
|
|
717
|
-
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.
|
|
717
|
+
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.13.0_jiti@2.1.2_/node_modules/eslint-plugin-simple-import-sort/exports.js"(exports2, module2) {
|
|
718
718
|
"use strict";
|
|
719
719
|
init_cjs_shims();
|
|
720
720
|
var shared = require_shared();
|
|
@@ -804,9 +804,9 @@ var require_exports = __commonJS({
|
|
|
804
804
|
}
|
|
805
805
|
});
|
|
806
806
|
|
|
807
|
-
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.
|
|
807
|
+
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.13.0_jiti@2.1.2_/node_modules/eslint-plugin-simple-import-sort/index.js
|
|
808
808
|
var require_eslint_plugin_simple_import_sort = __commonJS({
|
|
809
|
-
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.
|
|
809
|
+
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.1_eslint@9.13.0_jiti@2.1.2_/node_modules/eslint-plugin-simple-import-sort/index.js"(exports2, module2) {
|
|
810
810
|
"use strict";
|
|
811
811
|
init_cjs_shims();
|
|
812
812
|
var importsRule = require_imports();
|
|
@@ -846,6 +846,7 @@ __export(src_exports, {
|
|
|
846
846
|
GLOB_SRC: () => GLOB_SRC,
|
|
847
847
|
GLOB_SRC_EXT: () => GLOB_SRC_EXT,
|
|
848
848
|
GLOB_STYLE: () => GLOB_STYLE,
|
|
849
|
+
GLOB_TESTS: () => GLOB_TESTS,
|
|
849
850
|
GLOB_TOML: () => GLOB_TOML,
|
|
850
851
|
GLOB_TS: () => GLOB_TS,
|
|
851
852
|
GLOB_TSX: () => GLOB_TSX,
|
|
@@ -862,6 +863,8 @@ __export(src_exports, {
|
|
|
862
863
|
ignores: () => ignores,
|
|
863
864
|
imports: () => imports,
|
|
864
865
|
interopDefault: () => interopDefault,
|
|
866
|
+
isInEditorEnvironment: () => isInEditorEnvironment,
|
|
867
|
+
isInGitHooksOrLintStaged: () => isInGitHooksOrLintStaged,
|
|
865
868
|
jsdoc: () => jsdoc,
|
|
866
869
|
jsonc: () => jsonc,
|
|
867
870
|
markdown: () => markdown,
|
|
@@ -920,6 +923,13 @@ var GLOB_YAML = "**/*.y?(a)ml";
|
|
|
920
923
|
var GLOB_TOML = "**/*.toml";
|
|
921
924
|
var GLOB_HTML = "**/*.htm?(l)";
|
|
922
925
|
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
926
|
+
var GLOB_TESTS = [
|
|
927
|
+
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
928
|
+
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
929
|
+
`**/*.test.${GLOB_SRC_EXT}`,
|
|
930
|
+
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
931
|
+
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
932
|
+
];
|
|
923
933
|
var GLOB_ALL_SRC = [GLOB_SRC, GLOB_STYLE, GLOB_JSON, GLOB_JSON5, GLOB_MARKDOWN, GLOB_HTML];
|
|
924
934
|
var GLOB_EXCLUDE = [
|
|
925
935
|
"**/node_modules",
|
|
@@ -1171,6 +1181,18 @@ function getOverrides(options, key) {
|
|
|
1171
1181
|
..."overrides" in sub ? sub.overrides : {}
|
|
1172
1182
|
};
|
|
1173
1183
|
}
|
|
1184
|
+
function isInEditorEnvironment() {
|
|
1185
|
+
if (import_node_process.default.env.CI) {
|
|
1186
|
+
return false;
|
|
1187
|
+
}
|
|
1188
|
+
if (isInGitHooksOrLintStaged()) {
|
|
1189
|
+
return false;
|
|
1190
|
+
}
|
|
1191
|
+
return !!(import_node_process.default.env.VSCODE_PID || import_node_process.default.env.VSCODE_CWD || import_node_process.default.env.JETBRAINS_IDE || import_node_process.default.env.VIM || import_node_process.default.env.NVIM);
|
|
1192
|
+
}
|
|
1193
|
+
function isInGitHooksOrLintStaged() {
|
|
1194
|
+
return !!(import_node_process.default.env.GIT_PARAMS || import_node_process.default.env.VSCODE_GIT_COMMAND || import_node_process.default.env.npm_lifecycle_script?.startsWith("lint-staged"));
|
|
1195
|
+
}
|
|
1174
1196
|
|
|
1175
1197
|
// src/configs/stylistic.ts
|
|
1176
1198
|
var StylisticConfigDefaults = {
|
|
@@ -2910,6 +2932,85 @@ async function yaml(options = {}) {
|
|
|
2910
2932
|
init_cjs_shims();
|
|
2911
2933
|
var import_eslint_flat_config_utils = require("eslint-flat-config-utils");
|
|
2912
2934
|
var import_node_fs = __toESM(require("fs"), 1);
|
|
2935
|
+
|
|
2936
|
+
// src/configs/test.ts
|
|
2937
|
+
init_cjs_shims();
|
|
2938
|
+
var pluginTest;
|
|
2939
|
+
async function test(options = {}) {
|
|
2940
|
+
const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
|
|
2941
|
+
await ensurePackages(["eslint-plugin-jest"]);
|
|
2942
|
+
const pluginJest = await interopDefault(import("eslint-plugin-jest"));
|
|
2943
|
+
pluginTest ||= {
|
|
2944
|
+
...pluginJest
|
|
2945
|
+
};
|
|
2946
|
+
return [
|
|
2947
|
+
{
|
|
2948
|
+
name: "style/test/setup",
|
|
2949
|
+
plugins: {
|
|
2950
|
+
test: pluginTest
|
|
2951
|
+
}
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
files,
|
|
2955
|
+
name: "style/test/rules",
|
|
2956
|
+
rules: {
|
|
2957
|
+
// Jest
|
|
2958
|
+
"test/consistent-test-it": "error",
|
|
2959
|
+
"test/expect-expect": "warn",
|
|
2960
|
+
"test/max-expects": "warn",
|
|
2961
|
+
"test/max-nested-describe": "error",
|
|
2962
|
+
"test/no-alias-methods": "error",
|
|
2963
|
+
"test/no-commented-out-tests": "warn",
|
|
2964
|
+
"test/no-conditional-expect": "error",
|
|
2965
|
+
"test/no-conditional-in-test": "error",
|
|
2966
|
+
"test/no-disabled-tests": "warn",
|
|
2967
|
+
"test/no-done-callback": "error",
|
|
2968
|
+
"test/no-duplicate-hooks": "error",
|
|
2969
|
+
"test/no-export": "error",
|
|
2970
|
+
"test/no-focused-tests": isInEditor ? "off" : "error",
|
|
2971
|
+
"test/no-identical-title": "error",
|
|
2972
|
+
"test/no-standalone-expect": "error",
|
|
2973
|
+
"test/no-test-prefixes": "error",
|
|
2974
|
+
"test/no-untyped-mock-factory": "error",
|
|
2975
|
+
"test/padding-around-all": "warn",
|
|
2976
|
+
"test/prefer-called-with": "warn",
|
|
2977
|
+
"test/prefer-comparison-matcher": "warn",
|
|
2978
|
+
"test/prefer-each": "warn",
|
|
2979
|
+
"test/prefer-equality-matcher": "warn",
|
|
2980
|
+
"test/prefer-hooks-in-order": "warn",
|
|
2981
|
+
"test/prefer-lowercase-title": "warn",
|
|
2982
|
+
"test/prefer-strict-equal": "error",
|
|
2983
|
+
"test/prefer-to-be": "error",
|
|
2984
|
+
"test/prefer-to-contain": "error",
|
|
2985
|
+
"test/prefer-to-have-length": "error",
|
|
2986
|
+
"test/prefer-todo": "warn",
|
|
2987
|
+
"test/require-hook": "error",
|
|
2988
|
+
"test/require-to-throw-message": "warn",
|
|
2989
|
+
"test/require-top-level-describe": "error",
|
|
2990
|
+
"test/unbound-method": "error",
|
|
2991
|
+
"test/valid-describe-callback": "error",
|
|
2992
|
+
"test/valid-expect": "error",
|
|
2993
|
+
"test/valid-expect-in-promise": "error",
|
|
2994
|
+
"test/valid-title": "error",
|
|
2995
|
+
// Disables
|
|
2996
|
+
...{
|
|
2997
|
+
"antfu/no-top-level-await": "off",
|
|
2998
|
+
"no-unused-expressions": "off",
|
|
2999
|
+
"ts/explicit-function-return-type": "off"
|
|
3000
|
+
},
|
|
3001
|
+
...overrides
|
|
3002
|
+
},
|
|
3003
|
+
settings: {
|
|
3004
|
+
jest: {
|
|
3005
|
+
globalPackage: "@rbxts/jest-globals",
|
|
3006
|
+
version: 27
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
];
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
// src/factory.ts
|
|
2913
3014
|
var flatConfigProps = [
|
|
2914
3015
|
"name",
|
|
2915
3016
|
"files",
|
|
@@ -2941,6 +3042,15 @@ function style(options = {}, ...userConfigs) {
|
|
|
2941
3042
|
spellCheck: enableSpellCheck,
|
|
2942
3043
|
typescript: enableTypeScript
|
|
2943
3044
|
} = options;
|
|
3045
|
+
let isInEditor = options.isInEditor;
|
|
3046
|
+
if (isInEditor === void 0) {
|
|
3047
|
+
isInEditor = isInEditorEnvironment();
|
|
3048
|
+
if (isInEditor) {
|
|
3049
|
+
console.log(
|
|
3050
|
+
"[@isentinel/eslint-config] Detected running in editor, some rules are disabled."
|
|
3051
|
+
);
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
2944
3054
|
const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === "object" ? options.stylistic : {};
|
|
2945
3055
|
if (stylisticOptions && !("jsx" in stylisticOptions)) {
|
|
2946
3056
|
stylisticOptions.jsx = jsx ?? true;
|
|
@@ -2998,6 +3108,14 @@ function style(options = {}, ...userConfigs) {
|
|
|
2998
3108
|
if (stylisticOptions) {
|
|
2999
3109
|
configs.push(stylistic(stylisticOptions));
|
|
3000
3110
|
}
|
|
3111
|
+
if (options.test ?? false) {
|
|
3112
|
+
configs.push(
|
|
3113
|
+
test({
|
|
3114
|
+
isInEditor,
|
|
3115
|
+
overrides: getOverrides(options, "test")
|
|
3116
|
+
})
|
|
3117
|
+
);
|
|
3118
|
+
}
|
|
3001
3119
|
if (enableReact) {
|
|
3002
3120
|
configs.push(
|
|
3003
3121
|
react({
|
|
@@ -3108,6 +3226,7 @@ init_cjs_shims();
|
|
|
3108
3226
|
GLOB_SRC,
|
|
3109
3227
|
GLOB_SRC_EXT,
|
|
3110
3228
|
GLOB_STYLE,
|
|
3229
|
+
GLOB_TESTS,
|
|
3111
3230
|
GLOB_TOML,
|
|
3112
3231
|
GLOB_TS,
|
|
3113
3232
|
GLOB_TSX,
|
|
@@ -3123,6 +3242,8 @@ init_cjs_shims();
|
|
|
3123
3242
|
ignores,
|
|
3124
3243
|
imports,
|
|
3125
3244
|
interopDefault,
|
|
3245
|
+
isInEditorEnvironment,
|
|
3246
|
+
isInGitHooksOrLintStaged,
|
|
3126
3247
|
jsdoc,
|
|
3127
3248
|
jsonc,
|
|
3128
3249
|
markdown,
|