|
| 1 | +{ |
| 2 | + "extends": [ |
| 3 | + "airbnb", |
| 4 | + "plugin:import/typescript", // this is needed because airbnb uses eslint-plugin-import |
| 5 | + "prettier", |
| 6 | + "plugin:cypress/recommended", |
| 7 | + "plugin:react/recommended", |
| 8 | + "plugin:react-hooks/recommended", |
| 9 | + "plugin:@typescript-eslint/recommended" |
| 10 | + ], |
| 11 | + "plugins": ["@typescript-eslint", "prettier", "react-hooks"], |
| 12 | + "env": { |
| 13 | + "browser": true, |
| 14 | + "node": true, |
| 15 | + "mocha": true, |
| 16 | + "jest": true |
| 17 | + }, |
| 18 | + "globals": { |
| 19 | + "cy": true, |
| 20 | + "Cypress": true |
| 21 | + }, |
| 22 | + "parser": "@typescript-eslint/parser", |
| 23 | + "parserOptions": { |
| 24 | + "ecmaFeatures": { |
| 25 | + "jsx": true |
| 26 | + }, |
| 27 | + "ecmaVersion": "latest", |
| 28 | + "sourceType": "module" |
| 29 | + }, |
| 30 | + "rules": { |
| 31 | + "react/no-array-index-key": "off", |
| 32 | + "react/jsx-props-no-spreading": "off", |
| 33 | + "react/destructuring-assignment": "off", |
| 34 | + "react/require-default-props": "off", |
| 35 | + "react/react-in-jsx-scope": "off", |
| 36 | + "@typescript-eslint/ban-ts-comment": "off", |
| 37 | + "import/no-import-module-exports": "off", |
| 38 | + "import/no-extraneous-dependencies": [ |
| 39 | + "error", |
| 40 | + { |
| 41 | + "devDependencies": true |
| 42 | + } |
| 43 | + ], |
| 44 | + "import/prefer-default-export": "off", |
| 45 | + "prettier/prettier": "error", |
| 46 | + "import/extensions": [ |
| 47 | + "error", |
| 48 | + "ignorePackages", |
| 49 | + { |
| 50 | + "ts": "never", |
| 51 | + "js": "never", |
| 52 | + "tsx": "never" |
| 53 | + } |
| 54 | + ], |
| 55 | + "@typescript-eslint/explicit-function-return-type": [ |
| 56 | + "error", |
| 57 | + { |
| 58 | + "allowExpressions": true |
| 59 | + } |
| 60 | + ], |
| 61 | + "@typescript-eslint/no-var-requires": "off", |
| 62 | + "global-require": "off", |
| 63 | + "react-hooks/rules-of-hooks": "error", |
| 64 | + "react-hooks/exhaustive-deps": "warn", |
| 65 | + "comma-dangle": "off", |
| 66 | + "@typescript-eslint/comma-dangle": "off", |
| 67 | + "react/jsx-one-expression-per-line": "off", |
| 68 | + "react/jsx-filename-extension": [ |
| 69 | + "warn", |
| 70 | + { |
| 71 | + "extensions": [".tsx"] |
| 72 | + } |
| 73 | + ], |
| 74 | + "react/function-component-definition": [ |
| 75 | + 2, |
| 76 | + { |
| 77 | + "namedComponents": "arrow-function" |
| 78 | + } |
| 79 | + ], |
| 80 | + // eslint rule reports false error |
| 81 | + "no-shadow": "off", |
| 82 | + "@typescript-eslint/no-shadow": ["error"] |
| 83 | + }, |
| 84 | + "settings": { |
| 85 | + "import/extensions": [".js", ".jsx", ".ts", ".tsx"], |
| 86 | + "import/parsers": { |
| 87 | + "@typescript-eslint/parser": [".ts", ".tsx"] |
| 88 | + }, |
| 89 | + "import/resolver": { |
| 90 | + "typescript": { |
| 91 | + "alwaysTryTypes": true |
| 92 | + }, |
| 93 | + "node": { |
| 94 | + "extensions": [".js", ".jsx", ".ts", ".tsx"] |
| 95 | + } |
| 96 | + } |
| 97 | + } |
| 98 | +} |
0 commit comments