This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"*.js": "npx eslint --no-fix src" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ touch .eslintrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parserOptions": { | |
"ecmaVersion": 7, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
"plugins": [ | |
"react" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parserOptions": { | |
"ecmaVersion": 7, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
"plugins": [ | |
"react" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npx eslint --no-fix src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
function App() { | |
const a = ""; | |
return ( | |
<div className="App"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const a = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npx eslint --no-fix src | |
/${ProjectName}/src/App.js | |
7:12 error Strings must use singlequote quotes | |
/${ProjectName}/src/App.test.js | |
4:1 error 'test' is not defined no-undef | |
5:10 error 'React' must be in scope when using JSX react/react-in-jsx-scope | |
7:3 error 'expect' is not defined no-undef | |
/${ProjectName}/src/index.js | |
11:3 error 'document' is not defined no-undef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npx eslint --no-fix src | |
/${ProjectName}/src/App.js | |
7:12 error Strings must use singlequote quotes | |
/${ProjectName}/src/App.test.js | |
4:1 error 'test' is not defined no-undef | |
5:10 error 'React' must be in scope when using JSX react/react-in-jsx-scope | |
7:3 error 'expect' is not defined no-undef | |
/${ProjectName}/src/index.js | |
11:3 error 'document' is not defined no-undef | |
/${ProjectName}/src/reportWebVitals.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.test.js | |
/src/index.js | |
/src/reportWebVitals.js |