mirror of
https://github.com/theoludwig/eslint-config-conventions.git
synced 2024-12-18 21:45:04 +01:00
feat: add @typescript-eslint/no-require-imports
Not considered breaking, as `@typescript-eslint/no-var-requires` is already there. You should already not use, `require` in your codebase. It was a mistake to not include this rule. However, the newly added rule, will now report an error for the following example code: ```tsx const [loaded, error] = useFonts({ CustomFont: require("../assets/fonts/CustomFont.ttf") }) ``` Must read: "Every change breaks someones workflow", https://xkcd.com/1172/
This commit is contained in:
parent
256a5024d6
commit
6e6a8d7aa1
@ -321,6 +321,7 @@
|
|||||||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
||||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||||
"@typescript-eslint/no-var-requires": "error",
|
"@typescript-eslint/no-var-requires": "error",
|
||||||
|
"@typescript-eslint/no-require-imports": "error",
|
||||||
"@typescript-eslint/no-unsafe-unary-minus": "error",
|
"@typescript-eslint/no-unsafe-unary-minus": "error",
|
||||||
"@typescript-eslint/no-array-delete": "error",
|
"@typescript-eslint/no-array-delete": "error",
|
||||||
"@typescript-eslint/prefer-as-const": "error",
|
"@typescript-eslint/prefer-as-const": "error",
|
||||||
|
Loading…
Reference in New Issue
Block a user