@ofk/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/dist/index.d.mts CHANGED
@@ -42,12 +42,11 @@ declare function defineBaseConfig({ eslintComments: eslintCommentsOptions, ignor
42
42
  vitest?: false | Parameters<typeof vitest>[0];
43
43
  }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
44
44
 
45
- declare function defineReactConfig({ jsxA11y: enabledJsxA11y, jsxRuntime: enabledJsxRuntime, reactHooks: enabledReactHooks, reactRefresh: enabledReactRefresh, tailwindcss: enabledTailwindcss, ...reactOptions }?: Parameters<typeof react>[0] & {
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
- tailwindcss?: boolean;
51
50
  }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
52
51
 
53
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] & {
package/dist/index.d.ts CHANGED
@@ -42,12 +42,11 @@ declare function defineBaseConfig({ eslintComments: eslintCommentsOptions, ignor
42
42
  vitest?: false | Parameters<typeof vitest>[0];
43
43
  }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
44
44
 
45
- declare function defineReactConfig({ jsxA11y: enabledJsxA11y, jsxRuntime: enabledJsxRuntime, reactHooks: enabledReactHooks, reactRefresh: enabledReactRefresh, tailwindcss: enabledTailwindcss, ...reactOptions }?: Parameters<typeof react>[0] & {
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
- tailwindcss?: boolean;
51
50
  }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
52
51
 
53
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] & {
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ __export(index_exports, {
35
35
  module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // src/base.ts
38
- var import_typescript_eslint7 = __toESM(require("typescript-eslint"));
38
+ var import_typescript_eslint6 = __toESM(require("typescript-eslint"));
39
39
 
40
40
  // src/configs/eslint-comments.ts
41
41
  var import_configs = __toESM(require("@eslint-community/eslint-plugin-eslint-comments/configs"));
@@ -106,8 +106,6 @@ var importsStrict = mergeRules(
106
106
  },
107
107
  // https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#static-analysis
108
108
  {
109
- "import/enforce-node-protocol-usage": "off",
110
- // for node.js
111
109
  "import/no-absolute-path": "error",
112
110
  "import/no-cycle": "error",
113
111
  "import/no-dynamic-require": "error",
@@ -194,7 +192,6 @@ function imports({
194
192
  },
195
193
  node ? {
196
194
  rules: {
197
- "import/enforce-node-protocol-usage": ["error", "always"],
198
195
  "import/no-nodejs-modules": "off"
199
196
  }
200
197
  } : {},
@@ -748,13 +745,8 @@ var reactHooksStrict = mergeRules(
748
745
  var import_eslint_plugin_react_refresh = __toESM(require("eslint-plugin-react-refresh"));
749
746
  var reactRefreshStrict = mergeRules(import_eslint_plugin_react_refresh.default.configs.recommended);
750
747
 
751
- // src/configs/tailwindcss.ts
752
- var import_eslint_plugin_tailwindcss = __toESM(require("eslint-plugin-tailwindcss"));
753
- var import_typescript_eslint4 = __toESM(require("typescript-eslint"));
754
- var tailwindcssStrict = import_typescript_eslint4.default.config(import_eslint_plugin_tailwindcss.default.configs["flat/recommended"]);
755
-
756
748
  // src/configs/ts.ts
757
- var import_typescript_eslint5 = __toESM(require("typescript-eslint"));
749
+ var import_typescript_eslint4 = __toESM(require("typescript-eslint"));
758
750
  var jsStrictRules = jsStrict.rules ?? {};
759
751
  var tsEslintOverrideRules = mergeRules(
760
752
  {},
@@ -834,14 +826,14 @@ var tsRecommendedOverride = mergeRules(
834
826
  // confilict with @typescript-eslint/consistent-type-imports
835
827
  }
836
828
  );
837
- var tsRecommended = import_typescript_eslint5.default.config(
838
- import_typescript_eslint5.default.configs.recommended,
829
+ var tsRecommended = import_typescript_eslint4.default.config(
830
+ import_typescript_eslint4.default.configs.recommended,
839
831
  tsEslintOverrideRules,
840
832
  tsRecommendedOverride
841
833
  );
842
- var tsStrict = import_typescript_eslint5.default.config(
843
- import_typescript_eslint5.default.configs.strictTypeChecked,
844
- import_typescript_eslint5.default.configs.stylisticTypeChecked,
834
+ var tsStrict = import_typescript_eslint4.default.config(
835
+ import_typescript_eslint4.default.configs.strictTypeChecked,
836
+ import_typescript_eslint4.default.configs.stylisticTypeChecked,
845
837
  tsEslintOverrideRules,
846
838
  tsRecommendedOverride,
847
839
  {
@@ -898,7 +890,7 @@ function ts({
898
890
  strict = true,
899
891
  ...config
900
892
  }) {
901
- return import_typescript_eslint5.default.config(
893
+ return import_typescript_eslint4.default.config(
902
894
  parserOptions ? {
903
895
  languageOptions: {
904
896
  parserOptions: {
@@ -910,7 +902,7 @@ function ts({
910
902
  strict ? tsStrict : tsRecommended,
911
903
  config,
912
904
  disableTypeChecked ? {
913
- extends: [import_typescript_eslint5.default.configs.disableTypeChecked],
905
+ extends: [import_typescript_eslint4.default.configs.disableTypeChecked],
914
906
  files: ["**/*.{js,jsx,mjs,cjs}"]
915
907
  } : {}
916
908
  );
@@ -933,7 +925,7 @@ var unusedImportsStrict = mergeRules({
933
925
 
934
926
  // src/configs/vitest.ts
935
927
  var import_eslint_plugin = __toESM(require("@vitest/eslint-plugin"));
936
- var import_typescript_eslint6 = __toESM(require("typescript-eslint"));
928
+ var import_typescript_eslint5 = __toESM(require("typescript-eslint"));
937
929
  var vitestStrict = mergeRules(import_eslint_plugin.default.configs.recommended, {
938
930
  "vitest/consistent-test-filename": "off",
939
931
  "vitest/consistent-test-it": "error",
@@ -992,7 +984,7 @@ var vitestStrict = mergeRules(import_eslint_plugin.default.configs.recommended,
992
984
  "vitest/valid-expect-in-promise": "error"
993
985
  });
994
986
  function vitest(config) {
995
- return import_typescript_eslint6.default.config({
987
+ return import_typescript_eslint5.default.config({
996
988
  extends: [vitestStrict, config],
997
989
  files: ["tests/**", "*.test.*"]
998
990
  });
@@ -1053,8 +1045,6 @@ var unicornRecommended = mergeRules(
1053
1045
  // not recommended
1054
1046
  "unicorn/prefer-keyboard-event-key": "off",
1055
1047
  // allow keyCode
1056
- "unicorn/prefer-node-protocol": "off",
1057
- // disabled for use import/enforce-node-protocol-usage
1058
1048
  "unicorn/prefer-string-raw": "off",
1059
1049
  // disallow String.raw
1060
1050
  "unicorn/prefer-structured-clone": "off",
@@ -1092,7 +1082,7 @@ function defineBaseConfig({
1092
1082
  vitest: vitestOptions = {},
1093
1083
  ...config
1094
1084
  } = {}) {
1095
- return import_typescript_eslint7.default.config(
1085
+ return import_typescript_eslint6.default.config(
1096
1086
  settings ? { settings } : {},
1097
1087
  ignores ? { ignores } : {},
1098
1088
  jsOptions ? js(jsOptions) : {},
@@ -1109,16 +1099,15 @@ function defineBaseConfig({
1109
1099
 
1110
1100
  // src/react.ts
1111
1101
  var import_eslint_plugin_react2 = __toESM(require("eslint-plugin-react"));
1112
- var import_typescript_eslint8 = __toESM(require("typescript-eslint"));
1102
+ var import_typescript_eslint7 = __toESM(require("typescript-eslint"));
1113
1103
  function defineReactConfig({
1114
1104
  jsxA11y: enabledJsxA11y = true,
1115
1105
  jsxRuntime: enabledJsxRuntime = true,
1116
1106
  reactHooks: enabledReactHooks = true,
1117
1107
  reactRefresh: enabledReactRefresh = true,
1118
- tailwindcss: enabledTailwindcss = true,
1119
1108
  ...reactOptions
1120
1109
  } = {}) {
1121
- return import_typescript_eslint8.default.config(
1110
+ return import_typescript_eslint7.default.config(
1122
1111
  react({
1123
1112
  ...reactOptions,
1124
1113
  extends: [
@@ -1126,7 +1115,6 @@ function defineReactConfig({
1126
1115
  enabledReactHooks ? reactHooksStrict : {},
1127
1116
  enabledReactRefresh ? reactRefreshStrict : {},
1128
1117
  enabledJsxA11y ? jsxA11yStrict : {},
1129
- enabledTailwindcss ? tailwindcssStrict : {},
1130
1118
  ...reactOptions.extends ?? []
1131
1119
  ]
1132
1120
  })
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/base.ts
2
- import pluginTs7 from "typescript-eslint";
2
+ import pluginTs6 from "typescript-eslint";
3
3
 
4
4
  // src/configs/eslint-comments.ts
5
5
  import pluginEslintComments from "@eslint-community/eslint-plugin-eslint-comments/configs";
@@ -70,8 +70,6 @@ var importsStrict = mergeRules(
70
70
  },
71
71
  // https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#static-analysis
72
72
  {
73
- "import/enforce-node-protocol-usage": "off",
74
- // for node.js
75
73
  "import/no-absolute-path": "error",
76
74
  "import/no-cycle": "error",
77
75
  "import/no-dynamic-require": "error",
@@ -158,7 +156,6 @@ function imports({
158
156
  },
159
157
  node ? {
160
158
  rules: {
161
- "import/enforce-node-protocol-usage": ["error", "always"],
162
159
  "import/no-nodejs-modules": "off"
163
160
  }
164
161
  } : {},
@@ -712,13 +709,8 @@ var reactHooksStrict = mergeRules(
712
709
  import pluginReactRefresh from "eslint-plugin-react-refresh";
713
710
  var reactRefreshStrict = mergeRules(pluginReactRefresh.configs.recommended);
714
711
 
715
- // src/configs/tailwindcss.ts
716
- import pluginTailwindcss from "eslint-plugin-tailwindcss";
717
- import pluginTs4 from "typescript-eslint";
718
- var tailwindcssStrict = pluginTs4.config(pluginTailwindcss.configs["flat/recommended"]);
719
-
720
712
  // src/configs/ts.ts
721
- import pluginTs5 from "typescript-eslint";
713
+ import pluginTs4 from "typescript-eslint";
722
714
  var jsStrictRules = jsStrict.rules ?? {};
723
715
  var tsEslintOverrideRules = mergeRules(
724
716
  {},
@@ -798,14 +790,14 @@ var tsRecommendedOverride = mergeRules(
798
790
  // confilict with @typescript-eslint/consistent-type-imports
799
791
  }
800
792
  );
801
- var tsRecommended = pluginTs5.config(
802
- pluginTs5.configs.recommended,
793
+ var tsRecommended = pluginTs4.config(
794
+ pluginTs4.configs.recommended,
803
795
  tsEslintOverrideRules,
804
796
  tsRecommendedOverride
805
797
  );
806
- var tsStrict = pluginTs5.config(
807
- pluginTs5.configs.strictTypeChecked,
808
- pluginTs5.configs.stylisticTypeChecked,
798
+ var tsStrict = pluginTs4.config(
799
+ pluginTs4.configs.strictTypeChecked,
800
+ pluginTs4.configs.stylisticTypeChecked,
809
801
  tsEslintOverrideRules,
810
802
  tsRecommendedOverride,
811
803
  {
@@ -862,7 +854,7 @@ function ts({
862
854
  strict = true,
863
855
  ...config
864
856
  }) {
865
- return pluginTs5.config(
857
+ return pluginTs4.config(
866
858
  parserOptions ? {
867
859
  languageOptions: {
868
860
  parserOptions: {
@@ -874,7 +866,7 @@ function ts({
874
866
  strict ? tsStrict : tsRecommended,
875
867
  config,
876
868
  disableTypeChecked ? {
877
- extends: [pluginTs5.configs.disableTypeChecked],
869
+ extends: [pluginTs4.configs.disableTypeChecked],
878
870
  files: ["**/*.{js,jsx,mjs,cjs}"]
879
871
  } : {}
880
872
  );
@@ -897,7 +889,7 @@ var unusedImportsStrict = mergeRules({
897
889
 
898
890
  // src/configs/vitest.ts
899
891
  import pluginVitest from "@vitest/eslint-plugin";
900
- import pluginTs6 from "typescript-eslint";
892
+ import pluginTs5 from "typescript-eslint";
901
893
  var vitestStrict = mergeRules(pluginVitest.configs.recommended, {
902
894
  "vitest/consistent-test-filename": "off",
903
895
  "vitest/consistent-test-it": "error",
@@ -956,7 +948,7 @@ var vitestStrict = mergeRules(pluginVitest.configs.recommended, {
956
948
  "vitest/valid-expect-in-promise": "error"
957
949
  });
958
950
  function vitest(config) {
959
- return pluginTs6.config({
951
+ return pluginTs5.config({
960
952
  extends: [vitestStrict, config],
961
953
  files: ["tests/**", "*.test.*"]
962
954
  });
@@ -1017,8 +1009,6 @@ var unicornRecommended = mergeRules(
1017
1009
  // not recommended
1018
1010
  "unicorn/prefer-keyboard-event-key": "off",
1019
1011
  // allow keyCode
1020
- "unicorn/prefer-node-protocol": "off",
1021
- // disabled for use import/enforce-node-protocol-usage
1022
1012
  "unicorn/prefer-string-raw": "off",
1023
1013
  // disallow String.raw
1024
1014
  "unicorn/prefer-structured-clone": "off",
@@ -1056,7 +1046,7 @@ function defineBaseConfig({
1056
1046
  vitest: vitestOptions = {},
1057
1047
  ...config
1058
1048
  } = {}) {
1059
- return pluginTs7.config(
1049
+ return pluginTs6.config(
1060
1050
  settings ? { settings } : {},
1061
1051
  ignores ? { ignores } : {},
1062
1052
  jsOptions ? js(jsOptions) : {},
@@ -1073,16 +1063,15 @@ function defineBaseConfig({
1073
1063
 
1074
1064
  // src/react.ts
1075
1065
  import pluginReact2 from "eslint-plugin-react";
1076
- import pluginTs8 from "typescript-eslint";
1066
+ import pluginTs7 from "typescript-eslint";
1077
1067
  function defineReactConfig({
1078
1068
  jsxA11y: enabledJsxA11y = true,
1079
1069
  jsxRuntime: enabledJsxRuntime = true,
1080
1070
  reactHooks: enabledReactHooks = true,
1081
1071
  reactRefresh: enabledReactRefresh = true,
1082
- tailwindcss: enabledTailwindcss = true,
1083
1072
  ...reactOptions
1084
1073
  } = {}) {
1085
- return pluginTs8.config(
1074
+ return pluginTs7.config(
1086
1075
  react({
1087
1076
  ...reactOptions,
1088
1077
  extends: [
@@ -1090,7 +1079,6 @@ function defineReactConfig({
1090
1079
  enabledReactHooks ? reactHooksStrict : {},
1091
1080
  enabledReactRefresh ? reactRefreshStrict : {},
1092
1081
  enabledJsxA11y ? jsxA11yStrict : {},
1093
- enabledTailwindcss ? tailwindcssStrict : {},
1094
1082
  ...reactOptions.extends ?? []
1095
1083
  ]
1096
1084
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ofk/eslint-config",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "ofk (https://github.com/ofk/)",
@@ -41,7 +41,6 @@
41
41
  "eslint-plugin-react": "^7.35.0",
42
42
  "eslint-plugin-react-hooks": "^5.0.0",
43
43
  "eslint-plugin-react-refresh": "^0.4.16",
44
- "eslint-plugin-tailwindcss": "^3.16.0",
45
44
  "eslint-plugin-unicorn": "^56.0.0",
46
45
  "eslint-plugin-unused-imports": "^4.1.1",
47
46
  "globals": ">=14.0.0",
@@ -78,9 +77,6 @@
78
77
  "eslint-plugin-react-refresh": {
79
78
  "optional": true
80
79
  },
81
- "eslint-plugin-tailwindcss": {
82
- "optional": true
83
- },
84
80
  "eslint-plugin-unicorn": {
85
81
  "optional": true
86
82
  },
@@ -103,7 +99,6 @@
103
99
  "@types/confusing-browser-globals": "^1.0.3",
104
100
  "@types/eslint-config-prettier": "^6.11.3",
105
101
  "@types/eslint-plugin-jsx-a11y": "^6.10.0",
106
- "@types/eslint-plugin-tailwindcss": "^3.17.0",
107
102
  "@vitest/eslint-plugin": "^1.1.25",
108
103
  "confusing-browser-globals": "^1.0.11",
109
104
  "eslint": "^9.19.0",
@@ -114,7 +109,6 @@
114
109
  "eslint-plugin-react": "^7.37.4",
115
110
  "eslint-plugin-react-hooks": "^5.1.0",
116
111
  "eslint-plugin-react-refresh": "^0.4.18",
117
- "eslint-plugin-tailwindcss": "^3.18.0",
118
112
  "eslint-plugin-unicorn": "^56.0.1",
119
113
  "eslint-plugin-unused-imports": "^4.1.4",
120
114
  "globals": "^15.15.0",