Skip to content

Commit 9bda313

Browse files
chore(eslint): changes console rule
1 parent 5264937 commit 9bda313

File tree

4 files changed

+31
-26
lines changed

4 files changed

+31
-26
lines changed

.eslintrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
1818
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
1919
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
20-
]
20+
],
21+
"rules": {
22+
"no-console": "error"
23+
}
2124
}

.prettierrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"tabWidth": 4,
3-
"singleQuote": false,
2+
"tabWidth": 2,
3+
"singleQuote": true,
44
"jsxBracketSameLine": false,
55
"printWidth": 100,
66
"arrowParens": "always",

src/App.tsx

+23-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
import React from "react";
2-
import logo from "./logo.svg";
3-
import "./App.css";
1+
import React from 'react';
2+
import logo from './logo.svg';
3+
import './App.css';
44

5-
function App() {
6-
return (
7-
<div className="App">
8-
<header className="App-header">
9-
<img src={logo} className="App-logo" alt="logo" />
10-
<p>Hello World</p>
11-
<a
12-
className="App-link"
13-
href="https://reactjs.org"
14-
target="_blank"
15-
rel="noopener noreferrer"
16-
>
17-
Learned react
18-
</a>
19-
</header>
20-
</div>
21-
);
22-
}
5+
const App: React.FC = () => {
6+
//console.log('log for error');
7+
8+
return (
9+
<div className="App">
10+
<header className="App-header">
11+
<img src={logo} className="App-logo" alt="logo" />
12+
<p>Hello World</p>
13+
<a
14+
className="App-link"
15+
href="https://reactjs.org"
16+
target="_blank"
17+
rel="noopener noreferrer"
18+
>
19+
Learned react
20+
</a>
21+
</header>
22+
</div>
23+
);
24+
};
2325

2426
export default App;

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"resolveJsonModule": true,
1919
"isolatedModules": true,
2020
"noEmit": true,
21-
"jsx": "react-jsx"
21+
"jsx": "react"
2222
},
2323
"include": [
2424
"src"
2525
]
26-
}
26+
}

0 commit comments

Comments
 (0)