Skip to content

Commit

Permalink
update rule for React import in .js
Browse files Browse the repository at this point in the history
  • Loading branch information
001elijah committed Jun 15, 2023
1 parent d3304e1 commit aad493f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
32 changes: 14 additions & 18 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
}
"env": {
"browser": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off"
}
}
2 changes: 1 addition & 1 deletion src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const App = () => {
justifyContent: 'center',
alignItems: 'center',
fontSize: 40,
color: '#010101'
color: '#010101',
}}
>
React homework template
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ ReactDOM.createRoot(document.getElementById('root')).render(
<BrowserRouter basename="/bc48-node-team-project-frontend">
<App />
</BrowserRouter>
</React.StrictMode>
</React.StrictMode>,
);

0 comments on commit aad493f

Please sign in to comment.