|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "es2021": true |
| 6 | + }, |
| 7 | + "extends": [ |
| 8 | + "eslint:recommended", |
| 9 | + "plugin:@typescript-eslint/recommended", |
| 10 | + "plugin:react/recommended", |
| 11 | + "plugin:react/jsx-runtime", |
| 12 | + "plugin:react-hooks/recommended", |
| 13 | + "prettier" |
| 14 | + ], |
| 15 | + "parser": "@typescript-eslint/parser", |
| 16 | + "parserOptions": { |
| 17 | + "ecmaVersion": "latest", |
| 18 | + "sourceType": "module", |
| 19 | + "ecmaFeatures": { |
| 20 | + "jsx": true |
| 21 | + } |
| 22 | + }, |
| 23 | + "plugins": ["@typescript-eslint", "react", "react-hooks", "react-refresh", "check-file"], |
| 24 | + "settings": { |
| 25 | + "react": { |
| 26 | + "version": "detect" |
| 27 | + } |
| 28 | + }, |
| 29 | + "rules": { |
| 30 | + "@typescript-eslint/no-unused-vars": "warn", |
| 31 | + "react/prop-types": "off", |
| 32 | + "no-console": "warn", |
| 33 | + "react-refresh/only-export-components": ["warn", { "allowConstantExport": true }], |
| 34 | + |
| 35 | + "check-file/folder-naming-convention": [ |
| 36 | + "error", |
| 37 | + { "src/**/": "KEBAB_CASE" } |
| 38 | + ], |
| 39 | + "check-file/filename-naming-convention": [ |
| 40 | + "error", |
| 41 | + { |
| 42 | + "src/**/!(*main|*vite-env)*.tsx": "PASCAL_CASE", |
| 43 | + "src/**/!(*vite-env)*.ts": "CAMEL_CASE" |
| 44 | + }, |
| 45 | + { "ignoreMiddleExtensions": true } |
| 46 | + ], |
| 47 | + |
| 48 | + "@typescript-eslint/naming-convention": [ |
| 49 | + "error", |
| 50 | + { |
| 51 | + "selector": "variable", |
| 52 | + "format": ["camelCase", "UPPER_CASE", "PascalCase"], |
| 53 | + "leadingUnderscore": "allow" |
| 54 | + }, |
| 55 | + { |
| 56 | + "selector": "variable", |
| 57 | + "modifiers": ["const", "exported"], |
| 58 | + "types": ["function"], |
| 59 | + "format": ["camelCase", "PascalCase"] |
| 60 | + }, |
| 61 | + { |
| 62 | + "selector": "function", |
| 63 | + "format": ["camelCase", "PascalCase"] |
| 64 | + }, |
| 65 | + { |
| 66 | + "selector": "typeLike", |
| 67 | + "format": ["PascalCase"] |
| 68 | + }, |
| 69 | + { |
| 70 | + "selector": "enumMember", |
| 71 | + "format": ["UPPER_CASE"] |
| 72 | + } |
| 73 | + ] |
| 74 | + } |
| 75 | +} |
0 commit comments