@geops/eslint-config-react 1.5.0-beta.0 → 1.5.0-beta.2

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/README.md CHANGED
@@ -8,7 +8,7 @@ npm install --save-dev @geops/eslint-config-react
8
8
 
9
9
  ## Using flat config (eslint >= 9)
10
10
 
11
- Then, create a `.eslintrc.mjs` file in the root of your project with the following content:
11
+ Then, create a `eslint.config.mjs` file in the root of your project with the following content:
12
12
 
13
13
  ```javascript
14
14
  import geopsFlatConfig from '@geops/eslint-config-react/flat';
package/flat/index.mjs CHANGED
@@ -4,9 +4,8 @@ import jsxA11y from "eslint-plugin-jsx-a11y";
4
4
  import perfectionist from "eslint-plugin-perfectionist";
5
5
  import prettier from "eslint-plugin-prettier/recommended";
6
6
  import react from "eslint-plugin-react";
7
- import tailwind from "eslint-plugin-tailwindcss";
8
7
  import tseslint from "typescript-eslint";
9
- import pluginCypress from 'eslint-plugin-cypress/flat';
8
+ import pluginCypress from "eslint-plugin-cypress/flat";
10
9
  import globals from "globals";
11
10
  // FlatCompat convert old definition to the new ones
12
11
  const compat = new FlatCompat();
@@ -23,7 +22,7 @@ export default [
23
22
  ...globals.mocha,
24
23
  ...globals.vitest,
25
24
  ...pluginCypress.globals,
26
- }
25
+ },
27
26
  },
28
27
  settings: {
29
28
  react: { version: "detect" },
@@ -46,13 +45,24 @@ export default [
46
45
  jsxA11y.flatConfigs.recommended,
47
46
  perfectionist.configs["recommended-alphabetical"],
48
47
  prettier,
49
- ...tailwind.configs["flat/recommended"],
50
48
  {
51
49
  rules: {
52
- "arrow-body-style": ["error", "always"],
50
+ "@next/next/google-font-display": "warn",
51
+ "@next/next/google-font-preconnect": "warn",
52
+ "@next/next/no-page-custom-font": "warn",
53
+ "@next/next/no-img-element": "warn",
54
+ "@typescript-eslint/no-empty-function": "warn",
55
+ "@typescript-eslint/no-unsafe-member-access": "warn",
56
+ "@typescript-eslint/no-unsafe-call": "warn",
57
+ "@typescript-eslint/no-unsafe-assignment": "warn",
58
+ "@typescript-eslint/prefer-nullish-coalescing": "warn",
53
59
  curly: "error",
54
- "@typescript-eslint/no-empty-function": "off",
60
+ "arrow-body-style": ["error", "always"],
61
+ "no-console": "warn",
62
+ "prefer-template": "error",
63
+ "react-hooks/exhaustive-deps": "error",
64
+ "react-compiler/react-compiler": "warn",
55
65
  },
56
- },
66
+ }
57
67
  ),
58
68
  ];
package/index.js CHANGED
@@ -20,7 +20,12 @@ module.exports = {
20
20
  },
21
21
  plugins: ["eslint-plugin-react-compiler"],
22
22
  rules: {
23
- "import/order": "off",
23
+ "arrow-body-style": ["error", "always"],
24
+ curly: "error",
25
+ "no-console": "warn",
26
+ "prefer-template": "error",
27
+ "react-hooks/exhaustive-deps": "error",
28
+ "react-compiler/react-compiler": "warn",
24
29
  "jsx-a11y/click-events-have-key-events": "error",
25
30
  "perfectionist/sort-imports": [
26
31
  "error",
@@ -57,8 +62,18 @@ module.exports = {
57
62
  "perfectionist/sort-modules": "off",
58
63
  "react-compiler/react-compiler": "error",
59
64
  "react/destructuring-assignment": "error",
65
+ "@next/next/google-font-display": "warn",
66
+ "@next/next/google-font-preconnect": "warn",
67
+ "@next/next/no-page-custom-font": "warn",
68
+ "@next/next/no-img-element": "warn",
69
+ "@typescript-eslint/consistent-type-imports": "error",
60
70
  "@typescript-eslint/no-shadow": "error",
61
71
  "@typescript-eslint/no-use-before-define": "error",
72
+ "@typescript-eslint/no-empty-function": "warn",
73
+ "@typescript-eslint/no-unsafe-member-access": "warn",
74
+ "@typescript-eslint/no-unsafe-call": "warn",
75
+ "@typescript-eslint/no-unsafe-assignment": "warn",
76
+ "@typescript-eslint/prefer-nullish-coalescing": "warn",
62
77
  },
63
78
  settings: {
64
79
  react: { version: "detect" },