|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "browser": true, |
| 4 | + "es2021": true, |
| 5 | + "node": true |
| 6 | + }, |
| 7 | + "extends": [ |
| 8 | + "plugin:react/recommended", |
| 9 | + "plugin:react-hooks/recommended", |
| 10 | + "plugin:@typescript-eslint/recommended", |
| 11 | + "plugin:prettier/recommended" |
| 12 | + ], |
| 13 | + "parser": "@typescript-eslint/parser", |
| 14 | + "parserOptions": { |
| 15 | + "ecmaFeatures": { |
| 16 | + "jsx": true |
| 17 | + }, |
| 18 | + "ecmaVersion": "latest", |
| 19 | + "sourceType": "module", |
| 20 | + "project": "./tsconfig.json" |
| 21 | + }, |
| 22 | + "plugins": [ |
| 23 | + "react", |
| 24 | + "@typescript-eslint", |
| 25 | + "simple-import-sort", |
| 26 | + "unused-imports", |
| 27 | + "import", |
| 28 | + "prettier" |
| 29 | + ], |
| 30 | + "rules": { |
| 31 | + "react/react-in-jsx-scope": "off", |
| 32 | + "prettier/prettier": ["error", { "endOfLine": "auto" }], |
| 33 | + "import/order": [ |
| 34 | + "error", |
| 35 | + { |
| 36 | + "groups": [ |
| 37 | + "builtin", |
| 38 | + "external", |
| 39 | + "index", |
| 40 | + "sibling", |
| 41 | + "parent", |
| 42 | + "internal", |
| 43 | + "object", |
| 44 | + "type" |
| 45 | + ] |
| 46 | + } |
| 47 | + ], |
| 48 | + "@typescript-eslint/no-use-before-define": [ |
| 49 | + "error", |
| 50 | + { "functions": false, "classes": true, "variables": true, "typedefs": true } |
| 51 | + ], |
| 52 | + "import/no-extraneous-dependencies": [ |
| 53 | + "error", |
| 54 | + { |
| 55 | + "devDependencies": [".storybook/**", "src/**/*.stories.@(js|jsx|ts|tsx)"] |
| 56 | + } |
| 57 | + ], |
| 58 | + "import/prefer-default-export": "off", |
| 59 | + "react/function-component-definition": [ |
| 60 | + 2, |
| 61 | + { |
| 62 | + "namedComponents": "arrow-function", |
| 63 | + "unnamedComponents": "arrow-function" |
| 64 | + } |
| 65 | + ], |
| 66 | + "no-prototype-builtins": "off", |
| 67 | + "import/no-default-export": "off", |
| 68 | + "import/no-unresolved": "error", |
| 69 | + "dot-notation": "off", |
| 70 | + "@typescript-eslint/dot-notation": ["error", {}], |
| 71 | + "@typescript-eslint/explicit-function-return-type": "off", |
| 72 | + "react/destructuring-assignment": "off", |
| 73 | + "react/jsx-filename-extension": [2, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }], |
| 74 | + "no-use-before-define": ["error", { "functions": false, "classes": true, "variables": true }], |
| 75 | + "import/extensions": [ |
| 76 | + "error", |
| 77 | + "ignorePackages", |
| 78 | + { |
| 79 | + "js": "never", |
| 80 | + "jsx": "never", |
| 81 | + "ts": "never", |
| 82 | + "tsx": "never" |
| 83 | + } |
| 84 | + ], |
| 85 | + "jest/no-disabled-tests": "warn", |
| 86 | + "jest/no-focused-tests": "error", |
| 87 | + "jest/no-identical-title": "error", |
| 88 | + "jest/prefer-to-have-length": "warn", |
| 89 | + "jest/valid-expect": "error", |
| 90 | + "no-unused-vars": "off", |
| 91 | + "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], |
| 92 | + "simple-import-sort/imports": [ |
| 93 | + "error", |
| 94 | + { |
| 95 | + "groups": [ |
| 96 | + ["^react", "^@?\\w"], |
| 97 | + ["^\\u0000"], |
| 98 | + ["^\\.\\.(?!/?$)", "^\\.\\./?$"], |
| 99 | + ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"] |
| 100 | + ] |
| 101 | + } |
| 102 | + ], |
| 103 | + "arrow-body-style": ["error", "as-needed"], |
| 104 | + "unused-imports/no-unused-imports": ["error"], |
| 105 | + "sort-imports": "off", |
| 106 | + "import/first": "error", |
| 107 | + "import/newline-after-import": "error", |
| 108 | + "import/no-duplicates": "error" |
| 109 | + }, |
| 110 | + "settings": { |
| 111 | + "import/parsers": { |
| 112 | + "@typescript-eslint/parser": [".ts", ".tsx"] |
| 113 | + }, |
| 114 | + "import/resolver": { |
| 115 | + "typescript": { |
| 116 | + "alwaysTryTypes": true |
| 117 | + } |
| 118 | + }, |
| 119 | + "react": { |
| 120 | + "version": "detect" |
| 121 | + } |
| 122 | + } |
| 123 | +} |
0 commit comments