|
1 | 1 | { |
2 | | - "extends": ["next", "next/core-web-vitals", "eslint:recommended"], |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "es2021": true, |
| 6 | + "node": true |
| 7 | + }, |
3 | 8 | "globals": { |
4 | 9 | "React": "readonly" |
5 | 10 | }, |
| 11 | + "parser": "@typescript-eslint/parser", |
| 12 | + "parserOptions": { |
| 13 | + "ecmaVersion": "latest", |
| 14 | + "sourceType": "module" |
| 15 | + }, |
| 16 | + "plugins": [ |
| 17 | + "react", |
| 18 | + "jsx-a11y", |
| 19 | + "@typescript-eslint", |
| 20 | + "import", |
| 21 | + "react-hooks", |
| 22 | + "prettier" |
| 23 | + ], |
| 24 | + "extends": [ |
| 25 | + "eslint:recommended", |
| 26 | + "plugin:react/recommended", |
| 27 | + "plugin:@typescript-eslint/recommended", |
| 28 | + "plugin:jsx-a11y/recommended", |
| 29 | + "plugin:import/errors", |
| 30 | + "plugin:import/warnings", |
| 31 | + "plugin:import/typescript", |
| 32 | + "plugin:react-hooks/recommended", |
| 33 | + "next", |
| 34 | + "next/core-web-vitals", |
| 35 | + "plugin:prettier/recommended" |
| 36 | + ], |
| 37 | + "settings": { |
| 38 | + "react": { |
| 39 | + "version": "detect" |
| 40 | + }, |
| 41 | + "import/resolver": { |
| 42 | + "node": { |
| 43 | + "extensions": [".ts", ".tsx"] |
| 44 | + } |
| 45 | + } |
| 46 | + }, |
| 47 | + "overrides": [ |
| 48 | + { |
| 49 | + "files": [ |
| 50 | + "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", |
| 51 | + "./src/_components/**/*.{js,ts,jsx,tsx,mdx}", |
| 52 | + "./src/app/**/*.{js,ts,jsx,tsx,mdx}" |
| 53 | + ], |
| 54 | + "rules": { |
| 55 | + "import/order": [ |
| 56 | + "error", |
| 57 | + { |
| 58 | + "groups": [ |
| 59 | + "builtin", |
| 60 | + "external", |
| 61 | + "internal", |
| 62 | + ["parent", "sibling"], |
| 63 | + "index", |
| 64 | + "object", |
| 65 | + "type" |
| 66 | + ], |
| 67 | + "pathGroups": [ |
| 68 | + { |
| 69 | + "pattern": "./**/**\\.css", |
| 70 | + "group": "type", |
| 71 | + "position": "after" |
| 72 | + } |
| 73 | + ], |
| 74 | + "pathGroupsExcludedImportTypes": ["builtin"], |
| 75 | + "alphabetize": { |
| 76 | + "order": "asc", |
| 77 | + "caseInsensitive": true |
| 78 | + }, |
| 79 | + "newlines-between": "always", |
| 80 | + "warnOnUnassignedImports": true |
| 81 | + } |
| 82 | + ] |
| 83 | + } |
| 84 | + } |
| 85 | + ], |
6 | 86 | "rules": { |
| 87 | + "prettier/prettier": "error", |
| 88 | + "react/react-in-jsx-scope": "off", |
| 89 | + "import/order": [ |
| 90 | + "error", |
| 91 | + { |
| 92 | + "groups": [ |
| 93 | + "builtin", |
| 94 | + "external", |
| 95 | + "internal", |
| 96 | + "parent", |
| 97 | + "sibling", |
| 98 | + "index", |
| 99 | + "object", |
| 100 | + "type" |
| 101 | + ], |
| 102 | + "newlines-between": "always", |
| 103 | + "alphabetize": { |
| 104 | + "order": "asc", |
| 105 | + "caseInsensitive": true |
| 106 | + } |
| 107 | + } |
| 108 | + ], |
| 109 | + "jsx-a11y/anchor-is-valid": [ |
| 110 | + "error", |
| 111 | + { |
| 112 | + "aspects": ["invalidHref", "preferButton"] |
| 113 | + } |
| 114 | + ], |
| 115 | + "@typescript-eslint/explicit-function-return-type": [ |
| 116 | + "off", |
| 117 | + { |
| 118 | + "allowExpressions": true, |
| 119 | + "allowTypedFunctionExpressions": true |
| 120 | + } |
| 121 | + ], |
| 122 | + "@typescript-eslint/no-explicit-any": "warn", |
| 123 | + "@typescript-eslint/no-unused-vars": [ |
| 124 | + "warn", |
| 125 | + { |
| 126 | + "argsIgnorePattern": "^_" |
| 127 | + } |
| 128 | + ], |
| 129 | + "jsx-a11y/click-events-have-key-events": "off", |
| 130 | + "jsx-a11y/no-noninteractive-element-interactions": "off", |
| 131 | + "jsx-a11y/no-static-element-interactions": "off", |
7 | 132 | "no-unused-vars": "off", |
8 | | - "no-unused-expressions": "warn" |
| 133 | + "no-unused-expressions": "warn", |
| 134 | + "quotes": [ |
| 135 | + "error", |
| 136 | + "double", |
| 137 | + { |
| 138 | + "avoidEscape": true |
| 139 | + } |
| 140 | + ], |
| 141 | + "comma-dangle": ["error", "always-multiline"] |
9 | 142 | } |
10 | 143 | } |
0 commit comments