Enforce using named imports from 'react' (#10259)

This commit is contained in:
DS Boyce
2026-04-15 10:11:09 -07:00
committed by GitHub
parent 19e2dc939a
commit b9561f78ee
5 changed files with 25 additions and 17 deletions
+8
View File
@@ -250,6 +250,14 @@ export default defineConfig(
'@typescript-eslint/prefer-promise-reject-errors': 'warn',
'@typescript-eslint/await-thenable': 'warn',
"no-restricted-imports": ["error", {
"paths": [{
"name": "react",
"importNames": ["React", "default"],
"message": "React is already in the global type namespace. Use named imports for runtime modules."
}]
}],
/**
* Turn off rules that we haven't enforced thus far
*/