@jsse/eslint-config 0.0.6 → 0.0.8
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/README.md +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +46 -61
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +45 -61
- package/package.json +16 -10
package/README.md
CHANGED
|
@@ -102,7 +102,7 @@ don't care anymore...
|
|
|
102
102
|
|
|
103
103
|
## License
|
|
104
104
|
|
|
105
|
-
[MIT](./LICENSE) License ©
|
|
105
|
+
[MIT](./LICENSE) License © 2023-PRESENT [jesse rubin](https://github.com/jessekrubin)
|
|
106
106
|
|
|
107
107
|
[package-url]: https://www.npmjs.com/package/@jsse/eslint-config
|
|
108
108
|
[npm-version-svg]: https://badge.fury.io/js/@jsse%2Feslint-config.svg
|
package/dist/cli.cjs
CHANGED
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2368,6 +2368,7 @@ __export(src_exports, {
|
|
|
2368
2368
|
node: () => node,
|
|
2369
2369
|
parserJsonc: () => import_jsonc_eslint_parser.default,
|
|
2370
2370
|
parserTs: () => parserTs,
|
|
2371
|
+
pluginAntfu: () => import_eslint_plugin_antfu.default,
|
|
2371
2372
|
pluginEslintComments: () => import_eslint_plugin_eslint_comments.default,
|
|
2372
2373
|
pluginImport: () => pluginImport,
|
|
2373
2374
|
pluginJsdoc: () => import_eslint_plugin_jsdoc.default,
|
|
@@ -2418,6 +2419,7 @@ var import_eslint_plugin_tailwindcss = __toESM(require("eslint-plugin-tailwindcs
|
|
|
2418
2419
|
var import_eslint_plugin_vitest = __toESM(require("eslint-plugin-vitest"), 1);
|
|
2419
2420
|
var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
|
|
2420
2421
|
var import_eslint_plugin_markdown = __toESM(require("eslint-plugin-markdown"), 1);
|
|
2422
|
+
var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
|
|
2421
2423
|
|
|
2422
2424
|
// src/configs/comments.ts
|
|
2423
2425
|
function comments() {
|
|
@@ -2498,6 +2500,7 @@ var GLOB_EXCLUDE = [
|
|
|
2498
2500
|
"**/__snapshots__",
|
|
2499
2501
|
"**/auto-import?(s).d.ts",
|
|
2500
2502
|
"**/components.d.ts",
|
|
2503
|
+
"**/*.bak",
|
|
2501
2504
|
"**/scratch",
|
|
2502
2505
|
"**/tmp",
|
|
2503
2506
|
"**/temp"
|
|
@@ -2726,7 +2729,6 @@ function javascript(options = {}) {
|
|
|
2726
2729
|
"no-useless-rename": "error",
|
|
2727
2730
|
"no-useless-return": "error",
|
|
2728
2731
|
"no-var": "error",
|
|
2729
|
-
"no-void": "error",
|
|
2730
2732
|
"no-with": "error",
|
|
2731
2733
|
"object-shorthand": [
|
|
2732
2734
|
"error",
|
|
@@ -3057,42 +3059,26 @@ function prettier() {
|
|
|
3057
3059
|
|
|
3058
3060
|
// src/configs/ts/typescript-language-options.ts
|
|
3059
3061
|
var import_node_process = __toESM(require("process"), 1);
|
|
3060
|
-
function parserOptionProject(tsconfigPath) {
|
|
3061
|
-
if (typeof tsconfigPath === "string") {
|
|
3062
|
-
return [tsconfigPath];
|
|
3063
|
-
}
|
|
3064
|
-
return tsconfigPath;
|
|
3065
|
-
}
|
|
3066
3062
|
function typescriptLanguageOptions(options) {
|
|
3067
|
-
const {
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
project: parserOptionProject(tsconfigPath),
|
|
3078
|
-
tsconfigRootDir: import_node_process.default.cwd()
|
|
3079
|
-
} : {},
|
|
3080
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3081
|
-
...parserOptions
|
|
3082
|
-
}
|
|
3083
|
-
};
|
|
3084
|
-
}
|
|
3063
|
+
const {
|
|
3064
|
+
parserOptions = {},
|
|
3065
|
+
tsconfig,
|
|
3066
|
+
react: react2,
|
|
3067
|
+
componentExts = []
|
|
3068
|
+
} = options || {};
|
|
3069
|
+
const tsOptions = tsconfig ? {
|
|
3070
|
+
project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
|
|
3071
|
+
tsconfigRootDir: import_node_process.default.cwd()
|
|
3072
|
+
} : {};
|
|
3085
3073
|
return {
|
|
3086
3074
|
parser: parserTs,
|
|
3087
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3088
3075
|
parserOptions: {
|
|
3076
|
+
ecmaFeatures: react2 ? { jsx: true, modules: true } : void 0,
|
|
3077
|
+
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
3089
3078
|
sourceType: "module",
|
|
3090
|
-
...
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
} : {},
|
|
3094
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3095
|
-
...parserOptions
|
|
3079
|
+
...tsOptions,
|
|
3080
|
+
...parserOptions,
|
|
3081
|
+
jsxPragma: react2 ? "React" : void 0
|
|
3096
3082
|
}
|
|
3097
3083
|
};
|
|
3098
3084
|
}
|
|
@@ -3331,17 +3317,19 @@ function reactRecomendedRules() {
|
|
|
3331
3317
|
function react(options) {
|
|
3332
3318
|
const {
|
|
3333
3319
|
parserOptions = {},
|
|
3334
|
-
|
|
3320
|
+
tsconfig,
|
|
3335
3321
|
react: react2,
|
|
3336
|
-
reactRefresh
|
|
3322
|
+
reactRefresh,
|
|
3323
|
+
componentExts
|
|
3337
3324
|
} = options ?? {};
|
|
3338
3325
|
const config = [
|
|
3339
3326
|
{
|
|
3340
3327
|
files: [GLOB_SRC],
|
|
3341
3328
|
languageOptions: typescriptLanguageOptions({
|
|
3329
|
+
componentExts,
|
|
3342
3330
|
parserOptions,
|
|
3343
3331
|
react: react2,
|
|
3344
|
-
|
|
3332
|
+
tsconfig
|
|
3345
3333
|
}),
|
|
3346
3334
|
name: "jsse:react:setup",
|
|
3347
3335
|
plugins: {
|
|
@@ -3618,31 +3606,23 @@ function test(options = {}) {
|
|
|
3618
3606
|
{
|
|
3619
3607
|
name: "jsse:test:setup",
|
|
3620
3608
|
plugins: {
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3624
|
-
rules: {
|
|
3625
|
-
...import_eslint_plugin_vitest.default.rules,
|
|
3626
|
-
// extend `test/no-only-tests` rule
|
|
3627
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
3628
|
-
...import_eslint_plugin_no_only_tests.default.rules
|
|
3629
|
-
}
|
|
3630
|
-
}
|
|
3609
|
+
"no-only-tests": import_eslint_plugin_no_only_tests.default,
|
|
3610
|
+
vitest: import_eslint_plugin_vitest.default
|
|
3631
3611
|
}
|
|
3632
3612
|
},
|
|
3633
3613
|
{
|
|
3634
3614
|
files: GLOB_TESTS,
|
|
3635
3615
|
name: "jsse:test:rules",
|
|
3636
3616
|
rules: {
|
|
3637
|
-
"
|
|
3617
|
+
"no-only-tests/no-only-tests": isInEditor2 ? "off" : isCI() ? "error" : "warn",
|
|
3618
|
+
"unicorn/no-null": "off",
|
|
3619
|
+
"vitest/consistent-test-it": [
|
|
3638
3620
|
"error",
|
|
3639
|
-
{ fn: "
|
|
3621
|
+
{ fn: "test", withinDescribe: "test" }
|
|
3640
3622
|
],
|
|
3641
|
-
"
|
|
3642
|
-
"
|
|
3643
|
-
"
|
|
3644
|
-
"test/prefer-lowercase-title": "error",
|
|
3645
|
-
"unicorn/no-null": "off",
|
|
3623
|
+
"vitest/no-identical-title": "error",
|
|
3624
|
+
"vitest/prefer-hooks-in-order": "error",
|
|
3625
|
+
"vitest/prefer-lowercase-title": "error",
|
|
3646
3626
|
...overrides
|
|
3647
3627
|
}
|
|
3648
3628
|
}
|
|
@@ -4066,10 +4046,9 @@ function typescriptRulesTypeOblivious() {
|
|
|
4066
4046
|
"no-duplicate-imports": "off"
|
|
4067
4047
|
};
|
|
4068
4048
|
}
|
|
4069
|
-
function typescriptRules({
|
|
4070
|
-
typeAware
|
|
4071
|
-
|
|
4072
|
-
if (typeAware) {
|
|
4049
|
+
function typescriptRules(props) {
|
|
4050
|
+
const { typeAware } = props ?? {};
|
|
4051
|
+
if (typeAware === true) {
|
|
4073
4052
|
return {
|
|
4074
4053
|
...typescriptRulesTypeOblivious(),
|
|
4075
4054
|
...typescriptRulesTypeAware()
|
|
@@ -4084,13 +4063,13 @@ function typescript(options) {
|
|
|
4084
4063
|
componentExts = [],
|
|
4085
4064
|
overrides = {},
|
|
4086
4065
|
parserOptions = {},
|
|
4087
|
-
tsconfigPath,
|
|
4066
|
+
tsconfig: tsconfigPath,
|
|
4088
4067
|
typeAware,
|
|
4089
4068
|
react: react2,
|
|
4090
4069
|
prefix
|
|
4091
4070
|
} = options ?? {};
|
|
4092
4071
|
const tsPrefix = prefix?.from ?? "@typescript-eslint";
|
|
4093
|
-
const tsPrefixTo = prefix?.to ?? "
|
|
4072
|
+
const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
|
|
4094
4073
|
const tsrules = {
|
|
4095
4074
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
4096
4075
|
...import_eslint_plugin2.default.configs["eslint-recommended"].overrides[0].rules,
|
|
@@ -4119,7 +4098,7 @@ function typescript(options) {
|
|
|
4119
4098
|
languageOptions: typescriptLanguageOptions({
|
|
4120
4099
|
parserOptions,
|
|
4121
4100
|
react: react2,
|
|
4122
|
-
tsconfigPath
|
|
4101
|
+
tsconfig: tsconfigPath
|
|
4123
4102
|
})
|
|
4124
4103
|
},
|
|
4125
4104
|
{
|
|
@@ -11300,12 +11279,17 @@ function jsse(options = {}, ...userConfigs) {
|
|
|
11300
11279
|
function jssestd() {
|
|
11301
11280
|
return jsse({
|
|
11302
11281
|
typescript: {
|
|
11303
|
-
|
|
11282
|
+
tsconfig: ["./tsconfig.json", "./tsconfig.eslint.json"]
|
|
11304
11283
|
}
|
|
11305
11284
|
});
|
|
11306
11285
|
}
|
|
11307
11286
|
function jsseReact() {
|
|
11308
|
-
return jsse({
|
|
11287
|
+
return jsse({
|
|
11288
|
+
react: true,
|
|
11289
|
+
typescript: {
|
|
11290
|
+
tsconfig: ["./tsconfig.json", "./tsconfig.eslint.json"]
|
|
11291
|
+
}
|
|
11292
|
+
});
|
|
11309
11293
|
}
|
|
11310
11294
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11311
11295
|
0 && (module.exports = {
|
|
@@ -11345,6 +11329,7 @@ function jsseReact() {
|
|
|
11345
11329
|
node,
|
|
11346
11330
|
parserJsonc,
|
|
11347
11331
|
parserTs,
|
|
11332
|
+
pluginAntfu,
|
|
11348
11333
|
pluginEslintComments,
|
|
11349
11334
|
pluginImport,
|
|
11350
11335
|
pluginJsdoc,
|
package/dist/index.d.cts
CHANGED
|
@@ -25,6 +25,7 @@ export { default as pluginTailwind } from 'eslint-plugin-tailwindcss';
|
|
|
25
25
|
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
26
26
|
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
27
27
|
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
28
|
+
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
28
29
|
|
|
29
30
|
type Rules = MergeIntersection<RenamePrefix<TypeScriptRules, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
|
|
30
31
|
"test/no-only-tests": RuleConfig;
|
|
@@ -70,7 +71,7 @@ type OptionsTypeScriptWithTypes = {
|
|
|
70
71
|
* When this options is provided, type aware rules will be enabled.
|
|
71
72
|
* @see https://typescript-eslint.io/linting/typed-linting/
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
tsconfig?: string | string[];
|
|
74
75
|
typeAware?: boolean;
|
|
75
76
|
};
|
|
76
77
|
type OptionsHasTypeScript = {
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export { default as pluginTailwind } from 'eslint-plugin-tailwindcss';
|
|
|
25
25
|
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
26
26
|
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
27
27
|
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
28
|
+
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
28
29
|
|
|
29
30
|
type Rules = MergeIntersection<RenamePrefix<TypeScriptRules, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & ImportRules & EslintRules & JsoncRules & VueRules & UnicornRules & EslintCommentsRules & {
|
|
30
31
|
"test/no-only-tests": RuleConfig;
|
|
@@ -70,7 +71,7 @@ type OptionsTypeScriptWithTypes = {
|
|
|
70
71
|
* When this options is provided, type aware rules will be enabled.
|
|
71
72
|
* @see https://typescript-eslint.io/linting/typed-linting/
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
tsconfig?: string | string[];
|
|
74
75
|
typeAware?: boolean;
|
|
75
76
|
};
|
|
76
77
|
type OptionsHasTypeScript = {
|
package/dist/index.js
CHANGED
|
@@ -2342,6 +2342,7 @@ import { default as default12 } from "eslint-plugin-tailwindcss";
|
|
|
2342
2342
|
import { default as default13 } from "eslint-plugin-vitest";
|
|
2343
2343
|
import { default as default14 } from "jsonc-eslint-parser";
|
|
2344
2344
|
import { default as default15 } from "eslint-plugin-markdown";
|
|
2345
|
+
import { default as default16 } from "eslint-plugin-antfu";
|
|
2345
2346
|
|
|
2346
2347
|
// src/configs/comments.ts
|
|
2347
2348
|
function comments() {
|
|
@@ -2422,6 +2423,7 @@ var GLOB_EXCLUDE = [
|
|
|
2422
2423
|
"**/__snapshots__",
|
|
2423
2424
|
"**/auto-import?(s).d.ts",
|
|
2424
2425
|
"**/components.d.ts",
|
|
2426
|
+
"**/*.bak",
|
|
2425
2427
|
"**/scratch",
|
|
2426
2428
|
"**/tmp",
|
|
2427
2429
|
"**/temp"
|
|
@@ -2650,7 +2652,6 @@ function javascript(options = {}) {
|
|
|
2650
2652
|
"no-useless-rename": "error",
|
|
2651
2653
|
"no-useless-return": "error",
|
|
2652
2654
|
"no-var": "error",
|
|
2653
|
-
"no-void": "error",
|
|
2654
2655
|
"no-with": "error",
|
|
2655
2656
|
"object-shorthand": [
|
|
2656
2657
|
"error",
|
|
@@ -2981,42 +2982,26 @@ function prettier() {
|
|
|
2981
2982
|
|
|
2982
2983
|
// src/configs/ts/typescript-language-options.ts
|
|
2983
2984
|
import process2 from "process";
|
|
2984
|
-
function parserOptionProject(tsconfigPath) {
|
|
2985
|
-
if (typeof tsconfigPath === "string") {
|
|
2986
|
-
return [tsconfigPath];
|
|
2987
|
-
}
|
|
2988
|
-
return tsconfigPath;
|
|
2989
|
-
}
|
|
2990
2985
|
function typescriptLanguageOptions(options) {
|
|
2991
|
-
const {
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
project: parserOptionProject(tsconfigPath),
|
|
3002
|
-
tsconfigRootDir: process2.cwd()
|
|
3003
|
-
} : {},
|
|
3004
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3005
|
-
...parserOptions
|
|
3006
|
-
}
|
|
3007
|
-
};
|
|
3008
|
-
}
|
|
2986
|
+
const {
|
|
2987
|
+
parserOptions = {},
|
|
2988
|
+
tsconfig,
|
|
2989
|
+
react: react2,
|
|
2990
|
+
componentExts = []
|
|
2991
|
+
} = options || {};
|
|
2992
|
+
const tsOptions = tsconfig ? {
|
|
2993
|
+
project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
|
|
2994
|
+
tsconfigRootDir: process2.cwd()
|
|
2995
|
+
} : {};
|
|
3009
2996
|
return {
|
|
3010
2997
|
parser: parserTs,
|
|
3011
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3012
2998
|
parserOptions: {
|
|
2999
|
+
ecmaFeatures: react2 ? { jsx: true, modules: true } : void 0,
|
|
3000
|
+
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
3013
3001
|
sourceType: "module",
|
|
3014
|
-
...
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
} : {},
|
|
3018
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3019
|
-
...parserOptions
|
|
3002
|
+
...tsOptions,
|
|
3003
|
+
...parserOptions,
|
|
3004
|
+
jsxPragma: react2 ? "React" : void 0
|
|
3020
3005
|
}
|
|
3021
3006
|
};
|
|
3022
3007
|
}
|
|
@@ -3255,17 +3240,19 @@ function reactRecomendedRules() {
|
|
|
3255
3240
|
function react(options) {
|
|
3256
3241
|
const {
|
|
3257
3242
|
parserOptions = {},
|
|
3258
|
-
|
|
3243
|
+
tsconfig,
|
|
3259
3244
|
react: react2,
|
|
3260
|
-
reactRefresh
|
|
3245
|
+
reactRefresh,
|
|
3246
|
+
componentExts
|
|
3261
3247
|
} = options ?? {};
|
|
3262
3248
|
const config = [
|
|
3263
3249
|
{
|
|
3264
3250
|
files: [GLOB_SRC],
|
|
3265
3251
|
languageOptions: typescriptLanguageOptions({
|
|
3252
|
+
componentExts,
|
|
3266
3253
|
parserOptions,
|
|
3267
3254
|
react: react2,
|
|
3268
|
-
|
|
3255
|
+
tsconfig
|
|
3269
3256
|
}),
|
|
3270
3257
|
name: "jsse:react:setup",
|
|
3271
3258
|
plugins: {
|
|
@@ -3542,31 +3529,23 @@ function test(options = {}) {
|
|
|
3542
3529
|
{
|
|
3543
3530
|
name: "jsse:test:setup",
|
|
3544
3531
|
plugins: {
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3548
|
-
rules: {
|
|
3549
|
-
...default13.rules,
|
|
3550
|
-
// extend `test/no-only-tests` rule
|
|
3551
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
3552
|
-
...default7.rules
|
|
3553
|
-
}
|
|
3554
|
-
}
|
|
3532
|
+
"no-only-tests": default7,
|
|
3533
|
+
vitest: default13
|
|
3555
3534
|
}
|
|
3556
3535
|
},
|
|
3557
3536
|
{
|
|
3558
3537
|
files: GLOB_TESTS,
|
|
3559
3538
|
name: "jsse:test:rules",
|
|
3560
3539
|
rules: {
|
|
3561
|
-
"
|
|
3540
|
+
"no-only-tests/no-only-tests": isInEditor2 ? "off" : isCI() ? "error" : "warn",
|
|
3541
|
+
"unicorn/no-null": "off",
|
|
3542
|
+
"vitest/consistent-test-it": [
|
|
3562
3543
|
"error",
|
|
3563
|
-
{ fn: "
|
|
3544
|
+
{ fn: "test", withinDescribe: "test" }
|
|
3564
3545
|
],
|
|
3565
|
-
"
|
|
3566
|
-
"
|
|
3567
|
-
"
|
|
3568
|
-
"test/prefer-lowercase-title": "error",
|
|
3569
|
-
"unicorn/no-null": "off",
|
|
3546
|
+
"vitest/no-identical-title": "error",
|
|
3547
|
+
"vitest/prefer-hooks-in-order": "error",
|
|
3548
|
+
"vitest/prefer-lowercase-title": "error",
|
|
3570
3549
|
...overrides
|
|
3571
3550
|
}
|
|
3572
3551
|
}
|
|
@@ -3990,10 +3969,9 @@ function typescriptRulesTypeOblivious() {
|
|
|
3990
3969
|
"no-duplicate-imports": "off"
|
|
3991
3970
|
};
|
|
3992
3971
|
}
|
|
3993
|
-
function typescriptRules({
|
|
3994
|
-
typeAware
|
|
3995
|
-
|
|
3996
|
-
if (typeAware) {
|
|
3972
|
+
function typescriptRules(props) {
|
|
3973
|
+
const { typeAware } = props ?? {};
|
|
3974
|
+
if (typeAware === true) {
|
|
3997
3975
|
return {
|
|
3998
3976
|
...typescriptRulesTypeOblivious(),
|
|
3999
3977
|
...typescriptRulesTypeAware()
|
|
@@ -4008,13 +3986,13 @@ function typescript(options) {
|
|
|
4008
3986
|
componentExts = [],
|
|
4009
3987
|
overrides = {},
|
|
4010
3988
|
parserOptions = {},
|
|
4011
|
-
tsconfigPath,
|
|
3989
|
+
tsconfig: tsconfigPath,
|
|
4012
3990
|
typeAware,
|
|
4013
3991
|
react: react2,
|
|
4014
3992
|
prefix
|
|
4015
3993
|
} = options ?? {};
|
|
4016
3994
|
const tsPrefix = prefix?.from ?? "@typescript-eslint";
|
|
4017
|
-
const tsPrefixTo = prefix?.to ?? "
|
|
3995
|
+
const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
|
|
4018
3996
|
const tsrules = {
|
|
4019
3997
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
4020
3998
|
...default3.configs["eslint-recommended"].overrides[0].rules,
|
|
@@ -4043,7 +4021,7 @@ function typescript(options) {
|
|
|
4043
4021
|
languageOptions: typescriptLanguageOptions({
|
|
4044
4022
|
parserOptions,
|
|
4045
4023
|
react: react2,
|
|
4046
|
-
tsconfigPath
|
|
4024
|
+
tsconfig: tsconfigPath
|
|
4047
4025
|
})
|
|
4048
4026
|
},
|
|
4049
4027
|
{
|
|
@@ -11221,12 +11199,17 @@ function jsse(options = {}, ...userConfigs) {
|
|
|
11221
11199
|
function jssestd() {
|
|
11222
11200
|
return jsse({
|
|
11223
11201
|
typescript: {
|
|
11224
|
-
|
|
11202
|
+
tsconfig: ["./tsconfig.json", "./tsconfig.eslint.json"]
|
|
11225
11203
|
}
|
|
11226
11204
|
});
|
|
11227
11205
|
}
|
|
11228
11206
|
function jsseReact() {
|
|
11229
|
-
return jsse({
|
|
11207
|
+
return jsse({
|
|
11208
|
+
react: true,
|
|
11209
|
+
typescript: {
|
|
11210
|
+
tsconfig: ["./tsconfig.json", "./tsconfig.eslint.json"]
|
|
11211
|
+
}
|
|
11212
|
+
});
|
|
11230
11213
|
}
|
|
11231
11214
|
export {
|
|
11232
11215
|
GLOB_ALL_SRC,
|
|
@@ -11266,6 +11249,7 @@ export {
|
|
|
11266
11249
|
node,
|
|
11267
11250
|
default14 as parserJsonc,
|
|
11268
11251
|
parserTs,
|
|
11252
|
+
default16 as pluginAntfu,
|
|
11269
11253
|
default4 as pluginEslintComments,
|
|
11270
11254
|
pluginImport,
|
|
11271
11255
|
default5 as pluginJsdoc,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsse/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.8",
|
|
5
5
|
"packageManager": "pnpm@8.8.0",
|
|
6
6
|
"description": "jsse eslint config",
|
|
7
7
|
"author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
|
|
@@ -28,12 +28,17 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"eslint": ">=8.0.0"
|
|
30
30
|
},
|
|
31
|
+
"peerDependenciesMeta": {
|
|
32
|
+
"eslint": {
|
|
33
|
+
"optional": false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
31
36
|
"dependencies": {
|
|
32
|
-
"@antfu/eslint-define-config": "
|
|
37
|
+
"@antfu/eslint-define-config": "1.23.0-2",
|
|
33
38
|
"@eslint/js": "~8.52.0",
|
|
34
|
-
"@stylistic/eslint-plugin": "0.
|
|
35
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
36
|
-
"@typescript-eslint/parser": "^6.
|
|
39
|
+
"@stylistic/eslint-plugin": "0.1.1",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
|
41
|
+
"@typescript-eslint/parser": "^6.9.0",
|
|
37
42
|
"eslint-config-flat-gitignore": "^0.1.1",
|
|
38
43
|
"eslint-define-config": "^1.24.1",
|
|
39
44
|
"eslint-plugin-antfu": "1.0.0-beta.12",
|
|
@@ -50,23 +55,23 @@
|
|
|
50
55
|
"eslint-plugin-tailwindcss": "^3.13.0",
|
|
51
56
|
"eslint-plugin-unicorn": "^48.0.1",
|
|
52
57
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
53
|
-
"eslint-plugin-vitest": "^0.3.
|
|
58
|
+
"eslint-plugin-vitest": "^0.3.8",
|
|
54
59
|
"eslint-plugin-yml": "^1.10.0",
|
|
55
|
-
"jsonc-eslint-parser": "^2.
|
|
60
|
+
"jsonc-eslint-parser": "^2.4.0",
|
|
56
61
|
"yaml-eslint-parser": "^1.2.2"
|
|
57
62
|
},
|
|
58
63
|
"optionalDependencies": {
|
|
59
|
-
"tailwindcss": "^3.3.
|
|
64
|
+
"tailwindcss": "^3.3.4"
|
|
60
65
|
},
|
|
61
66
|
"devDependencies": {
|
|
62
67
|
"@antfu/ni": "^0.21.8",
|
|
63
68
|
"@types/eslint": "^8.44.6",
|
|
64
69
|
"@types/eslint__js": "~8.42.2",
|
|
65
70
|
"@types/fs-extra": "^11.0.3",
|
|
66
|
-
"@types/node": "^20.8.
|
|
71
|
+
"@types/node": "^20.8.8",
|
|
67
72
|
"bumpp": "^9.2.0",
|
|
68
73
|
"cac": "^6.7.14",
|
|
69
|
-
"eslint": "^8.
|
|
74
|
+
"eslint": "^8.52.0",
|
|
70
75
|
"eslint-flat-config-viewer": "^0.1.0",
|
|
71
76
|
"eslint-plugin-sort-keys": "^2.3.5",
|
|
72
77
|
"execa": "~8.0.1",
|
|
@@ -75,6 +80,7 @@
|
|
|
75
80
|
"globals": "^13.23.0",
|
|
76
81
|
"local-pkg": "^0.5.0",
|
|
77
82
|
"microdiff": "~1.3.2",
|
|
83
|
+
"prettier": "^3.0.3",
|
|
78
84
|
"react": "~18.2.0",
|
|
79
85
|
"rimraf": "^5.0.5",
|
|
80
86
|
"tsup": "^7.2.0",
|