@ofk/eslint-config 0.2.4 → 0.2.6
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 +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +79 -72
- package/dist/index.mjs +79 -72
- package/package.json +15 -15
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as typescript_eslint from 'typescript-eslint';
|
|
2
2
|
import { ConfigWithExtends } from 'typescript-eslint';
|
|
3
3
|
import { Linter } from 'eslint';
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ declare function imports({ defaultExportFiles, node, typescript, ...config }: Pi
|
|
|
6
6
|
defaultExportFiles?: false | string[];
|
|
7
7
|
node?: boolean;
|
|
8
8
|
typescript?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
20
20
|
declare function js({ globals, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
|
|
21
21
|
globals?: false | Parameters<typeof jsGlobals>[0];
|
|
22
|
-
}):
|
|
22
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
23
23
|
|
|
24
|
-
declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>):
|
|
24
|
+
declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
31
31
|
|
|
32
|
-
declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>):
|
|
32
|
+
declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
55
55
|
|
|
56
56
|
export { defineConfig as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as typescript_eslint from 'typescript-eslint';
|
|
2
2
|
import { ConfigWithExtends } from 'typescript-eslint';
|
|
3
3
|
import { Linter } from 'eslint';
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ declare function imports({ defaultExportFiles, node, typescript, ...config }: Pi
|
|
|
6
6
|
defaultExportFiles?: false | string[];
|
|
7
7
|
node?: boolean;
|
|
8
8
|
typescript?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
20
20
|
declare function js({ globals, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
|
|
21
21
|
globals?: false | Parameters<typeof jsGlobals>[0];
|
|
22
|
-
}):
|
|
22
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
23
23
|
|
|
24
|
-
declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>):
|
|
24
|
+
declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
31
31
|
|
|
32
|
-
declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>):
|
|
32
|
+
declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
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
|
+
}): typescript_eslint.FlatConfig.ConfigArray;
|
|
55
55
|
|
|
56
56
|
export = defineConfig;
|
package/dist/index.js
CHANGED
|
@@ -417,6 +417,7 @@ var jsStrict = mergeRules(
|
|
|
417
417
|
"prefer-rest-params": "error",
|
|
418
418
|
"prefer-spread": "error",
|
|
419
419
|
"prefer-template": "error",
|
|
420
|
+
"preserve-caught-error": "error",
|
|
420
421
|
radix: "error",
|
|
421
422
|
"require-await": "error",
|
|
422
423
|
"require-unicode-regexp": "off",
|
|
@@ -708,7 +709,7 @@ function react(config) {
|
|
|
708
709
|
|
|
709
710
|
// src/configs/react-hooks.ts
|
|
710
711
|
var _eslintpluginreacthooks = require('eslint-plugin-react-hooks'); var _eslintpluginreacthooks2 = _interopRequireDefault(_eslintpluginreacthooks);
|
|
711
|
-
var reactHooksStrict = mergeRules(_eslintpluginreacthooks2.default.configs
|
|
712
|
+
var reactHooksStrict = mergeRules(_eslintpluginreacthooks2.default.configs.flat.recommended);
|
|
712
713
|
|
|
713
714
|
// src/configs/react-refresh.ts
|
|
714
715
|
var _eslintpluginreactrefresh = require('eslint-plugin-react-refresh'); var _eslintpluginreactrefresh2 = _interopRequireDefault(_eslintpluginreactrefresh);
|
|
@@ -895,77 +896,83 @@ var unusedImportsStrict = mergeRules({
|
|
|
895
896
|
// src/configs/vitest.ts
|
|
896
897
|
var _eslintplugin = require('@vitest/eslint-plugin'); var _eslintplugin2 = _interopRequireDefault(_eslintplugin);
|
|
897
898
|
|
|
898
|
-
var vitestStrict = mergeRules(
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
899
|
+
var vitestStrict = mergeRules(
|
|
900
|
+
_eslintplugin2.default.configs.recommended,
|
|
901
|
+
{
|
|
902
|
+
"vitest/consistent-test-filename": "off",
|
|
903
|
+
"vitest/consistent-test-it": "error",
|
|
904
|
+
"vitest/consistent-vitest-vi": "error",
|
|
905
|
+
"vitest/hoisted-apis-on-top": "error",
|
|
906
|
+
"vitest/max-expects": "off",
|
|
907
|
+
"vitest/max-nested-describe": "off",
|
|
908
|
+
"vitest/no-alias-methods": "error",
|
|
909
|
+
"vitest/no-conditional-expect": "error",
|
|
910
|
+
"vitest/no-conditional-in-test": "error",
|
|
911
|
+
"vitest/no-conditional-tests": "error",
|
|
912
|
+
"vitest/no-disabled-tests": "off",
|
|
913
|
+
"vitest/no-done-callback": "off",
|
|
914
|
+
// deprecated
|
|
915
|
+
"vitest/no-duplicate-hooks": "error",
|
|
916
|
+
"vitest/no-focused-tests": "off",
|
|
917
|
+
"vitest/no-hooks": "off",
|
|
918
|
+
"vitest/no-importing-vitest-globals": "off",
|
|
919
|
+
// conflict with vitest/prefer-importing-vitest-globals
|
|
920
|
+
"vitest/no-interpolation-in-snapshots": "error",
|
|
921
|
+
"vitest/no-large-snapshots": "off",
|
|
922
|
+
"vitest/no-mocks-import": "off",
|
|
923
|
+
"vitest/no-restricted-matchers": "off",
|
|
924
|
+
"vitest/no-restricted-vi-methods": "off",
|
|
925
|
+
"vitest/no-standalone-expect": "error",
|
|
926
|
+
"vitest/no-test-prefixes": "off",
|
|
927
|
+
"vitest/no-test-return-statement": "error",
|
|
928
|
+
"vitest/padding-around-after-all-blocks": "error",
|
|
929
|
+
"vitest/padding-around-after-each-blocks": "error",
|
|
930
|
+
"vitest/padding-around-all": "error",
|
|
931
|
+
"vitest/padding-around-before-all-blocks": "error",
|
|
932
|
+
"vitest/padding-around-before-each-blocks": "error",
|
|
933
|
+
"vitest/padding-around-describe-blocks": "error",
|
|
934
|
+
"vitest/padding-around-expect-groups": "error",
|
|
935
|
+
"vitest/padding-around-test-blocks": "error",
|
|
936
|
+
"vitest/prefer-called-once": "warn",
|
|
937
|
+
"vitest/prefer-called-times": "off",
|
|
938
|
+
// conflict with vitest/prefer-called-once
|
|
939
|
+
"vitest/prefer-called-with": "error",
|
|
940
|
+
"vitest/prefer-comparison-matcher": "error",
|
|
941
|
+
"vitest/prefer-describe-function-title": "off",
|
|
942
|
+
// conflict with vitest/valid-title
|
|
943
|
+
"vitest/prefer-each": "error",
|
|
944
|
+
"vitest/prefer-equality-matcher": "error",
|
|
945
|
+
"vitest/prefer-expect-assertions": "off",
|
|
946
|
+
// deprecated
|
|
947
|
+
"vitest/prefer-expect-resolves": "error",
|
|
948
|
+
"vitest/prefer-expect-type-of": "error",
|
|
949
|
+
"vitest/prefer-hooks-in-order": "error",
|
|
950
|
+
"vitest/prefer-hooks-on-top": "error",
|
|
951
|
+
"vitest/prefer-import-in-mock": "error",
|
|
952
|
+
"vitest/prefer-importing-vitest-globals": "warn",
|
|
953
|
+
"vitest/prefer-lowercase-title": "error",
|
|
954
|
+
"vitest/prefer-mock-promise-shorthand": "error",
|
|
955
|
+
"vitest/prefer-snapshot-hint": "error",
|
|
956
|
+
"vitest/prefer-spy-on": "error",
|
|
957
|
+
"vitest/prefer-strict-boolean-matchers": "off",
|
|
958
|
+
// conflict with vitest/prefer-to-be-truthy
|
|
959
|
+
"vitest/prefer-strict-equal": "error",
|
|
960
|
+
"vitest/prefer-to-be": "error",
|
|
961
|
+
"vitest/prefer-to-be-falsy": "error",
|
|
962
|
+
"vitest/prefer-to-be-object": "error",
|
|
963
|
+
"vitest/prefer-to-be-truthy": "error",
|
|
964
|
+
"vitest/prefer-to-contain": "error",
|
|
965
|
+
"vitest/prefer-to-have-length": "error",
|
|
966
|
+
"vitest/prefer-todo": "error",
|
|
967
|
+
"vitest/prefer-vi-mocked": "error",
|
|
968
|
+
"vitest/require-hook": "error",
|
|
969
|
+
"vitest/require-mock-type-parameters": "off",
|
|
970
|
+
"vitest/require-to-throw-message": "error",
|
|
971
|
+
"vitest/require-top-level-describe": "error",
|
|
972
|
+
"vitest/valid-expect-in-promise": "error",
|
|
973
|
+
"vitest/warn-todo": "off"
|
|
974
|
+
}
|
|
975
|
+
);
|
|
969
976
|
function vitest(config) {
|
|
970
977
|
return _typescripteslint2.default.config({
|
|
971
978
|
extends: [vitestStrict, config],
|
package/dist/index.mjs
CHANGED
|
@@ -417,6 +417,7 @@ var jsStrict = mergeRules(
|
|
|
417
417
|
"prefer-rest-params": "error",
|
|
418
418
|
"prefer-spread": "error",
|
|
419
419
|
"prefer-template": "error",
|
|
420
|
+
"preserve-caught-error": "error",
|
|
420
421
|
radix: "error",
|
|
421
422
|
"require-await": "error",
|
|
422
423
|
"require-unicode-regexp": "off",
|
|
@@ -708,7 +709,7 @@ function react(config) {
|
|
|
708
709
|
|
|
709
710
|
// src/configs/react-hooks.ts
|
|
710
711
|
import pluginReactHooks from "eslint-plugin-react-hooks";
|
|
711
|
-
var reactHooksStrict = mergeRules(pluginReactHooks.configs
|
|
712
|
+
var reactHooksStrict = mergeRules(pluginReactHooks.configs.flat.recommended);
|
|
712
713
|
|
|
713
714
|
// src/configs/react-refresh.ts
|
|
714
715
|
import pluginReactRefresh from "eslint-plugin-react-refresh";
|
|
@@ -895,77 +896,83 @@ var unusedImportsStrict = mergeRules({
|
|
|
895
896
|
// src/configs/vitest.ts
|
|
896
897
|
import pluginVitest from "@vitest/eslint-plugin";
|
|
897
898
|
import pluginTs5 from "typescript-eslint";
|
|
898
|
-
var vitestStrict = mergeRules(
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
899
|
+
var vitestStrict = mergeRules(
|
|
900
|
+
pluginVitest.configs.recommended,
|
|
901
|
+
{
|
|
902
|
+
"vitest/consistent-test-filename": "off",
|
|
903
|
+
"vitest/consistent-test-it": "error",
|
|
904
|
+
"vitest/consistent-vitest-vi": "error",
|
|
905
|
+
"vitest/hoisted-apis-on-top": "error",
|
|
906
|
+
"vitest/max-expects": "off",
|
|
907
|
+
"vitest/max-nested-describe": "off",
|
|
908
|
+
"vitest/no-alias-methods": "error",
|
|
909
|
+
"vitest/no-conditional-expect": "error",
|
|
910
|
+
"vitest/no-conditional-in-test": "error",
|
|
911
|
+
"vitest/no-conditional-tests": "error",
|
|
912
|
+
"vitest/no-disabled-tests": "off",
|
|
913
|
+
"vitest/no-done-callback": "off",
|
|
914
|
+
// deprecated
|
|
915
|
+
"vitest/no-duplicate-hooks": "error",
|
|
916
|
+
"vitest/no-focused-tests": "off",
|
|
917
|
+
"vitest/no-hooks": "off",
|
|
918
|
+
"vitest/no-importing-vitest-globals": "off",
|
|
919
|
+
// conflict with vitest/prefer-importing-vitest-globals
|
|
920
|
+
"vitest/no-interpolation-in-snapshots": "error",
|
|
921
|
+
"vitest/no-large-snapshots": "off",
|
|
922
|
+
"vitest/no-mocks-import": "off",
|
|
923
|
+
"vitest/no-restricted-matchers": "off",
|
|
924
|
+
"vitest/no-restricted-vi-methods": "off",
|
|
925
|
+
"vitest/no-standalone-expect": "error",
|
|
926
|
+
"vitest/no-test-prefixes": "off",
|
|
927
|
+
"vitest/no-test-return-statement": "error",
|
|
928
|
+
"vitest/padding-around-after-all-blocks": "error",
|
|
929
|
+
"vitest/padding-around-after-each-blocks": "error",
|
|
930
|
+
"vitest/padding-around-all": "error",
|
|
931
|
+
"vitest/padding-around-before-all-blocks": "error",
|
|
932
|
+
"vitest/padding-around-before-each-blocks": "error",
|
|
933
|
+
"vitest/padding-around-describe-blocks": "error",
|
|
934
|
+
"vitest/padding-around-expect-groups": "error",
|
|
935
|
+
"vitest/padding-around-test-blocks": "error",
|
|
936
|
+
"vitest/prefer-called-once": "warn",
|
|
937
|
+
"vitest/prefer-called-times": "off",
|
|
938
|
+
// conflict with vitest/prefer-called-once
|
|
939
|
+
"vitest/prefer-called-with": "error",
|
|
940
|
+
"vitest/prefer-comparison-matcher": "error",
|
|
941
|
+
"vitest/prefer-describe-function-title": "off",
|
|
942
|
+
// conflict with vitest/valid-title
|
|
943
|
+
"vitest/prefer-each": "error",
|
|
944
|
+
"vitest/prefer-equality-matcher": "error",
|
|
945
|
+
"vitest/prefer-expect-assertions": "off",
|
|
946
|
+
// deprecated
|
|
947
|
+
"vitest/prefer-expect-resolves": "error",
|
|
948
|
+
"vitest/prefer-expect-type-of": "error",
|
|
949
|
+
"vitest/prefer-hooks-in-order": "error",
|
|
950
|
+
"vitest/prefer-hooks-on-top": "error",
|
|
951
|
+
"vitest/prefer-import-in-mock": "error",
|
|
952
|
+
"vitest/prefer-importing-vitest-globals": "warn",
|
|
953
|
+
"vitest/prefer-lowercase-title": "error",
|
|
954
|
+
"vitest/prefer-mock-promise-shorthand": "error",
|
|
955
|
+
"vitest/prefer-snapshot-hint": "error",
|
|
956
|
+
"vitest/prefer-spy-on": "error",
|
|
957
|
+
"vitest/prefer-strict-boolean-matchers": "off",
|
|
958
|
+
// conflict with vitest/prefer-to-be-truthy
|
|
959
|
+
"vitest/prefer-strict-equal": "error",
|
|
960
|
+
"vitest/prefer-to-be": "error",
|
|
961
|
+
"vitest/prefer-to-be-falsy": "error",
|
|
962
|
+
"vitest/prefer-to-be-object": "error",
|
|
963
|
+
"vitest/prefer-to-be-truthy": "error",
|
|
964
|
+
"vitest/prefer-to-contain": "error",
|
|
965
|
+
"vitest/prefer-to-have-length": "error",
|
|
966
|
+
"vitest/prefer-todo": "error",
|
|
967
|
+
"vitest/prefer-vi-mocked": "error",
|
|
968
|
+
"vitest/require-hook": "error",
|
|
969
|
+
"vitest/require-mock-type-parameters": "off",
|
|
970
|
+
"vitest/require-to-throw-message": "error",
|
|
971
|
+
"vitest/require-top-level-describe": "error",
|
|
972
|
+
"vitest/valid-expect-in-promise": "error",
|
|
973
|
+
"vitest/warn-todo": "off"
|
|
974
|
+
}
|
|
975
|
+
);
|
|
969
976
|
function vitest(config) {
|
|
970
977
|
return pluginTs5.config({
|
|
971
978
|
extends: [vitestStrict, config],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ofk/eslint-config",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ofk (https://github.com/ofk/)",
|
|
@@ -109,31 +109,31 @@
|
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
112
|
-
"@eslint/js": "^9.
|
|
112
|
+
"@eslint/js": "^9.38.0",
|
|
113
113
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
114
114
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
115
|
-
"@types/eslint-plugin-jsx-a11y": "^6.10.
|
|
116
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
115
|
+
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
116
|
+
"@vitest/eslint-plugin": "^1.3.23",
|
|
117
117
|
"confusing-browser-globals": "^1.0.11",
|
|
118
|
-
"eslint": "^9.
|
|
119
|
-
"eslint-config-prettier": "^10.1.
|
|
118
|
+
"eslint": "^9.38.0",
|
|
119
|
+
"eslint-config-prettier": "^10.1.8",
|
|
120
120
|
"eslint-plugin-import": "^2.32.0",
|
|
121
121
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
122
|
-
"eslint-plugin-perfectionist": "^4.15.
|
|
122
|
+
"eslint-plugin-perfectionist": "^4.15.1",
|
|
123
123
|
"eslint-plugin-react": "^7.37.5",
|
|
124
|
-
"eslint-plugin-react-hooks": "^
|
|
125
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
126
|
-
"eslint-plugin-unicorn": "^
|
|
127
|
-
"eslint-plugin-unused-imports": "^4.
|
|
128
|
-
"globals": "^16.
|
|
124
|
+
"eslint-plugin-react-hooks": "^7.0.0",
|
|
125
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
126
|
+
"eslint-plugin-unicorn": "^61.0.2",
|
|
127
|
+
"eslint-plugin-unused-imports": "^4.3.0",
|
|
128
|
+
"globals": "^16.4.0",
|
|
129
129
|
"husky": "^9.1.7",
|
|
130
|
-
"lint-staged": "^16.
|
|
130
|
+
"lint-staged": "^16.2.5",
|
|
131
131
|
"npm-run-all": "^4.1.5",
|
|
132
132
|
"prettier": "^3.6.2",
|
|
133
133
|
"prettier-package-json": "^2.8.0",
|
|
134
134
|
"tsup": "^8.5.0",
|
|
135
|
-
"typescript": "^5.
|
|
136
|
-
"typescript-eslint": "^8.
|
|
135
|
+
"typescript": "^5.9.3",
|
|
136
|
+
"typescript-eslint": "^8.46.2",
|
|
137
137
|
"vitest": "^3.2.4"
|
|
138
138
|
},
|
|
139
139
|
"keywords": [],
|