|
1 | 1 | { |
| 2 | + "settings": { |
| 3 | + "react": { |
| 4 | + "version": "detect" |
| 5 | + } |
| 6 | + }, |
| 7 | + "env": { |
| 8 | + "browser": true, |
| 9 | + "es2021": true, |
| 10 | + "node": true |
| 11 | + }, |
2 | 12 | "extends": [ |
3 | | - "next/core-web-vitals", |
4 | | - "plugin:react-hooks/recommended" |
| 13 | + "eslint:recommended", |
| 14 | + "plugin:react/recommended", |
| 15 | + "plugin:react-hooks/recommended", |
| 16 | + "plugin:jsx-a11y/recommended", |
| 17 | + "plugin:prettier/recommended", |
| 18 | + "plugin:@next/next/recommended" |
5 | 19 | ], |
6 | | - "parser": "@typescript-eslint/parser", |
7 | | - "parserOptions": { "project": ["./tsconfig.json"] }, |
8 | | - "plugins": [ |
9 | | - "@typescript-eslint" |
10 | | - ], |
11 | | - "rules": { |
12 | | - "@typescript-eslint/strict-boolean-expressions": [ |
13 | | - 2, |
14 | | - { |
15 | | - "allowString" : false, |
16 | | - "allowNumber" : false |
17 | | - } |
18 | | - ] |
| 20 | + "parserOptions": { |
| 21 | + "ecmaFeatures": { |
| 22 | + "jsx": true |
19 | 23 | }, |
20 | | - "ignorePatterns": ["src/**/*.test.ts", "src/frontend/generated/*"] |
| 24 | + "ecmaVersion": 12, |
| 25 | + "sourceType": "module" |
| 26 | + }, |
| 27 | + "plugins": ["react", "jsx-a11y", "simple-import-sort"], |
| 28 | + "rules": { |
| 29 | + "react/react-in-jsx-scope": "off", |
| 30 | + "jsx-a11y/anchor-is-valid": "off", |
| 31 | + "simple-import-sort/imports": "error", |
| 32 | + "simple-import-sort/exports": "error" |
| 33 | + }, |
| 34 | + "overrides": [ |
| 35 | + { |
| 36 | + "files": ["**/*.ts", "**/*.tsx"], |
| 37 | + "parser": "@typescript-eslint/parser", |
| 38 | + "plugins": ["@typescript-eslint"], |
| 39 | + "extends": ["plugin:@typescript-eslint/recommended"], |
| 40 | + "rules": { |
| 41 | + "react/prop-types": "off", |
| 42 | + "@typescript-eslint/no-unused-vars": "error", |
| 43 | + "@typescript-eslint/explicit-function-return-type": [ |
| 44 | + "warn", |
| 45 | + { |
| 46 | + "allowExpressions": true, |
| 47 | + "allowConciseArrowFunctionExpressionsStartingWithVoid": true |
| 48 | + } |
| 49 | + ], |
| 50 | + "@typescript-eslint/ban-ts-comment": "warn", |
| 51 | + "simple-import-sort/imports": [ |
| 52 | + "error", |
| 53 | + { |
| 54 | + "groups": [ |
| 55 | + ["^react", "^@?\\w"], |
| 56 | + ["^(@|components)(/.*|$)"], |
| 57 | + ["^\\u0000"], |
| 58 | + ["^\\.\\.(?!/?$)", "^\\.\\./?$"], |
| 59 | + ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"], |
| 60 | + ["^.+\\.?(css)$"] |
| 61 | + ] |
| 62 | + } |
| 63 | + ] |
| 64 | + } |
| 65 | + } |
| 66 | + ] |
21 | 67 | } |
0 commit comments