|
17 | 17 | "indentWidth": 2, |
18 | 18 | "lineWidth": 120 |
19 | 19 | }, |
| 20 | + "css": { |
| 21 | + "parser": { |
| 22 | + "tailwindDirectives": true |
| 23 | + } |
| 24 | + }, |
20 | 25 | "javascript": { |
21 | 26 | "formatter": { |
22 | 27 | "quoteStyle": "double", |
|
35 | 40 | "a11y": { |
36 | 41 | "useKeyWithClickEvents": "warn" |
37 | 42 | }, |
| 43 | + "complexity": { |
| 44 | + "noUselessEscapeInRegex": "error", |
| 45 | + "noUselessStringConcat": "error", |
| 46 | + "noUselessUndefinedInitialization": "error", |
| 47 | + "useDateNow": "error", |
| 48 | + "useSimplifiedLogicExpression": "error", |
| 49 | + "useWhile": "error" |
| 50 | + }, |
| 51 | + "correctness": { |
| 52 | + "noUnusedVariables": { |
| 53 | + "level": "warn", |
| 54 | + "fix": "none" |
| 55 | + }, |
| 56 | + "noConstantMathMinMaxClamp": "error", |
| 57 | + "noUndeclaredVariables": "error", |
| 58 | + "noUnusedFunctionParameters": "error", |
| 59 | + "noUnusedImports": "error", |
| 60 | + "noUnusedPrivateClassMembers": "error", |
| 61 | + "useHookAtTopLevel": "error" |
| 62 | + }, |
38 | 63 | "nursery": { |
39 | 64 | "useSortedClasses": { |
40 | 65 | "level": "warn", |
|
44 | 69 | } |
45 | 70 | }, |
46 | 71 | "useConsistentArrowReturn": "error", |
47 | | - "noUselessCatchBinding": "error" |
| 72 | + "noUselessCatchBinding": "error", |
| 73 | + "noShadow": "error" // should help you catch useless code/accidental drift |
48 | 74 | }, |
49 | | - "style": { |
50 | | - "noNonNullAssertion": "off" |
| 75 | + "performance": { |
| 76 | + "noDelete": "error", // it's a dangerous operator, use undefined instead |
| 77 | + "noDynamicNamespaceImportAccess": "error", |
| 78 | + "noReExportAll": "error", |
| 79 | + "useTopLevelRegex": "error" |
51 | 80 | }, |
52 | | - "correctness": { |
53 | | - "noUnusedVariables": { |
54 | | - "level": "warn", |
55 | | - "fix": "none" |
56 | | - } |
| 81 | + "security": { |
| 82 | + "noDangerouslySetInnerHtmlWithChildren": "error" // forces you to explain why you have no alternative to using this property, and think about potential sanitization issues |
| 83 | + }, |
| 84 | + "style": { |
| 85 | + "useNamingConvention": { |
| 86 | + "level": "error", |
| 87 | + "options": { |
| 88 | + "strictCase": false, |
| 89 | + "conventions": [ |
| 90 | + { |
| 91 | + "selector": { |
| 92 | + "kind": "objectLiteralProperty" |
| 93 | + }, |
| 94 | + "formats": ["CONSTANT_CASE", "camelCase"] |
| 95 | + } |
| 96 | + ] |
| 97 | + } |
| 98 | + }, |
| 99 | + "useFilenamingConvention": { |
| 100 | + "level": "error", |
| 101 | + "options": { |
| 102 | + "filenameCases": ["export", "kebab-case"] // personal preference |
| 103 | + } |
| 104 | + }, |
| 105 | + "noDefaultExport": "error", |
| 106 | + "noEnum": "error", |
| 107 | + "noInferrableTypes": "error", |
| 108 | + "noNonNullAssertion": "off", |
| 109 | + "noParameterAssign": "error", |
| 110 | + "noShoutyConstants": "error", |
| 111 | + "noSubstr": "error", |
| 112 | + "noUnusedTemplateLiteral": "error", |
| 113 | + "noUselessElse": "error", |
| 114 | + "noYodaExpression": "error", |
| 115 | + "useArrayLiterals": "error", |
| 116 | + "useAsConstAssertion": "error", |
| 117 | + "useAtIndex": "error", |
| 118 | + "useCollapsedIf": "error", |
| 119 | + "useConsistentArrayType": "error", |
| 120 | + "useConsistentBuiltinInstantiation": "error", |
| 121 | + "useDefaultParameterLast": "error", |
| 122 | + "useDefaultSwitchClause": "error", |
| 123 | + "useDeprecatedReason": "error", |
| 124 | + "useEnumInitializers": "error", |
| 125 | + "useExplicitLengthCheck": "error", |
| 126 | + "useFragmentSyntax": "error", |
| 127 | + "useNumberNamespace": "error", |
| 128 | + "useSelfClosingElements": "error", |
| 129 | + "useShorthandAssign": "error", |
| 130 | + "useSingleVarDeclarator": "error", |
| 131 | + "useThrowNewError": "error", |
| 132 | + "useThrowOnlyError": "error", |
| 133 | + "useTrimStartEnd": "error" |
57 | 134 | }, |
58 | 135 | "suspicious": { |
59 | 136 | "noExplicitAny": "error", |
60 | | - "noUnknownAtRules": "off" |
| 137 | + "useIterableCallbackReturn": "off", |
| 138 | + "noAlert": "error", |
| 139 | + // "noConsole": { |
| 140 | + // "level": "error", // helps you not forget to remove console logs. useful for debug, but dangerous for prod |
| 141 | + // "options": { |
| 142 | + // "allow": ["assert", "error", "info", "warn"] // alternatively, this forces you to be more intentional about your logging |
| 143 | + // } |
| 144 | + // }, |
| 145 | + "noDocumentCookie": "error", |
| 146 | + "noDocumentImportInPage": "error", |
| 147 | + "noDuplicateCustomProperties": "error", |
| 148 | + "noDuplicateElseIf": "error", |
| 149 | + "noDuplicateProperties": "error", |
| 150 | + "noEvolvingTypes": "error", |
| 151 | + "noTemplateCurlyInString": "error", |
| 152 | + "useAwait": "error", // forces you to be intentional about your async code |
| 153 | + "useErrorMessage": "error", |
| 154 | + "useNumberToFixedDigitsArgument": "error" // forces you to be intentional about your async code |
61 | 155 | } |
62 | 156 | } |
63 | 157 | }, |
|
0 commit comments