@vinicunca/eslint-config 2.7.0 → 2.7.1

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
@@ -183,9 +183,6 @@ var parserPlain = {
183
183
  }
184
184
  })
185
185
  };
186
- function toArray(value) {
187
- return Array.isArray(value) ? value : [value];
188
- }
189
186
 
190
187
  // src/configs/stylistic.ts
191
188
  var STR_PARENS_NEW_LINE = "parens-new-line";
@@ -1035,18 +1032,21 @@ async function react(options = {}) {
1035
1032
  } = options;
1036
1033
  const [
1037
1034
  pluginReact,
1038
- pluginReactHooks
1035
+ pluginReactHooks,
1036
+ parserTs
1039
1037
  ] = await Promise.all([
1038
+ interopDefault(import("@eslint-react/eslint-plugin")),
1040
1039
  // @ts-expect-error missing types
1041
- interopDefault(import("eslint-plugin-react")),
1042
- // @ts-expect-error missing types
1043
- interopDefault(import("eslint-plugin-react-hooks"))
1040
+ interopDefault(import("eslint-plugin-react-hooks")),
1041
+ interopDefault(import("@typescript-eslint/parser"))
1044
1042
  ]);
1043
+ const plugins = pluginReact.configs.all.plugins;
1045
1044
  return [
1046
1045
  {
1047
1046
  name: "vinicunca/react/setup",
1048
1047
  plugins: {
1049
- "react": pluginReact,
1048
+ "react": plugins["@eslint-react"],
1049
+ "react-dom": plugins["@eslint-react/dom"],
1050
1050
  "react-hooks": pluginReactHooks
1051
1051
  },
1052
1052
  settings: {
@@ -1058,11 +1058,13 @@ async function react(options = {}) {
1058
1058
  {
1059
1059
  files,
1060
1060
  languageOptions: {
1061
+ parser: parserTs,
1061
1062
  parserOptions: {
1062
1063
  ecmaFeatures: {
1063
1064
  jsx: true
1064
1065
  }
1065
- }
1066
+ },
1067
+ sourceType: "module"
1066
1068
  },
1067
1069
  name: "vinicunca/react/rules",
1068
1070
  rules: {
@@ -1435,7 +1437,7 @@ async function typescript(options = {}) {
1435
1437
  const ignoresTypeAware = options.ignoresTypeAware ?? [
1436
1438
  `${GLOB_MARKDOWN}/**`
1437
1439
  ];
1438
- const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
1440
+ const tsconfigPath = options?.tsconfigPath ? options.tsconfigPath : void 0;
1439
1441
  const isTypeAware = !!tsconfigPath;
1440
1442
  const typeAwareRules = {
1441
1443
  "dot-notation": OFF,
@@ -2117,7 +2119,6 @@ export {
2117
2119
  sortTsconfig,
2118
2120
  stylistic,
2119
2121
  test,
2120
- toArray,
2121
2122
  typescript,
2122
2123
  unicorn,
2123
2124
  unocss,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "2.7.0",
4
+ "version": "2.7.1",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",
@@ -58,10 +58,11 @@
58
58
  "eslint": ">=8.57.0"
59
59
  },
60
60
  "dependencies": {
61
+ "@eslint-react/eslint-plugin": "^1.5.26",
61
62
  "@stylistic/eslint-plugin": "^2.6.0-beta.0",
62
63
  "@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
63
64
  "@typescript-eslint/parser": "8.0.0-alpha.40",
64
- "@unocss/eslint-plugin": "^0.61.2",
65
+ "@unocss/eslint-plugin": "^0.61.3",
65
66
  "eslint-config-flat-gitignore": "^0.1.7",
66
67
  "eslint-flat-config-utils": "^0.2.5",
67
68
  "eslint-merge-processors": "^0.1.0",
@@ -75,7 +76,6 @@
75
76
  "eslint-plugin-n": "^17.9.0",
76
77
  "eslint-plugin-no-only-tests": "^3.1.0",
77
78
  "eslint-plugin-perfectionist": "^2.11.0",
78
- "eslint-plugin-react": "^7.34.4",
79
79
  "eslint-plugin-react-hooks": "^4.6.2",
80
80
  "eslint-plugin-regexp": "^2.6.0",
81
81
  "eslint-plugin-sonarjs": "^1.0.3",