Skip to content

Commit

Permalink
Disable react-in-jsx-scope rule
Browse files Browse the repository at this point in the history
This rule returns an error if a JSX file doesn't have:

```
import React from 'react';
```

Since React 18 (I think) this hasn't been needed. We can remove the
rule and stop importing React.
  • Loading branch information
lhansford committed Jan 4, 2024
1 parent ec679ab commit a35dd20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
'react/jsx-max-props-per-line': ['warn', { when: 'multiline' }],
'react/no-render-return-value': 'off',
'react/prop-types': 'off', // No need for prop types with Typescript
'react/react-in-jsx-scope': 'off',
},
env: {
browser: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-fishbrain",
"version": "5.0.5",
"version": "5.0.6",
"description": "ESLint config for Fishbrain TypeScript projects",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit a35dd20

Please sign in to comment.