@ofk/eslint-config 0.2.7 → 0.3.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/index.d.mts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +15 -14
- package/dist/index.mjs +24 -23
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ConfigWithExtends } from '
|
|
1
|
+
import * as eslint_config from 'eslint/config';
|
|
2
|
+
import { ConfigWithExtends } from '@eslint/config-helpers';
|
|
3
3
|
import { Linter } from 'eslint';
|
|
4
4
|
|
|
5
5
|
declare function imports({ defaultExportFiles, node, typescript, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
|
|
6
6
|
defaultExportFiles?: false | string[];
|
|
7
7
|
node?: boolean;
|
|
8
8
|
typescript?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): eslint_config.Config[];
|
|
10
10
|
|
|
11
11
|
declare function jsGlobals({ browser, es2021, es2022, es2023, es2024, es2025, node, }: {
|
|
12
12
|
browser?: boolean;
|
|
@@ -16,20 +16,20 @@ declare function jsGlobals({ browser, es2021, es2022, es2023, es2024, es2025, no
|
|
|
16
16
|
es2024?: boolean;
|
|
17
17
|
es2025?: boolean;
|
|
18
18
|
node?: boolean;
|
|
19
|
-
}):
|
|
19
|
+
}): eslint_config.Config[];
|
|
20
20
|
declare function js({ globals, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
|
|
21
21
|
globals?: false | Parameters<typeof jsGlobals>[0];
|
|
22
|
-
}):
|
|
22
|
+
}): eslint_config.Config[];
|
|
23
23
|
|
|
24
|
-
declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>):
|
|
24
|
+
declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): eslint_config.Config[];
|
|
25
25
|
|
|
26
26
|
declare function ts({ disableTypeChecked, parserOptions, strict, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
|
|
27
27
|
disableTypeChecked?: boolean;
|
|
28
28
|
parserOptions?: false | Linter.ParserOptions;
|
|
29
29
|
strict?: boolean;
|
|
30
|
-
}):
|
|
30
|
+
}): eslint_config.Config[];
|
|
31
31
|
|
|
32
|
-
declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>):
|
|
32
|
+
declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): eslint_config.Config[];
|
|
33
33
|
|
|
34
34
|
declare function defineBaseConfig({ eslintComments: eslintCommentsOptions, ignores, imports: importsOptions, js: jsOptions, perfectionist: perfectionistOptions, settings, ts: tsOptions, unicorn: unicornOptions, unusedImports: unusedImportsOptions, vitest: vitestOptions, ...config }?: Pick<ConfigWithExtends, 'extends' | 'ignores' | 'rules' | 'settings'> & {
|
|
35
35
|
eslintComments?: false | {};
|
|
@@ -40,17 +40,17 @@ declare function defineBaseConfig({ eslintComments: eslintCommentsOptions, ignor
|
|
|
40
40
|
unicorn?: false | {};
|
|
41
41
|
unusedImports?: false | {};
|
|
42
42
|
vitest?: false | Parameters<typeof vitest>[0];
|
|
43
|
-
}):
|
|
43
|
+
}): eslint_config.Config[];
|
|
44
44
|
|
|
45
45
|
declare function defineReactConfig({ jsxA11y: enabledJsxA11y, jsxRuntime: enabledJsxRuntime, reactHooks: enabledReactHooks, reactRefresh: enabledReactRefresh, ...reactOptions }?: Parameters<typeof react>[0] & {
|
|
46
46
|
jsxA11y?: boolean;
|
|
47
47
|
jsxRuntime?: boolean;
|
|
48
48
|
reactHooks?: boolean;
|
|
49
49
|
reactRefresh?: boolean;
|
|
50
|
-
}):
|
|
50
|
+
}): eslint_config.Config[];
|
|
51
51
|
|
|
52
52
|
declare function defineConfig({ eslintComments: eslintCommentsOptions, imports: importsOptions, js: jsOptions, perfectionist: perfectionistOptions, react: reactOptions, ts: tsOptions, unusedImports: unusedImportsOptions, vitest: vitestOptions, ...config }?: Parameters<typeof defineBaseConfig>[0] & {
|
|
53
53
|
react?: false | Parameters<typeof defineReactConfig>[0];
|
|
54
|
-
}):
|
|
54
|
+
}): eslint_config.Config[];
|
|
55
55
|
|
|
56
56
|
export { defineConfig as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ConfigWithExtends } from '
|
|
1
|
+
import * as eslint_config from 'eslint/config';
|
|
2
|
+
import { ConfigWithExtends } from '@eslint/config-helpers';
|
|
3
3
|
import { Linter } from 'eslint';
|
|
4
4
|
|
|
5
5
|
declare function imports({ defaultExportFiles, node, typescript, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
|
|
6
6
|
defaultExportFiles?: false | string[];
|
|
7
7
|
node?: boolean;
|
|
8
8
|
typescript?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): eslint_config.Config[];
|
|
10
10
|
|
|
11
11
|
declare function jsGlobals({ browser, es2021, es2022, es2023, es2024, es2025, node, }: {
|
|
12
12
|
browser?: boolean;
|
|
@@ -16,20 +16,20 @@ declare function jsGlobals({ browser, es2021, es2022, es2023, es2024, es2025, no
|
|
|
16
16
|
es2024?: boolean;
|
|
17
17
|
es2025?: boolean;
|
|
18
18
|
node?: boolean;
|
|
19
|
-
}):
|
|
19
|
+
}): eslint_config.Config[];
|
|
20
20
|
declare function js({ globals, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
|
|
21
21
|
globals?: false | Parameters<typeof jsGlobals>[0];
|
|
22
|
-
}):
|
|
22
|
+
}): eslint_config.Config[];
|
|
23
23
|
|
|
24
|
-
declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>):
|
|
24
|
+
declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): eslint_config.Config[];
|
|
25
25
|
|
|
26
26
|
declare function ts({ disableTypeChecked, parserOptions, strict, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
|
|
27
27
|
disableTypeChecked?: boolean;
|
|
28
28
|
parserOptions?: false | Linter.ParserOptions;
|
|
29
29
|
strict?: boolean;
|
|
30
|
-
}):
|
|
30
|
+
}): eslint_config.Config[];
|
|
31
31
|
|
|
32
|
-
declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>):
|
|
32
|
+
declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): eslint_config.Config[];
|
|
33
33
|
|
|
34
34
|
declare function defineBaseConfig({ eslintComments: eslintCommentsOptions, ignores, imports: importsOptions, js: jsOptions, perfectionist: perfectionistOptions, settings, ts: tsOptions, unicorn: unicornOptions, unusedImports: unusedImportsOptions, vitest: vitestOptions, ...config }?: Pick<ConfigWithExtends, 'extends' | 'ignores' | 'rules' | 'settings'> & {
|
|
35
35
|
eslintComments?: false | {};
|
|
@@ -40,17 +40,17 @@ declare function defineBaseConfig({ eslintComments: eslintCommentsOptions, ignor
|
|
|
40
40
|
unicorn?: false | {};
|
|
41
41
|
unusedImports?: false | {};
|
|
42
42
|
vitest?: false | Parameters<typeof vitest>[0];
|
|
43
|
-
}):
|
|
43
|
+
}): eslint_config.Config[];
|
|
44
44
|
|
|
45
45
|
declare function defineReactConfig({ jsxA11y: enabledJsxA11y, jsxRuntime: enabledJsxRuntime, reactHooks: enabledReactHooks, reactRefresh: enabledReactRefresh, ...reactOptions }?: Parameters<typeof react>[0] & {
|
|
46
46
|
jsxA11y?: boolean;
|
|
47
47
|
jsxRuntime?: boolean;
|
|
48
48
|
reactHooks?: boolean;
|
|
49
49
|
reactRefresh?: boolean;
|
|
50
|
-
}):
|
|
50
|
+
}): eslint_config.Config[];
|
|
51
51
|
|
|
52
52
|
declare function defineConfig({ eslintComments: eslintCommentsOptions, imports: importsOptions, js: jsOptions, perfectionist: perfectionistOptions, react: reactOptions, ts: tsOptions, unusedImports: unusedImportsOptions, vitest: vitestOptions, ...config }?: Parameters<typeof defineBaseConfig>[0] & {
|
|
53
53
|
react?: false | Parameters<typeof defineReactConfig>[0];
|
|
54
|
-
}):
|
|
54
|
+
}): eslint_config.Config[];
|
|
55
55
|
|
|
56
56
|
export = defineConfig;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/base.ts
|
|
2
|
-
var
|
|
2
|
+
var _config = require('eslint/config');
|
|
3
3
|
|
|
4
4
|
// src/configs/eslint-comments.ts
|
|
5
5
|
var _configs = require('@eslint-community/eslint-plugin-eslint-comments/configs'); var _configs2 = _interopRequireDefault(_configs);
|
|
@@ -142,7 +142,7 @@ function imports({
|
|
|
142
142
|
typescript = false,
|
|
143
143
|
...config
|
|
144
144
|
}) {
|
|
145
|
-
return
|
|
145
|
+
return _config.defineConfig.call(void 0,
|
|
146
146
|
importsStrict,
|
|
147
147
|
config,
|
|
148
148
|
// allow default export in config files
|
|
@@ -208,8 +208,8 @@ function imports({
|
|
|
208
208
|
// src/configs/js.ts
|
|
209
209
|
var _js = require('@eslint/js'); var _js2 = _interopRequireDefault(_js);
|
|
210
210
|
var _confusingbrowserglobals = require('confusing-browser-globals'); var _confusingbrowserglobals2 = _interopRequireDefault(_confusingbrowserglobals);
|
|
211
|
-
var _globals = require('globals'); var _globals2 = _interopRequireDefault(_globals);
|
|
212
211
|
|
|
212
|
+
var _globals = require('globals'); var _globals2 = _interopRequireDefault(_globals);
|
|
213
213
|
var jsStrict = mergeRules(
|
|
214
214
|
_js2.default.configs.recommended,
|
|
215
215
|
{
|
|
@@ -447,7 +447,7 @@ function jsGlobals({
|
|
|
447
447
|
es2025 = true,
|
|
448
448
|
node = true
|
|
449
449
|
}) {
|
|
450
|
-
return
|
|
450
|
+
return _config.defineConfig.call(void 0, {
|
|
451
451
|
languageOptions: {
|
|
452
452
|
globals: {
|
|
453
453
|
...es2021 ? _globals2.default.es2021 : {},
|
|
@@ -465,7 +465,7 @@ function js({
|
|
|
465
465
|
globals = {},
|
|
466
466
|
...config
|
|
467
467
|
}) {
|
|
468
|
-
return
|
|
468
|
+
return _config.defineConfig.call(void 0, globals ? jsGlobals(globals) : {}, jsStrict, config);
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
// src/configs/jsx-a11y.ts
|
|
@@ -691,7 +691,7 @@ var reactStrict = mergeRules(_nullishCoalesce(_eslintpluginreact2.default.config
|
|
|
691
691
|
"react/void-dom-elements-no-children": "error"
|
|
692
692
|
});
|
|
693
693
|
function react(config) {
|
|
694
|
-
return
|
|
694
|
+
return _config.defineConfig.call(void 0,
|
|
695
695
|
{
|
|
696
696
|
settings: {
|
|
697
697
|
react: {
|
|
@@ -717,6 +717,7 @@ var reactRefreshStrict = mergeRules(_eslintpluginreactrefresh2.default.configs.v
|
|
|
717
717
|
|
|
718
718
|
// src/configs/ts.ts
|
|
719
719
|
|
|
720
|
+
var _typescripteslint = require('typescript-eslint'); var _typescripteslint2 = _interopRequireDefault(_typescripteslint);
|
|
720
721
|
var jsStrictRules = _nullishCoalesce(jsStrict.rules, () => ( {}));
|
|
721
722
|
var tsEslintOverrideRules = mergeRules(
|
|
722
723
|
{},
|
|
@@ -796,12 +797,12 @@ var tsRecommendedOverride = mergeRules(
|
|
|
796
797
|
// confilict with @typescript-eslint/consistent-type-imports
|
|
797
798
|
}
|
|
798
799
|
);
|
|
799
|
-
var tsRecommended =
|
|
800
|
+
var tsRecommended = _config.defineConfig.call(void 0,
|
|
800
801
|
_typescripteslint2.default.configs.recommended,
|
|
801
802
|
tsEslintOverrideRules,
|
|
802
803
|
tsRecommendedOverride
|
|
803
804
|
);
|
|
804
|
-
var tsStrict =
|
|
805
|
+
var tsStrict = _config.defineConfig.call(void 0,
|
|
805
806
|
_typescripteslint2.default.configs.strictTypeChecked,
|
|
806
807
|
_typescripteslint2.default.configs.stylisticTypeChecked,
|
|
807
808
|
tsEslintOverrideRules,
|
|
@@ -860,7 +861,7 @@ function ts({
|
|
|
860
861
|
strict = true,
|
|
861
862
|
...config
|
|
862
863
|
}) {
|
|
863
|
-
return
|
|
864
|
+
return _config.defineConfig.call(void 0,
|
|
864
865
|
parserOptions ? {
|
|
865
866
|
languageOptions: {
|
|
866
867
|
parserOptions: {
|
|
@@ -974,7 +975,7 @@ var vitestStrict = mergeRules(
|
|
|
974
975
|
}
|
|
975
976
|
);
|
|
976
977
|
function vitest(config) {
|
|
977
|
-
return
|
|
978
|
+
return _config.defineConfig.call(void 0, {
|
|
978
979
|
extends: [vitestStrict, config],
|
|
979
980
|
files: ["tests/**", "*.test.*"]
|
|
980
981
|
});
|
|
@@ -1079,7 +1080,7 @@ function defineBaseConfig({
|
|
|
1079
1080
|
vitest: vitestOptions = {},
|
|
1080
1081
|
...config
|
|
1081
1082
|
} = {}) {
|
|
1082
|
-
return
|
|
1083
|
+
return _config.defineConfig.call(void 0,
|
|
1083
1084
|
settings ? { settings } : {},
|
|
1084
1085
|
ignores ? { ignores } : {},
|
|
1085
1086
|
jsOptions ? js(jsOptions) : {},
|
|
@@ -1104,7 +1105,7 @@ function defineReactConfig({
|
|
|
1104
1105
|
reactRefresh: enabledReactRefresh = true,
|
|
1105
1106
|
...reactOptions
|
|
1106
1107
|
} = {}) {
|
|
1107
|
-
return
|
|
1108
|
+
return _config.defineConfig.call(void 0,
|
|
1108
1109
|
react({
|
|
1109
1110
|
...reactOptions,
|
|
1110
1111
|
extends: [
|
|
@@ -1119,7 +1120,7 @@ function defineReactConfig({
|
|
|
1119
1120
|
}
|
|
1120
1121
|
|
|
1121
1122
|
// src/index.ts
|
|
1122
|
-
function
|
|
1123
|
+
function defineConfig8({
|
|
1123
1124
|
eslintComments: eslintCommentsOptions,
|
|
1124
1125
|
imports: importsOptions,
|
|
1125
1126
|
js: jsOptions,
|
|
@@ -1144,6 +1145,6 @@ function defineConfig({
|
|
|
1144
1145
|
}
|
|
1145
1146
|
|
|
1146
1147
|
|
|
1147
|
-
exports.default =
|
|
1148
|
+
exports.default = defineConfig8;
|
|
1148
1149
|
|
|
1149
1150
|
module.exports = exports.default;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/base.ts
|
|
2
|
-
import
|
|
2
|
+
import { defineConfig as defineConfig6 } from "eslint/config";
|
|
3
3
|
|
|
4
4
|
// src/configs/eslint-comments.ts
|
|
5
5
|
import pluginEslintComments from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
|
@@ -28,7 +28,7 @@ var eslintCommentsStrict = mergeRules(pluginEslintComments.recommended, {
|
|
|
28
28
|
|
|
29
29
|
// src/configs/imports.ts
|
|
30
30
|
import * as pluginImport from "eslint-plugin-import";
|
|
31
|
-
import
|
|
31
|
+
import { defineConfig } from "eslint/config";
|
|
32
32
|
var importsStrict = mergeRules(
|
|
33
33
|
pluginImport.flatConfigs.recommended,
|
|
34
34
|
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#helpful-warnings
|
|
@@ -142,7 +142,7 @@ function imports({
|
|
|
142
142
|
typescript = false,
|
|
143
143
|
...config
|
|
144
144
|
}) {
|
|
145
|
-
return
|
|
145
|
+
return defineConfig(
|
|
146
146
|
importsStrict,
|
|
147
147
|
config,
|
|
148
148
|
// allow default export in config files
|
|
@@ -208,8 +208,8 @@ function imports({
|
|
|
208
208
|
// src/configs/js.ts
|
|
209
209
|
import pluginJs from "@eslint/js";
|
|
210
210
|
import confusingBrowserGlobals from "confusing-browser-globals";
|
|
211
|
+
import { defineConfig as defineConfig2 } from "eslint/config";
|
|
211
212
|
import globalVariables from "globals";
|
|
212
|
-
import pluginTs2 from "typescript-eslint";
|
|
213
213
|
var jsStrict = mergeRules(
|
|
214
214
|
pluginJs.configs.recommended,
|
|
215
215
|
{
|
|
@@ -447,7 +447,7 @@ function jsGlobals({
|
|
|
447
447
|
es2025 = true,
|
|
448
448
|
node = true
|
|
449
449
|
}) {
|
|
450
|
-
return
|
|
450
|
+
return defineConfig2({
|
|
451
451
|
languageOptions: {
|
|
452
452
|
globals: {
|
|
453
453
|
...es2021 ? globalVariables.es2021 : {},
|
|
@@ -465,7 +465,7 @@ function js({
|
|
|
465
465
|
globals = {},
|
|
466
466
|
...config
|
|
467
467
|
}) {
|
|
468
|
-
return
|
|
468
|
+
return defineConfig2(globals ? jsGlobals(globals) : {}, jsStrict, config);
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
// src/configs/jsx-a11y.ts
|
|
@@ -568,7 +568,7 @@ var perfectionistStrict = mergeRules(
|
|
|
568
568
|
|
|
569
569
|
// src/configs/react.ts
|
|
570
570
|
import pluginReact from "eslint-plugin-react";
|
|
571
|
-
import
|
|
571
|
+
import { defineConfig as defineConfig3 } from "eslint/config";
|
|
572
572
|
var reactStrict = mergeRules(pluginReact.configs.flat.recommended ?? {}, {
|
|
573
573
|
"react/boolean-prop-naming": "off",
|
|
574
574
|
"react/button-has-type": ["error", { button: true, reset: false, submit: true }],
|
|
@@ -691,7 +691,7 @@ var reactStrict = mergeRules(pluginReact.configs.flat.recommended ?? {}, {
|
|
|
691
691
|
"react/void-dom-elements-no-children": "error"
|
|
692
692
|
});
|
|
693
693
|
function react(config) {
|
|
694
|
-
return
|
|
694
|
+
return defineConfig3(
|
|
695
695
|
{
|
|
696
696
|
settings: {
|
|
697
697
|
react: {
|
|
@@ -716,7 +716,8 @@ import pluginReactRefresh from "eslint-plugin-react-refresh";
|
|
|
716
716
|
var reactRefreshStrict = mergeRules(pluginReactRefresh.configs.vite);
|
|
717
717
|
|
|
718
718
|
// src/configs/ts.ts
|
|
719
|
-
import
|
|
719
|
+
import { defineConfig as defineConfig4 } from "eslint/config";
|
|
720
|
+
import pluginTs from "typescript-eslint";
|
|
720
721
|
var jsStrictRules = jsStrict.rules ?? {};
|
|
721
722
|
var tsEslintOverrideRules = mergeRules(
|
|
722
723
|
{},
|
|
@@ -796,14 +797,14 @@ var tsRecommendedOverride = mergeRules(
|
|
|
796
797
|
// confilict with @typescript-eslint/consistent-type-imports
|
|
797
798
|
}
|
|
798
799
|
);
|
|
799
|
-
var tsRecommended =
|
|
800
|
-
|
|
800
|
+
var tsRecommended = defineConfig4(
|
|
801
|
+
pluginTs.configs.recommended,
|
|
801
802
|
tsEslintOverrideRules,
|
|
802
803
|
tsRecommendedOverride
|
|
803
804
|
);
|
|
804
|
-
var tsStrict =
|
|
805
|
-
|
|
806
|
-
|
|
805
|
+
var tsStrict = defineConfig4(
|
|
806
|
+
pluginTs.configs.strictTypeChecked,
|
|
807
|
+
pluginTs.configs.stylisticTypeChecked,
|
|
807
808
|
tsEslintOverrideRules,
|
|
808
809
|
tsRecommendedOverride,
|
|
809
810
|
{
|
|
@@ -860,7 +861,7 @@ function ts({
|
|
|
860
861
|
strict = true,
|
|
861
862
|
...config
|
|
862
863
|
}) {
|
|
863
|
-
return
|
|
864
|
+
return defineConfig4(
|
|
864
865
|
parserOptions ? {
|
|
865
866
|
languageOptions: {
|
|
866
867
|
parserOptions: {
|
|
@@ -872,7 +873,7 @@ function ts({
|
|
|
872
873
|
strict ? tsStrict : tsRecommended,
|
|
873
874
|
config,
|
|
874
875
|
disableTypeChecked ? {
|
|
875
|
-
extends: [
|
|
876
|
+
extends: [pluginTs.configs.disableTypeChecked],
|
|
876
877
|
files: ["**/*.{js,jsx,mjs,cjs}"]
|
|
877
878
|
} : {}
|
|
878
879
|
);
|
|
@@ -895,7 +896,7 @@ var unusedImportsStrict = mergeRules({
|
|
|
895
896
|
|
|
896
897
|
// src/configs/vitest.ts
|
|
897
898
|
import pluginVitest from "@vitest/eslint-plugin";
|
|
898
|
-
import
|
|
899
|
+
import { defineConfig as defineConfig5 } from "eslint/config";
|
|
899
900
|
var vitestStrict = mergeRules(
|
|
900
901
|
pluginVitest.configs.recommended,
|
|
901
902
|
{
|
|
@@ -974,7 +975,7 @@ var vitestStrict = mergeRules(
|
|
|
974
975
|
}
|
|
975
976
|
);
|
|
976
977
|
function vitest(config) {
|
|
977
|
-
return
|
|
978
|
+
return defineConfig5({
|
|
978
979
|
extends: [vitestStrict, config],
|
|
979
980
|
files: ["tests/**", "*.test.*"]
|
|
980
981
|
});
|
|
@@ -1079,7 +1080,7 @@ function defineBaseConfig({
|
|
|
1079
1080
|
vitest: vitestOptions = {},
|
|
1080
1081
|
...config
|
|
1081
1082
|
} = {}) {
|
|
1082
|
-
return
|
|
1083
|
+
return defineConfig6(
|
|
1083
1084
|
settings ? { settings } : {},
|
|
1084
1085
|
ignores ? { ignores } : {},
|
|
1085
1086
|
jsOptions ? js(jsOptions) : {},
|
|
@@ -1096,7 +1097,7 @@ function defineBaseConfig({
|
|
|
1096
1097
|
|
|
1097
1098
|
// src/react.ts
|
|
1098
1099
|
import pluginReact2 from "eslint-plugin-react";
|
|
1099
|
-
import
|
|
1100
|
+
import { defineConfig as defineConfig7 } from "eslint/config";
|
|
1100
1101
|
function defineReactConfig({
|
|
1101
1102
|
jsxA11y: enabledJsxA11y = true,
|
|
1102
1103
|
jsxRuntime: enabledJsxRuntime = true,
|
|
@@ -1104,7 +1105,7 @@ function defineReactConfig({
|
|
|
1104
1105
|
reactRefresh: enabledReactRefresh = true,
|
|
1105
1106
|
...reactOptions
|
|
1106
1107
|
} = {}) {
|
|
1107
|
-
return
|
|
1108
|
+
return defineConfig7(
|
|
1108
1109
|
react({
|
|
1109
1110
|
...reactOptions,
|
|
1110
1111
|
extends: [
|
|
@@ -1119,7 +1120,7 @@ function defineReactConfig({
|
|
|
1119
1120
|
}
|
|
1120
1121
|
|
|
1121
1122
|
// src/index.ts
|
|
1122
|
-
function
|
|
1123
|
+
function defineConfig8({
|
|
1123
1124
|
eslintComments: eslintCommentsOptions,
|
|
1124
1125
|
imports: importsOptions,
|
|
1125
1126
|
js: jsOptions,
|
|
@@ -1143,5 +1144,5 @@ function defineConfig({
|
|
|
1143
1144
|
});
|
|
1144
1145
|
}
|
|
1145
1146
|
export {
|
|
1146
|
-
|
|
1147
|
+
defineConfig8 as default
|
|
1147
1148
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ofk/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ofk (https://github.com/ofk/)",
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
112
|
+
"@eslint/config-helpers": "^0.4.1",
|
|
112
113
|
"@eslint/js": "^9.38.0",
|
|
113
114
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
114
115
|
"@types/eslint-config-prettier": "^6.11.3",
|