@ofk/eslint-config 0.1.0 → 0.2.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.js CHANGED
@@ -71,6 +71,7 @@ var importsStrict = mergeRules(
71
71
  },
72
72
  // https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#static-analysis
73
73
  {
74
+ "import/enforce-node-protocol-usage": "error",
74
75
  "import/no-absolute-path": "error",
75
76
  "import/no-cycle": "error",
76
77
  "import/no-dynamic-require": "error",
@@ -162,7 +163,11 @@ function imports({
162
163
  rules: {
163
164
  "import/no-nodejs-modules": "off"
164
165
  }
165
- } : {},
166
+ } : {
167
+ rules: {
168
+ "import/enforce-node-protocol-usage": "off"
169
+ }
170
+ },
166
171
  typescript ? {
167
172
  extends: [
168
173
  pluginImport.flatConfigs.typescript,
@@ -240,6 +245,7 @@ var jsStrict = mergeRules(
240
245
  "no-promise-executor-return": "error",
241
246
  "no-self-compare": "error",
242
247
  "no-template-curly-in-string": "error",
248
+ "no-unassigned-vars": "error",
243
249
  "no-unmodified-loop-condition": "error",
244
250
  "no-unreachable-loop": "error",
245
251
  "no-use-before-define": "error",
@@ -898,6 +904,7 @@ var _eslintplugin = require('@vitest/eslint-plugin'); var _eslintplugin2 = _inte
898
904
  var vitestStrict = mergeRules(_eslintplugin2.default.configs.recommended, {
899
905
  "vitest/consistent-test-filename": "off",
900
906
  "vitest/consistent-test-it": "error",
907
+ "vitest/consistent-vitest-vi": "error",
901
908
  "vitest/max-expects": "off",
902
909
  "vitest/max-nested-describe": "off",
903
910
  "vitest/no-alias-methods": "error",
@@ -910,6 +917,8 @@ var vitestStrict = mergeRules(_eslintplugin2.default.configs.recommended, {
910
917
  "vitest/no-duplicate-hooks": "error",
911
918
  "vitest/no-focused-tests": "off",
912
919
  "vitest/no-hooks": "off",
920
+ "vitest/no-importing-vitest-globals": "off",
921
+ // conflict with vitest/prefer-importing-vitest-globals
913
922
  "vitest/no-interpolation-in-snapshots": "error",
914
923
  "vitest/no-large-snapshots": "off",
915
924
  "vitest/no-mocks-import": "off",
@@ -926,6 +935,9 @@ var vitestStrict = mergeRules(_eslintplugin2.default.configs.recommended, {
926
935
  "vitest/padding-around-describe-blocks": "error",
927
936
  "vitest/padding-around-expect-groups": "error",
928
937
  "vitest/padding-around-test-blocks": "error",
938
+ "vitest/prefer-called-once": "warn",
939
+ "vitest/prefer-called-times": "off",
940
+ // conflict with vitest/prefer-called-once
929
941
  "vitest/prefer-called-with": "error",
930
942
  "vitest/prefer-comparison-matcher": "error",
931
943
  "vitest/prefer-describe-function-title": "error",
@@ -936,6 +948,7 @@ var vitestStrict = mergeRules(_eslintplugin2.default.configs.recommended, {
936
948
  "vitest/prefer-expect-resolves": "error",
937
949
  "vitest/prefer-hooks-in-order": "error",
938
950
  "vitest/prefer-hooks-on-top": "error",
951
+ "vitest/prefer-importing-vitest-globals": "warn",
939
952
  "vitest/prefer-lowercase-title": "error",
940
953
  "vitest/prefer-mock-promise-shorthand": "error",
941
954
  "vitest/prefer-snapshot-hint": "error",
@@ -955,7 +968,8 @@ var vitestStrict = mergeRules(_eslintplugin2.default.configs.recommended, {
955
968
  "vitest/require-mock-type-parameters": "off",
956
969
  "vitest/require-to-throw-message": "error",
957
970
  "vitest/require-top-level-describe": "error",
958
- "vitest/valid-expect-in-promise": "error"
971
+ "vitest/valid-expect-in-promise": "error",
972
+ "vitest/warn-todo": "off"
959
973
  });
960
974
  function vitest(config) {
961
975
  return _typescripteslint2.default.config({
@@ -1018,10 +1032,14 @@ var unicornRecommended = mergeRules(
1018
1032
  // disabled style rules
1019
1033
  "unicorn/prefer-global-this": "off",
1020
1034
  // discarded
1035
+ "unicorn/prefer-import-meta-properties": "off",
1036
+ // not recommended
1021
1037
  "unicorn/prefer-json-parse-buffer": "off",
1022
1038
  // not recommended
1023
1039
  "unicorn/prefer-keyboard-event-key": "off",
1024
1040
  // allow keyCode
1041
+ "unicorn/prefer-node-protocol": "off",
1042
+ // disabled for use import/enforce-node-protocol-usage
1025
1043
  "unicorn/prefer-string-raw": "off",
1026
1044
  // disallow String.raw
1027
1045
  "unicorn/prefer-structured-clone": "off",
package/dist/index.mjs CHANGED
@@ -71,6 +71,7 @@ var importsStrict = mergeRules(
71
71
  },
72
72
  // https://github.com/import-js/eslint-plugin-import?tab=readme-ov-file#static-analysis
73
73
  {
74
+ "import/enforce-node-protocol-usage": "error",
74
75
  "import/no-absolute-path": "error",
75
76
  "import/no-cycle": "error",
76
77
  "import/no-dynamic-require": "error",
@@ -162,7 +163,11 @@ function imports({
162
163
  rules: {
163
164
  "import/no-nodejs-modules": "off"
164
165
  }
165
- } : {},
166
+ } : {
167
+ rules: {
168
+ "import/enforce-node-protocol-usage": "off"
169
+ }
170
+ },
166
171
  typescript ? {
167
172
  extends: [
168
173
  pluginImport.flatConfigs.typescript,
@@ -240,6 +245,7 @@ var jsStrict = mergeRules(
240
245
  "no-promise-executor-return": "error",
241
246
  "no-self-compare": "error",
242
247
  "no-template-curly-in-string": "error",
248
+ "no-unassigned-vars": "error",
243
249
  "no-unmodified-loop-condition": "error",
244
250
  "no-unreachable-loop": "error",
245
251
  "no-use-before-define": "error",
@@ -898,6 +904,7 @@ import pluginTs5 from "typescript-eslint";
898
904
  var vitestStrict = mergeRules(pluginVitest.configs.recommended, {
899
905
  "vitest/consistent-test-filename": "off",
900
906
  "vitest/consistent-test-it": "error",
907
+ "vitest/consistent-vitest-vi": "error",
901
908
  "vitest/max-expects": "off",
902
909
  "vitest/max-nested-describe": "off",
903
910
  "vitest/no-alias-methods": "error",
@@ -910,6 +917,8 @@ var vitestStrict = mergeRules(pluginVitest.configs.recommended, {
910
917
  "vitest/no-duplicate-hooks": "error",
911
918
  "vitest/no-focused-tests": "off",
912
919
  "vitest/no-hooks": "off",
920
+ "vitest/no-importing-vitest-globals": "off",
921
+ // conflict with vitest/prefer-importing-vitest-globals
913
922
  "vitest/no-interpolation-in-snapshots": "error",
914
923
  "vitest/no-large-snapshots": "off",
915
924
  "vitest/no-mocks-import": "off",
@@ -926,6 +935,9 @@ var vitestStrict = mergeRules(pluginVitest.configs.recommended, {
926
935
  "vitest/padding-around-describe-blocks": "error",
927
936
  "vitest/padding-around-expect-groups": "error",
928
937
  "vitest/padding-around-test-blocks": "error",
938
+ "vitest/prefer-called-once": "warn",
939
+ "vitest/prefer-called-times": "off",
940
+ // conflict with vitest/prefer-called-once
929
941
  "vitest/prefer-called-with": "error",
930
942
  "vitest/prefer-comparison-matcher": "error",
931
943
  "vitest/prefer-describe-function-title": "error",
@@ -936,6 +948,7 @@ var vitestStrict = mergeRules(pluginVitest.configs.recommended, {
936
948
  "vitest/prefer-expect-resolves": "error",
937
949
  "vitest/prefer-hooks-in-order": "error",
938
950
  "vitest/prefer-hooks-on-top": "error",
951
+ "vitest/prefer-importing-vitest-globals": "warn",
939
952
  "vitest/prefer-lowercase-title": "error",
940
953
  "vitest/prefer-mock-promise-shorthand": "error",
941
954
  "vitest/prefer-snapshot-hint": "error",
@@ -955,7 +968,8 @@ var vitestStrict = mergeRules(pluginVitest.configs.recommended, {
955
968
  "vitest/require-mock-type-parameters": "off",
956
969
  "vitest/require-to-throw-message": "error",
957
970
  "vitest/require-top-level-describe": "error",
958
- "vitest/valid-expect-in-promise": "error"
971
+ "vitest/valid-expect-in-promise": "error",
972
+ "vitest/warn-todo": "off"
959
973
  });
960
974
  function vitest(config) {
961
975
  return pluginTs5.config({
@@ -1018,10 +1032,14 @@ var unicornRecommended = mergeRules(
1018
1032
  // disabled style rules
1019
1033
  "unicorn/prefer-global-this": "off",
1020
1034
  // discarded
1035
+ "unicorn/prefer-import-meta-properties": "off",
1036
+ // not recommended
1021
1037
  "unicorn/prefer-json-parse-buffer": "off",
1022
1038
  // not recommended
1023
1039
  "unicorn/prefer-keyboard-event-key": "off",
1024
1040
  // allow keyCode
1041
+ "unicorn/prefer-node-protocol": "off",
1042
+ // disabled for use import/enforce-node-protocol-usage
1025
1043
  "unicorn/prefer-string-raw": "off",
1026
1044
  // disallow String.raw
1027
1045
  "unicorn/prefer-structured-clone": "off",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ofk/eslint-config",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "ofk (https://github.com/ofk/)",
@@ -31,6 +31,7 @@
31
31
  "lint:eslint-cjs": "eslint --config eslint.config.cjs .",
32
32
  "lint:prettier": "prettier --check .",
33
33
  "lint:prettier-package-json": "prettier-package-json --list-different",
34
+ "lint:tsc": "tsc",
34
35
  "prelint-fix": "npm run build",
35
36
  "lint-fix": "run-s lint-fix:**",
36
37
  "lint-fix:eslint": "eslint --config eslint.config.mjs --fix .",
@@ -108,32 +109,32 @@
108
109
  },
109
110
  "devDependencies": {
110
111
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
111
- "@eslint/js": "^9.25.0",
112
+ "@eslint/js": "^9.30.1",
112
113
  "@types/confusing-browser-globals": "^1.0.3",
113
114
  "@types/eslint-config-prettier": "^6.11.3",
114
115
  "@types/eslint-plugin-jsx-a11y": "^6.10.0",
115
- "@vitest/eslint-plugin": "^1.1.43",
116
+ "@vitest/eslint-plugin": "^1.3.4",
116
117
  "confusing-browser-globals": "^1.0.11",
117
- "eslint": "^9.25.0",
118
- "eslint-config-prettier": "^10.1.2",
119
- "eslint-plugin-import": "^2.31.0",
118
+ "eslint": "^9.30.1",
119
+ "eslint-config-prettier": "^10.1.5",
120
+ "eslint-plugin-import": "^2.32.0",
120
121
  "eslint-plugin-jsx-a11y": "^6.10.2",
121
- "eslint-plugin-perfectionist": "^4.11.0",
122
+ "eslint-plugin-perfectionist": "^4.15.0",
122
123
  "eslint-plugin-react": "^7.37.5",
123
124
  "eslint-plugin-react-hooks": "^5.2.0",
124
- "eslint-plugin-react-refresh": "^0.4.19",
125
- "eslint-plugin-unicorn": "^58.0.0",
125
+ "eslint-plugin-react-refresh": "^0.4.20",
126
+ "eslint-plugin-unicorn": "^59.0.1",
126
127
  "eslint-plugin-unused-imports": "^4.1.4",
127
- "globals": "^16.0.0",
128
+ "globals": "^16.3.0",
128
129
  "husky": "^9.1.7",
129
- "lint-staged": "^15.5.1",
130
+ "lint-staged": "^16.1.2",
130
131
  "npm-run-all": "^4.1.5",
131
- "prettier": "^3.5.3",
132
+ "prettier": "^3.6.2",
132
133
  "prettier-package-json": "^2.8.0",
133
- "tsup": "^8.4.0",
134
+ "tsup": "^8.5.0",
134
135
  "typescript": "^5.8.3",
135
- "typescript-eslint": "^8.30.1",
136
- "vitest": "^3.1.2"
136
+ "typescript-eslint": "^8.36.0",
137
+ "vitest": "^3.2.4"
137
138
  },
138
139
  "keywords": [],
139
140
  "lint-staged": {