@ofk/eslint-config 0.0.12 → 0.0.14
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.ts +1 -1
- package/dist/index.js +70 -101
- package/dist/index.mjs +1 -1
- package/package.json +21 -10
package/dist/index.d.ts
CHANGED
|
@@ -53,4 +53,4 @@ declare function defineConfig({ eslintComments: eslintCommentsOptions, imports:
|
|
|
53
53
|
react?: false | Parameters<typeof defineReactConfig>[0];
|
|
54
54
|
}): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
|
|
55
55
|
|
|
56
|
-
export
|
|
56
|
+
export = defineConfig;
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var index_exports = {};
|
|
32
|
-
__export(index_exports, {
|
|
33
|
-
default: () => defineConfig
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(index_exports);
|
|
36
|
-
|
|
37
|
-
// src/base.ts
|
|
38
|
-
var import_typescript_eslint6 = __toESM(require("typescript-eslint"));
|
|
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 _typescripteslint = require('typescript-eslint'); var _typescripteslint2 = _interopRequireDefault(_typescripteslint);
|
|
39
3
|
|
|
40
4
|
// src/configs/eslint-comments.ts
|
|
41
|
-
var
|
|
5
|
+
var _configs = require('@eslint-community/eslint-plugin-eslint-comments/configs'); var _configs2 = _interopRequireDefault(_configs);
|
|
42
6
|
|
|
43
7
|
// src/utils.ts
|
|
44
8
|
function mergeRules(config, ...rulesSet) {
|
|
@@ -58,15 +22,15 @@ function mergeRuleOptions(rule, options) {
|
|
|
58
22
|
}
|
|
59
23
|
|
|
60
24
|
// src/configs/eslint-comments.ts
|
|
61
|
-
var eslintCommentsStrict = mergeRules(
|
|
25
|
+
var eslintCommentsStrict = mergeRules(_configs2.default.recommended, {
|
|
62
26
|
"@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }]
|
|
63
27
|
});
|
|
64
28
|
|
|
65
29
|
// src/configs/imports.ts
|
|
66
|
-
var
|
|
67
|
-
|
|
30
|
+
var _eslintpluginimport = require('eslint-plugin-import'); var pluginImport = _interopRequireWildcard(_eslintpluginimport);
|
|
31
|
+
|
|
68
32
|
var importsStrict = mergeRules(
|
|
69
|
-
|
|
33
|
+
pluginImport.flatConfigs.recommended,
|
|
70
34
|
// https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#helpful-warnings
|
|
71
35
|
{
|
|
72
36
|
"import/no-deprecated": "off",
|
|
@@ -177,7 +141,7 @@ function imports({
|
|
|
177
141
|
typescript = false,
|
|
178
142
|
...config
|
|
179
143
|
}) {
|
|
180
|
-
return
|
|
144
|
+
return _typescripteslint2.default.config(
|
|
181
145
|
importsStrict,
|
|
182
146
|
config,
|
|
183
147
|
// allow default export in config files
|
|
@@ -201,7 +165,7 @@ function imports({
|
|
|
201
165
|
} : {},
|
|
202
166
|
typescript ? {
|
|
203
167
|
extends: [
|
|
204
|
-
|
|
168
|
+
pluginImport.flatConfigs.typescript,
|
|
205
169
|
{
|
|
206
170
|
rules: {
|
|
207
171
|
"import/extensions": [
|
|
@@ -237,12 +201,12 @@ function imports({
|
|
|
237
201
|
}
|
|
238
202
|
|
|
239
203
|
// src/configs/js.ts
|
|
240
|
-
var
|
|
241
|
-
var
|
|
242
|
-
var
|
|
243
|
-
|
|
204
|
+
var _js = require('@eslint/js'); var _js2 = _interopRequireDefault(_js);
|
|
205
|
+
var _confusingbrowserglobals = require('confusing-browser-globals'); var _confusingbrowserglobals2 = _interopRequireDefault(_confusingbrowserglobals);
|
|
206
|
+
var _globals = require('globals'); var _globals2 = _interopRequireDefault(_globals);
|
|
207
|
+
|
|
244
208
|
var jsStrict = mergeRules(
|
|
245
|
-
|
|
209
|
+
_js2.default.configs.recommended,
|
|
246
210
|
{
|
|
247
211
|
"no-empty": "warn",
|
|
248
212
|
// override recommended in suggestions
|
|
@@ -373,7 +337,7 @@ var jsStrict = mergeRules(
|
|
|
373
337
|
// see https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/es6.js#L65
|
|
374
338
|
"no-restricted-exports": ["error", { restrictedNamedExports: ["default", "then"] }],
|
|
375
339
|
// see https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/variables.js#L19
|
|
376
|
-
"no-restricted-globals": ["error", ...
|
|
340
|
+
"no-restricted-globals": ["error", ..._confusingbrowserglobals2.default],
|
|
377
341
|
"no-restricted-imports": "off",
|
|
378
342
|
// allow all imports
|
|
379
343
|
"no-restricted-properties": "off",
|
|
@@ -476,16 +440,16 @@ function jsGlobals({
|
|
|
476
440
|
es2025 = true,
|
|
477
441
|
node = true
|
|
478
442
|
}) {
|
|
479
|
-
return
|
|
443
|
+
return _typescripteslint2.default.config({
|
|
480
444
|
languageOptions: {
|
|
481
445
|
globals: {
|
|
482
|
-
...es2021 ?
|
|
483
|
-
...es2022 ?
|
|
484
|
-
...es2023 ?
|
|
485
|
-
...es2024 ?
|
|
486
|
-
...es2025 ?
|
|
487
|
-
...browser ?
|
|
488
|
-
...node ?
|
|
446
|
+
...es2021 ? _globals2.default.es2021 : {},
|
|
447
|
+
...es2022 ? _globals2.default.es2022 : {},
|
|
448
|
+
...es2023 ? _globals2.default.es2023 : {},
|
|
449
|
+
...es2024 ? _globals2.default.es2024 : {},
|
|
450
|
+
...es2025 ? _globals2.default.es2025 : {},
|
|
451
|
+
...browser ? _globals2.default.browser : {},
|
|
452
|
+
...node ? _globals2.default.node : {}
|
|
489
453
|
}
|
|
490
454
|
}
|
|
491
455
|
});
|
|
@@ -494,12 +458,12 @@ function js({
|
|
|
494
458
|
globals = {},
|
|
495
459
|
...config
|
|
496
460
|
}) {
|
|
497
|
-
return
|
|
461
|
+
return _typescripteslint2.default.config(globals ? jsGlobals(globals) : {}, jsStrict, config);
|
|
498
462
|
}
|
|
499
463
|
|
|
500
464
|
// src/configs/jsx-a11y.ts
|
|
501
|
-
var
|
|
502
|
-
var jsxA11yStrict = mergeRules(
|
|
465
|
+
var _eslintpluginjsxa11y = require('eslint-plugin-jsx-a11y'); var _eslintpluginjsxa11y2 = _interopRequireDefault(_eslintpluginjsxa11y);
|
|
466
|
+
var jsxA11yStrict = mergeRules(_eslintpluginjsxa11y2.default.flatConfigs.recommended, {
|
|
503
467
|
"jsx-a11y/accessible-emoji": "off",
|
|
504
468
|
// deprecated
|
|
505
469
|
"jsx-a11y/lang": "error",
|
|
@@ -510,11 +474,11 @@ var jsxA11yStrict = mergeRules(import_eslint_plugin_jsx_a11y.default.flatConfigs
|
|
|
510
474
|
});
|
|
511
475
|
|
|
512
476
|
// src/configs/perfectionist.ts
|
|
513
|
-
var
|
|
477
|
+
var _eslintpluginperfectionist = require('eslint-plugin-perfectionist'); var _eslintpluginperfectionist2 = _interopRequireDefault(_eslintpluginperfectionist);
|
|
514
478
|
var perfectionistRecommended = {
|
|
515
|
-
...
|
|
479
|
+
..._eslintpluginperfectionist2.default.configs["recommended-natural"],
|
|
516
480
|
rules: Object.fromEntries(
|
|
517
|
-
Object.entries(
|
|
481
|
+
Object.entries(_nullishCoalesce(_eslintpluginperfectionist2.default.configs["recommended-natural"].rules, () => ( {}))).map(
|
|
518
482
|
([name, rule]) => [name, mergeRuleOptions(rule, { ignoreCase: false })]
|
|
519
483
|
)
|
|
520
484
|
)
|
|
@@ -595,9 +559,9 @@ var perfectionistStrict = mergeRules(
|
|
|
595
559
|
);
|
|
596
560
|
|
|
597
561
|
// src/configs/react.ts
|
|
598
|
-
var
|
|
599
|
-
|
|
600
|
-
var reactStrict = mergeRules(
|
|
562
|
+
var _eslintpluginreact = require('eslint-plugin-react'); var _eslintpluginreact2 = _interopRequireDefault(_eslintpluginreact);
|
|
563
|
+
|
|
564
|
+
var reactStrict = mergeRules(_nullishCoalesce(_eslintpluginreact2.default.configs.flat.recommended, () => ( {})), {
|
|
601
565
|
"react/boolean-prop-naming": "off",
|
|
602
566
|
"react/button-has-type": ["error", { button: true, reset: false, submit: true }],
|
|
603
567
|
"react/checked-requires-onchange-or-readonly": "off",
|
|
@@ -719,7 +683,7 @@ var reactStrict = mergeRules(import_eslint_plugin_react.default.configs.flat.rec
|
|
|
719
683
|
"react/void-dom-elements-no-children": "error"
|
|
720
684
|
});
|
|
721
685
|
function react(config) {
|
|
722
|
-
return
|
|
686
|
+
return _typescripteslint2.default.config(
|
|
723
687
|
{
|
|
724
688
|
settings: {
|
|
725
689
|
react: {
|
|
@@ -729,29 +693,29 @@ function react(config) {
|
|
|
729
693
|
},
|
|
730
694
|
{
|
|
731
695
|
...config,
|
|
732
|
-
extends: [reactStrict, ...config.extends
|
|
696
|
+
extends: [reactStrict, ..._nullishCoalesce(config.extends, () => ( []))],
|
|
733
697
|
files: ["**/*.{jsx,tsx}"]
|
|
734
698
|
}
|
|
735
699
|
);
|
|
736
700
|
}
|
|
737
701
|
|
|
738
702
|
// src/configs/react-hooks.ts
|
|
739
|
-
var
|
|
703
|
+
var _eslintpluginreacthooks = require('eslint-plugin-react-hooks'); var _eslintpluginreacthooks2 = _interopRequireDefault(_eslintpluginreacthooks);
|
|
740
704
|
var reactHooksStrict = mergeRules(
|
|
741
705
|
// Flat Config version has not been released yet.
|
|
742
706
|
{
|
|
743
|
-
plugins: { "react-hooks":
|
|
744
|
-
rules:
|
|
707
|
+
plugins: { "react-hooks": _eslintpluginreacthooks2.default },
|
|
708
|
+
rules: _eslintpluginreacthooks2.default.configs.recommended.rules
|
|
745
709
|
}
|
|
746
710
|
);
|
|
747
711
|
|
|
748
712
|
// src/configs/react-refresh.ts
|
|
749
|
-
var
|
|
750
|
-
var reactRefreshStrict = mergeRules(
|
|
713
|
+
var _eslintpluginreactrefresh = require('eslint-plugin-react-refresh'); var _eslintpluginreactrefresh2 = _interopRequireDefault(_eslintpluginreactrefresh);
|
|
714
|
+
var reactRefreshStrict = mergeRules(_eslintpluginreactrefresh2.default.configs.recommended);
|
|
751
715
|
|
|
752
716
|
// src/configs/ts.ts
|
|
753
|
-
|
|
754
|
-
var jsStrictRules = jsStrict.rules
|
|
717
|
+
|
|
718
|
+
var jsStrictRules = _nullishCoalesce(jsStrict.rules, () => ( {}));
|
|
755
719
|
var tsEslintOverrideRules = mergeRules(
|
|
756
720
|
{},
|
|
757
721
|
// see https://github.com/typescript-eslint/typescript-eslint/blob/v8.22.0/packages/eslint-plugin/src/configs/strict-type-checked.ts
|
|
@@ -830,14 +794,14 @@ var tsRecommendedOverride = mergeRules(
|
|
|
830
794
|
// confilict with @typescript-eslint/consistent-type-imports
|
|
831
795
|
}
|
|
832
796
|
);
|
|
833
|
-
var tsRecommended =
|
|
834
|
-
|
|
797
|
+
var tsRecommended = _typescripteslint2.default.config(
|
|
798
|
+
_typescripteslint2.default.configs.recommended,
|
|
835
799
|
tsEslintOverrideRules,
|
|
836
800
|
tsRecommendedOverride
|
|
837
801
|
);
|
|
838
|
-
var tsStrict =
|
|
839
|
-
|
|
840
|
-
|
|
802
|
+
var tsStrict = _typescripteslint2.default.config(
|
|
803
|
+
_typescripteslint2.default.configs.strictTypeChecked,
|
|
804
|
+
_typescripteslint2.default.configs.stylisticTypeChecked,
|
|
841
805
|
tsEslintOverrideRules,
|
|
842
806
|
tsRecommendedOverride,
|
|
843
807
|
{
|
|
@@ -894,7 +858,7 @@ function ts({
|
|
|
894
858
|
strict = true,
|
|
895
859
|
...config
|
|
896
860
|
}) {
|
|
897
|
-
return
|
|
861
|
+
return _typescripteslint2.default.config(
|
|
898
862
|
parserOptions ? {
|
|
899
863
|
languageOptions: {
|
|
900
864
|
parserOptions: {
|
|
@@ -906,18 +870,18 @@ function ts({
|
|
|
906
870
|
strict ? tsStrict : tsRecommended,
|
|
907
871
|
config,
|
|
908
872
|
disableTypeChecked ? {
|
|
909
|
-
extends: [
|
|
873
|
+
extends: [_typescripteslint2.default.configs.disableTypeChecked],
|
|
910
874
|
files: ["**/*.{js,jsx,mjs,cjs}"]
|
|
911
875
|
} : {}
|
|
912
876
|
);
|
|
913
877
|
}
|
|
914
878
|
|
|
915
879
|
// src/configs/unused-imports.ts
|
|
916
|
-
var
|
|
917
|
-
var jsStrictRules2 = jsStrict.rules
|
|
880
|
+
var _eslintpluginunusedimports = require('eslint-plugin-unused-imports'); var _eslintpluginunusedimports2 = _interopRequireDefault(_eslintpluginunusedimports);
|
|
881
|
+
var jsStrictRules2 = _nullishCoalesce(jsStrict.rules, () => ( {}));
|
|
918
882
|
var unusedImportsStrict = mergeRules({
|
|
919
883
|
plugins: {
|
|
920
|
-
"unused-imports":
|
|
884
|
+
"unused-imports": _eslintpluginunusedimports2.default
|
|
921
885
|
},
|
|
922
886
|
rules: {
|
|
923
887
|
"@typescript-eslint/no-unused-vars": "off",
|
|
@@ -928,9 +892,9 @@ var unusedImportsStrict = mergeRules({
|
|
|
928
892
|
});
|
|
929
893
|
|
|
930
894
|
// src/configs/vitest.ts
|
|
931
|
-
var
|
|
932
|
-
|
|
933
|
-
var vitestStrict = mergeRules(
|
|
895
|
+
var _eslintplugin = require('@vitest/eslint-plugin'); var _eslintplugin2 = _interopRequireDefault(_eslintplugin);
|
|
896
|
+
|
|
897
|
+
var vitestStrict = mergeRules(_eslintplugin2.default.configs.recommended, {
|
|
934
898
|
"vitest/consistent-test-filename": "off",
|
|
935
899
|
"vitest/consistent-test-it": "error",
|
|
936
900
|
"vitest/max-expects": "off",
|
|
@@ -992,19 +956,19 @@ var vitestStrict = mergeRules(import_eslint_plugin.default.configs.recommended,
|
|
|
992
956
|
"vitest/valid-expect-in-promise": "error"
|
|
993
957
|
});
|
|
994
958
|
function vitest(config) {
|
|
995
|
-
return
|
|
959
|
+
return _typescripteslint2.default.config({
|
|
996
960
|
extends: [vitestStrict, config],
|
|
997
961
|
files: ["tests/**", "*.test.*"]
|
|
998
962
|
});
|
|
999
963
|
}
|
|
1000
964
|
|
|
1001
965
|
// src/configs/unicorn.ts
|
|
1002
|
-
var
|
|
966
|
+
var _eslintpluginunicorn = require('eslint-plugin-unicorn'); var _eslintpluginunicorn2 = _interopRequireDefault(_eslintpluginunicorn);
|
|
1003
967
|
var unicornRecommended = mergeRules(
|
|
1004
968
|
{
|
|
1005
|
-
...
|
|
969
|
+
..._eslintpluginunicorn2.default.configs["flat/recommended"],
|
|
1006
970
|
rules: Object.fromEntries(
|
|
1007
|
-
Object.entries(
|
|
971
|
+
Object.entries(_nullishCoalesce(_eslintpluginunicorn2.default.configs["flat/recommended"].rules, () => ( {}))).filter(
|
|
1008
972
|
([_key, value]) => value !== "off"
|
|
1009
973
|
)
|
|
1010
974
|
)
|
|
@@ -1093,7 +1057,7 @@ function defineBaseConfig({
|
|
|
1093
1057
|
vitest: vitestOptions = {},
|
|
1094
1058
|
...config
|
|
1095
1059
|
} = {}) {
|
|
1096
|
-
return
|
|
1060
|
+
return _typescripteslint2.default.config(
|
|
1097
1061
|
settings ? { settings } : {},
|
|
1098
1062
|
ignores ? { ignores } : {},
|
|
1099
1063
|
jsOptions ? js(jsOptions) : {},
|
|
@@ -1109,8 +1073,8 @@ function defineBaseConfig({
|
|
|
1109
1073
|
}
|
|
1110
1074
|
|
|
1111
1075
|
// src/react.ts
|
|
1112
|
-
|
|
1113
|
-
|
|
1076
|
+
|
|
1077
|
+
|
|
1114
1078
|
function defineReactConfig({
|
|
1115
1079
|
jsxA11y: enabledJsxA11y = true,
|
|
1116
1080
|
jsxRuntime: enabledJsxRuntime = true,
|
|
@@ -1118,15 +1082,15 @@ function defineReactConfig({
|
|
|
1118
1082
|
reactRefresh: enabledReactRefresh = true,
|
|
1119
1083
|
...reactOptions
|
|
1120
1084
|
} = {}) {
|
|
1121
|
-
return
|
|
1085
|
+
return _typescripteslint2.default.config(
|
|
1122
1086
|
react({
|
|
1123
1087
|
...reactOptions,
|
|
1124
1088
|
extends: [
|
|
1125
|
-
enabledJsxRuntime ?
|
|
1089
|
+
enabledJsxRuntime ? _eslintpluginreact2.default.configs.flat["jsx-runtime"] : {},
|
|
1126
1090
|
enabledReactHooks ? reactHooksStrict : {},
|
|
1127
1091
|
enabledReactRefresh ? reactRefreshStrict : {},
|
|
1128
1092
|
enabledJsxA11y ? jsxA11yStrict : {},
|
|
1129
|
-
...reactOptions.extends
|
|
1093
|
+
..._nullishCoalesce(reactOptions.extends, () => ( []))
|
|
1130
1094
|
]
|
|
1131
1095
|
})
|
|
1132
1096
|
);
|
|
@@ -1147,7 +1111,7 @@ function defineConfig({
|
|
|
1147
1111
|
return defineBaseConfig({
|
|
1148
1112
|
...config,
|
|
1149
1113
|
eslintComments: eslintCommentsOptions,
|
|
1150
|
-
extends: [reactOptions ? defineReactConfig(reactOptions) : {}, ...config.extends
|
|
1114
|
+
extends: [reactOptions ? defineReactConfig(reactOptions) : {}, ..._nullishCoalesce(config.extends, () => ( []))],
|
|
1151
1115
|
imports: importsOptions,
|
|
1152
1116
|
js: jsOptions,
|
|
1153
1117
|
perfectionist: perfectionistOptions,
|
|
@@ -1156,3 +1120,8 @@ function defineConfig({
|
|
|
1156
1120
|
vitest: vitestOptions
|
|
1157
1121
|
});
|
|
1158
1122
|
}
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
exports.default = defineConfig;
|
|
1126
|
+
|
|
1127
|
+
module.exports = exports.default;
|
package/dist/index.mjs
CHANGED
|
@@ -27,7 +27,7 @@ var eslintCommentsStrict = mergeRules(pluginEslintComments.recommended, {
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
// src/configs/imports.ts
|
|
30
|
-
import pluginImport from "eslint-plugin-import";
|
|
30
|
+
import * as pluginImport from "eslint-plugin-import";
|
|
31
31
|
import pluginTs from "typescript-eslint";
|
|
32
32
|
var importsStrict = mergeRules(
|
|
33
33
|
pluginImport.flatConfigs.recommended,
|
package/package.json
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ofk/eslint-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ofk (https://github.com/ofk/)",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"import":
|
|
10
|
-
|
|
9
|
+
"import": {
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"default": "./dist/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
11
17
|
}
|
|
12
18
|
},
|
|
13
|
-
"main": "./dist/index.js",
|
|
14
19
|
"files": [
|
|
15
20
|
"dist"
|
|
16
21
|
],
|
|
17
22
|
"scripts": {
|
|
18
23
|
"build": "tsup",
|
|
24
|
+
"prelint": "npm run build",
|
|
19
25
|
"lint": "run-s lint:*",
|
|
20
|
-
"lint:eslint": "eslint .",
|
|
26
|
+
"lint:eslint": "eslint --config eslint.config.mjs .",
|
|
27
|
+
"lint:eslint-cjs": "eslint --config eslint.config.cjs .",
|
|
21
28
|
"lint:prettier": "prettier --check .",
|
|
22
29
|
"lint:prettier-package-json": "prettier-package-json --list-different",
|
|
30
|
+
"prelint-fix": "npm run build",
|
|
23
31
|
"lint-fix": "run-s lint-fix:*",
|
|
24
|
-
"lint-fix:eslint": "eslint --fix .",
|
|
32
|
+
"lint-fix:eslint": "eslint --config eslint.config.mjs --fix .",
|
|
25
33
|
"lint-fix:prettier": "prettier --write .",
|
|
26
34
|
"lint-fix:prettier-package-json": "prettier-package-json --write",
|
|
27
35
|
"prepare": "husky",
|
|
@@ -29,7 +37,7 @@
|
|
|
29
37
|
"test": "run-s lint test:*",
|
|
30
38
|
"test:vitest": "vitest run"
|
|
31
39
|
},
|
|
32
|
-
"
|
|
40
|
+
"sideEffects": false,
|
|
33
41
|
"peerDependencies": {
|
|
34
42
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
|
35
43
|
"@eslint/js": "^9.18.0",
|
|
@@ -41,7 +49,7 @@
|
|
|
41
49
|
"eslint-plugin-react": "^7.35.0",
|
|
42
50
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
43
51
|
"eslint-plugin-react-refresh": "^0.4.16",
|
|
44
|
-
"eslint-plugin-unicorn": "^
|
|
52
|
+
"eslint-plugin-unicorn": "^57.0.0",
|
|
45
53
|
"eslint-plugin-unused-imports": "^4.1.1",
|
|
46
54
|
"globals": ">=14.0.0",
|
|
47
55
|
"typescript-eslint": "^8.15.0"
|
|
@@ -113,7 +121,6 @@
|
|
|
113
121
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
114
122
|
"globals": "^16.0.0",
|
|
115
123
|
"husky": "^9.1.7",
|
|
116
|
-
"jiti": "^2.4.2",
|
|
117
124
|
"lint-staged": "^15.5.0",
|
|
118
125
|
"npm-run-all": "^4.1.5",
|
|
119
126
|
"prettier": "^3.5.3",
|
|
@@ -125,10 +132,14 @@
|
|
|
125
132
|
},
|
|
126
133
|
"keywords": [],
|
|
127
134
|
"lint-staged": {
|
|
128
|
-
"*.{json,ts}": "prettier --write",
|
|
129
135
|
"package.json": [
|
|
130
136
|
"prettier --write",
|
|
131
137
|
"npm run lint-fix:prettier-package-json"
|
|
138
|
+
],
|
|
139
|
+
"*.{json,md,html}": "prettier --write",
|
|
140
|
+
"*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}": [
|
|
141
|
+
"prettier --write",
|
|
142
|
+
"eslint --fix"
|
|
132
143
|
]
|
|
133
144
|
},
|
|
134
145
|
"packageManager": "npm@10.8.0+sha512.c21f77b91733829ec70e73cc88b5dc0a4bf685a81d252d3327d293ff7d5dd05a173f4dbeaa037600ec29696f397f14569229e5dab10b7cfc3e0a30575b8f3f8d"
|