React components: the recommended React and hooks rules as errors, and react-refresh rules, so Fast Refresh keeps component state. It requires javascript.
gspot selects it in a scope with dependencies react. A configuration that requires it selects it too: nextjs, react-dom, react-native.
| Lint rules |
Files |
Why |
gspot/no-trivial-files, gspot/no-trivial-functions |
**/*.tsx, **/*.jsx |
React renders a component by its name, so a component of one statement, alone in its file, is the shape React asks for. |
| Setting |
Value |
tools.eslint.import_extension |
"extensionless" |
| Rule file |
Installed when |
.gspot/configurations/framework/react/rules/REACT.md |
Always |
| Tool |
Version |
| eslint-plugin-react-hooks |
7.1.1 |
| eslint-plugin-react |
7.37.5 |
| eslint-plugin-react-refresh |
0.5.7 |