|
13 | 13 | "bracketSameLine": false, |
14 | 14 | "bracketSpacing": true, |
15 | 15 | "expand": "auto", |
16 | | - "useEditorconfig": true |
| 16 | + "useEditorconfig": true, |
| 17 | + "includes": ["src/**", "!dist"] |
17 | 18 | }, |
18 | 19 | "linter": { |
19 | 20 | "enabled": true, |
| 21 | + "domains": { |
| 22 | + "react": "all" |
| 23 | + }, |
20 | 24 | "rules": { |
21 | 25 | "recommended": false, |
22 | 26 | "complexity": { |
|
25 | 29 | "noExtraBooleanCast": "error", |
26 | 30 | "noUselessCatch": "error", |
27 | 31 | "noUselessEscapeInRegex": "error", |
| 32 | + "noUselessThisAlias": "error", |
28 | 33 | "noUselessTypeConstraint": "error" |
29 | 34 | }, |
30 | 35 | "correctness": { |
|
46 | 51 | "noUnsafeFinally": "error", |
47 | 52 | "noUnsafeOptionalChaining": "error", |
48 | 53 | "noUnusedLabels": "error", |
| 54 | + "noUnusedImports": "error", |
49 | 55 | "noUnusedVariables": "error", |
50 | 56 | "useExhaustiveDependencies": "warn", |
51 | 57 | "useHookAtTopLevel": "error", |
|
54 | 60 | "useValidTypeof": "error", |
55 | 61 | "useYield": "error" |
56 | 62 | }, |
| 63 | + "nursery": { "noTsIgnore": "error", "noUselessBackrefInRegex": "error" }, |
57 | 64 | "style": { |
58 | 65 | "noNamespace": "error", |
59 | 66 | "useArrayLiterals": "error", |
60 | | - "useAsConstAssertion": "error" |
| 67 | + "useAsConstAssertion": "error", |
| 68 | + "useComponentExportOnlyModules": "warn", |
| 69 | + "useNamingConvention": { |
| 70 | + "level": "warn", |
| 71 | + "options": { |
| 72 | + "strictCase": false, |
| 73 | + "requireAscii": true, |
| 74 | + "conventions": [ |
| 75 | + { "selector": { "kind": "class" }, "match": "([^_]*)", "formats": ["PascalCase"] }, |
| 76 | + { |
| 77 | + "selector": { "kind": "classProperty", "modifiers": ["readonly", "static"] }, |
| 78 | + "match": "[^_]((.*)[^_])?", |
| 79 | + "formats": ["CONSTANT_CASE"] |
| 80 | + }, |
| 81 | + { "selector": { "kind": "classMethod" }, "match": "([^_]*)", "formats": ["camelCase"] }, |
| 82 | + { |
| 83 | + "selector": { "kind": "classMember", "modifiers": ["private"] }, |
| 84 | + "match": "_([^_]*)", |
| 85 | + "formats": ["camelCase"] |
| 86 | + }, |
| 87 | + |
| 88 | + { "selector": { "kind": "enumMember" }, "match": "[^_]((.*)[^_])?", "formats": ["CONSTANT_CASE"] }, |
| 89 | + { "selector": { "kind": "function" }, "match": "([^_]*)", "formats": ["camelCase"] }, |
| 90 | + |
| 91 | + { "selector": { "kind": "objectLiteralMethod" }, "match": "([^_]*)", "formats": ["camelCase"] }, |
| 92 | + { |
| 93 | + "selector": { "kind": "objectLiteralProperty" }, |
| 94 | + "match": "[^_]((.*)[^_])?", |
| 95 | + "formats": ["camelCase", "snake_case", "PascalCase", "CONSTANT_CASE"] |
| 96 | + }, |
| 97 | + { "selector": { "kind": "typeMethod" }, "match": "(.*)[^_]", "formats": ["camelCase"] }, |
| 98 | + { "selector": { "kind": "typeProperty" }, "match": "(.*)[^_]", "formats": ["camelCase", "PascalCase"] }, |
| 99 | + { "selector": { "kind": "classMethod" }, "match": "(.*)[^_]", "formats": ["camelCase"] }, |
| 100 | + { |
| 101 | + "selector": { "kind": "importNamespace" }, |
| 102 | + "match": "([^_]*)", |
| 103 | + "formats": ["camelCase", "PascalCase", "CONSTANT_CASE"] |
| 104 | + }, |
| 105 | + { |
| 106 | + "selector": { "kind": "importAlias" }, |
| 107 | + "match": "([^_]*)", |
| 108 | + "formats": ["camelCase", "PascalCase", "CONSTANT_CASE"] |
| 109 | + }, |
| 110 | + |
| 111 | + { "selector": { "kind": "functionParameter" }, "match": "([^_]*)", "formats": ["camelCase"] }, |
| 112 | + { |
| 113 | + "selector": { "kind": "const" }, |
| 114 | + "match": "[^_]((.*)[^_])?", |
| 115 | + "formats": ["PascalCase", "camelCase", "CONSTANT_CASE"] |
| 116 | + }, |
| 117 | + { "selector": { "kind": "variable" }, "match": "[^_]((.*)[^_])?", "formats": ["camelCase"] }, |
| 118 | + { "selector": { "kind": "typeLike" }, "match": "([^_]*)", "formats": ["PascalCase", "camelCase"] }, |
| 119 | + { "match": "_?([^_]*)", "formats": ["camelCase"] } |
| 120 | + ] |
| 121 | + } |
| 122 | + } |
61 | 123 | }, |
62 | 124 | "suspicious": { |
| 125 | + "noAssignInExpressions": "error", |
63 | 126 | "noAsyncPromiseExecutor": "error", |
64 | 127 | "noCatchAssign": "error", |
65 | 128 | "noClassAssign": "error", |
|
91 | 154 | "useGetterReturn": "error" |
92 | 155 | } |
93 | 156 | }, |
94 | | - "includes": ["**/*.{ts,tsx}", "src/proto/mirabuf.*", "src/samples/*"] |
| 157 | + "includes": ["src/**/*.{ts,tsx,js,json}", "./*.{ts,js,json,html}"] |
95 | 158 | }, |
96 | 159 | "javascript": { |
97 | 160 | "formatter": { |
|
101 | 164 | "semicolons": "asNeeded", |
102 | 165 | "arrowParentheses": "asNeeded", |
103 | 166 | "bracketSameLine": false, |
| 167 | + "indentStyle": "space", |
| 168 | + "indentWidth": 4, |
104 | 169 | "quoteStyle": "double", |
105 | 170 | "attributePosition": "auto", |
106 | 171 | "bracketSpacing": true |
107 | | - } |
| 172 | + }, |
| 173 | + "globals": ["COMMIT_HASH"] |
108 | 174 | }, |
109 | 175 | "html": { "formatter": { "selfCloseVoidElements": "always" } }, |
110 | 176 | "overrides": [ |
111 | | - { |
112 | | - "includes": ["*.ts", "*.tsx", "*.mts", "*.cts"], |
113 | | - "linter": { |
114 | | - "rules": { |
115 | | - "complexity": { "noArguments": "error" }, |
116 | | - "correctness": { |
117 | | - "noConstAssign": "off", |
118 | | - "noGlobalObjectCalls": "off", |
119 | | - "noInvalidBuiltinInstantiation": "off", |
120 | | - "noInvalidConstructorSuper": "off", |
121 | | - "noSetterReturn": "off", |
122 | | - "noUndeclaredVariables": "off", |
123 | | - "noUnreachable": "off", |
124 | | - "noUnreachableSuper": "off" |
125 | | - }, |
126 | | - "style": { "useConst": "error" }, |
127 | | - "suspicious": { |
128 | | - "noDuplicateClassMembers": "off", |
129 | | - "noDuplicateObjectKeys": "off", |
130 | | - "noDuplicateParameters": "off", |
131 | | - "noFunctionAssign": "off", |
132 | | - "noImportAssign": "off", |
133 | | - "noRedeclare": "off", |
134 | | - "noUnsafeNegation": "off", |
135 | | - "noVar": "error", |
136 | | - "useGetterReturn": "off" |
137 | | - } |
138 | | - } |
139 | | - } |
140 | | - }, |
141 | | - { "includes": ["*.json"], "formatter": { "indentWidth": 2 } } |
| 177 | + { "includes": ["*.json"], "formatter": { "indentWidth": 2 } }, |
| 178 | + { "includes": ["src/proto/**/*"], "linter": { "enabled": false } } |
142 | 179 | ], |
143 | | - "assist": { |
144 | | - "enabled": true, |
145 | | - "actions": { "source": { "organizeImports": "on" } } |
146 | | - } |
| 180 | + |
| 181 | + "assist": { "enabled": true, "actions": { "source": { "organizeImports": "on" } } } |
147 | 182 | } |
0 commit comments