@geops/eslint-config-react 1.3.1 → 1.4.0-beta.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.
Files changed (3) hide show
  1. package/flat/index.mjs +58 -0
  2. package/index.js +5 -0
  3. package/package.json +16 -8
package/flat/index.mjs ADDED
@@ -0,0 +1,58 @@
1
+ import { FlatCompat } from "@eslint/eslintrc";
2
+ import eslint from "@eslint/js";
3
+ import jsxA11y from "eslint-plugin-jsx-a11y";
4
+ import perfectionist from "eslint-plugin-perfectionist";
5
+ import prettier from "eslint-plugin-prettier/recommended";
6
+ import react from "eslint-plugin-react";
7
+ import tailwind from "eslint-plugin-tailwindcss";
8
+ import tseslint from "typescript-eslint";
9
+ import pluginCypress from 'eslint-plugin-cypress/flat';
10
+ import globals from "globals";
11
+ // FlatCompat convert old definition to the new ones
12
+ const compat = new FlatCompat();
13
+
14
+ export default [
15
+ {
16
+ ignores: ["build/*", "node_modules/*"],
17
+ languageOptions: {
18
+ globals: {
19
+ ...globals.browser,
20
+ ...globals.es2020,
21
+ ...globals.node,
22
+ ...globals.jest,
23
+ ...globals.mocha,
24
+ ...globals.vitest,
25
+ ...pluginCypress.globals,
26
+ }
27
+ },
28
+ settings: {
29
+ react: { version: "detect" },
30
+ },
31
+ },
32
+ pluginCypress.configs.globals,
33
+ // jestConfig.configs['flat/recommended'],
34
+ ...tseslint.config(
35
+ eslint.configs.recommended,
36
+ tseslint.configs.strict,
37
+ tseslint.configs.stylistic,
38
+ react.configs.flat.recommended,
39
+ react.configs.flat["jsx-runtime"], // Avoid having the React-in-jsx-scope rule activated
40
+ ...compat.config({
41
+ extends: ["plugin:react-hooks/recommended"],
42
+ rules: {
43
+ "react-hooks/exhaustive-deps": "error",
44
+ },
45
+ }),
46
+ jsxA11y.flatConfigs.recommended,
47
+ perfectionist.configs["recommended-alphabetical"],
48
+ prettier,
49
+ ...tailwind.configs["flat/recommended"],
50
+ {
51
+ rules: {
52
+ "arrow-body-style": ["error", "always"],
53
+ curly: "error",
54
+ "@typescript-eslint/no-empty-function": "off",
55
+ },
56
+ },
57
+ ),
58
+ ];
package/index.js CHANGED
@@ -7,6 +7,7 @@ module.exports = {
7
7
  "plugin:@typescript-eslint/stylistic-type-checked",
8
8
  "plugin:cypress/recommended",
9
9
  "plugin:jsx-a11y/recommended",
10
+ "plugin:mocha/recommended",
10
11
  "plugin:perfectionist/recommended-alphabetical-legacy",
11
12
  "plugin:react/recommended",
12
13
  "plugin:react/jsx-runtime",
@@ -47,9 +48,13 @@ module.exports = {
47
48
  internalPattern: ["^@/.*"],
48
49
  },
49
50
  ],
51
+ "mocha/no-exclusive-tests": "error",
52
+ "mocha/no-skipped-tests": "error",
53
+ "mocha/no-mocha-arrows": "off",
50
54
  "no-nested-ternary": "error",
51
55
  "no-param-reassign": "error",
52
56
  "no-restricted-globals": ["error"].concat(confusingBrowserGlobals),
57
+ "perfectionist/sort-modules": "off",
53
58
  "react-compiler/react-compiler": "error",
54
59
  "react/destructuring-assignment": "error",
55
60
  "@typescript-eslint/no-shadow": "error",
package/package.json CHANGED
@@ -1,16 +1,24 @@
1
1
  {
2
2
  "name": "@geops/eslint-config-react",
3
- "version": "1.3.1",
3
+ "version": "1.4.0-beta.0",
4
4
  "dependencies": {
5
- "@typescript-eslint/eslint-plugin": "^8.15.0",
6
- "@typescript-eslint/parser": "^8.15.0",
7
- "eslint-config-prettier": "^9.1.0",
5
+ "eslint-config-prettier": "^10.0.1",
8
6
  "eslint-plugin-cypress": "^4.1.0",
7
+ "eslint-plugin-jest": "^28.11.0",
9
8
  "eslint-plugin-jsx-a11y": "^6.10.2",
10
- "eslint-plugin-perfectionist": "^4.0.3",
11
- "eslint-plugin-react": "^7.37.2",
12
- "eslint-plugin-react-compiler": "^19.0.0-beta-0dec889-20241115",
13
- "eslint-plugin-react-hooks": "^5.0.0"
9
+ "eslint-plugin-mocha": "^10.5.0",
10
+ "eslint-plugin-perfectionist": "^4.7.0",
11
+ "eslint-plugin-prettier": "^5.2.3",
12
+ "eslint-plugin-react": "^7.37.4",
13
+ "eslint-plugin-react-compiler": "^19.0.0-beta-27714ef-20250124",
14
+ "eslint-plugin-react-hooks": "^5.1.0",
15
+ "eslint-plugin-tailwindcss": "^3.18.0",
16
+ "globals": "^15.14.0",
17
+ "typescript-eslint": "^8.22.0"
18
+ },
19
+ "exports": {
20
+ ".": "./index.js",
21
+ "./flat": "./flat/index.mjs"
14
22
  },
15
23
  "peerDependencies": {
16
24
  "eslint": "^8 || ^9",