|
3 | 3 | "ignorePatterns": ["!**/*"], |
4 | 4 | "overrides": [ |
5 | 5 | { |
6 | | - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], |
| 6 | + "files": ["*.ts", "*.tsx"], |
7 | 7 | "extends": [ |
8 | 8 | "plugin:tailwindcss/recommended", |
9 | 9 | "plugin:@tanstack/eslint-plugin-query/recommended" |
10 | 10 | ], |
| 11 | + "parserOptions": { |
| 12 | + "projectService": "./apps/client/tsconfig.json" |
| 13 | + }, |
11 | 14 | "settings": { |
12 | 15 | "tailwindcss": { |
13 | 16 | "callees": ["cn", "clsx", "cva"], |
|
39 | 42 | "lingui/no-unlocalized-strings": [ |
40 | 43 | 2, |
41 | 44 | { |
42 | | - "ignoreFunction": ["cn"], |
43 | | - "ignoreAttribute": ["alt"] |
| 45 | + "ignore": [ |
| 46 | + // Ignore strings which are a single "word" (no spaces) |
| 47 | + // and doesn't start with an uppercase letter |
| 48 | + "^(?![A-Z])\\S+$", |
| 49 | + // Ignore UPPERCASE literals |
| 50 | + // Example: const test = "FOO" |
| 51 | + "^[A-Z0-9_-]+$" |
| 52 | + ], |
| 53 | + "ignoreNames": [ |
| 54 | + // Ignore matching className (case-insensitive) |
| 55 | + { "regex": { "pattern": "className", "flags": "i" } }, |
| 56 | + // Ignore UPPERCASE names |
| 57 | + // Example: test.FOO = "ola!" |
| 58 | + { "regex": { "pattern": "^[A-Z0-9_-]+$" } }, |
| 59 | + "id", |
| 60 | + "src", |
| 61 | + "srcSet", |
| 62 | + "styleName", |
| 63 | + "placeholder", |
| 64 | + "alt", |
| 65 | + "type", |
| 66 | + "width", |
| 67 | + "height", |
| 68 | + "displayName", |
| 69 | + "Authorization" |
| 70 | + ], |
| 71 | + "ignoreFunctions": [ |
| 72 | + "cn", |
| 73 | + "cva", |
| 74 | + "track", |
| 75 | + "Error", |
| 76 | + "console.*", |
| 77 | + "*headers.set", |
| 78 | + "*.addEventListener", |
| 79 | + "*.removeEventListener", |
| 80 | + "*.postMessage", |
| 81 | + "*.getElementById", |
| 82 | + "*.dispatch", |
| 83 | + "*.commit", |
| 84 | + "*.includes", |
| 85 | + "*.indexOf", |
| 86 | + "*.endsWith", |
| 87 | + "*.startsWith", |
| 88 | + "require" |
| 89 | + ], |
| 90 | + // Following settings require typed linting https://typescript-eslint.io/getting-started/typed-linting/ |
| 91 | + "useTsTypes": true, |
| 92 | + "ignoreMethodsOnTypes": [ |
| 93 | + // Ignore specified methods on Map and Set types |
| 94 | + "Map.get", |
| 95 | + "Map.has", |
| 96 | + "Set.has" |
| 97 | + ] |
44 | 98 | } |
45 | 99 | ], |
46 | 100 | "lingui/t-call-in-function": 2, |
|
0 commit comments