Skip to content

Commit ec19222

Browse files
author
Alexey Ivanov
committed
Update prettier config and version
The prettier configuration has been updated by changing the printWidth from 80 to 100 and tabWidth from 2 to 4. We also updated the project version in package.json from version 2.0.0 to 2.0.1. Consequently, the changes in tab width apply to all .tsx files as visibly shown by the indentation changes in several files.
1 parent 7bf9439 commit ec19222

File tree

5 files changed

+29
-30
lines changed

5 files changed

+29
-30
lines changed

.prettierrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
2-
"printWidth": 80,
2+
"printWidth": 100,
33
"semi": true,
44
"singleQuote": true,
5-
"tabWidth": 2,
5+
"tabWidth": 4,
66
"useTabs": false,
77
"arrowParens": "avoid",
8-
"jsxBracketSameLine": false,
98
"trailingComma": "all"
109
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "my-app",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"license": "MIT",
55
"lint-staged": {
66
"src/**/*.{ts,tsx}": [

src/@types/custom.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
declare module '*.svg' {
2-
import React = require('react');
3-
export const ReactComponent: React.SFC<React.SVGProps<SVGSVGElement>>;
4-
const src: string;
5-
export default src;
2+
import React = require('react');
3+
export const ReactComponent: React.SFC<React.SVGProps<SVGSVGElement>>;
4+
const src: string;
5+
export default src;
66
}

src/components/app.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ import './app.css';
33
import logo from '../assets/logo.svg';
44

55
export const App = (): JSX.Element => {
6-
return (
7-
<div className="app">
8-
<header className="app__header">
9-
<img src={logo} className="app__logo" alt="logo" />
10-
<p>
11-
Edit <code>src/app.tsx</code> and save to reload.
12-
</p>
13-
<a
14-
className="app__link"
15-
href="https://reactjs.org"
16-
target="_blank"
17-
rel="noopener noreferrer"
18-
>
19-
Learn React
20-
</a>
21-
</header>
22-
</div>
23-
);
6+
return (
7+
<div className="app">
8+
<header className="app__header">
9+
<img src={logo} className="app__logo" alt="logo" />
10+
<p>
11+
Edit <code>src/app.tsx</code> and save to reload.
12+
</p>
13+
<a
14+
className="app__link"
15+
href="https://reactjs.org"
16+
target="_blank"
17+
rel="noopener noreferrer"
18+
>
19+
Learn React
20+
</a>
21+
</header>
22+
</div>
23+
);
2424
};

src/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import ReactDOM from 'react-dom';
33
import { App } from './components/app';
44

55
ReactDOM.render(
6-
<React.StrictMode>
7-
<App />
8-
</React.StrictMode>,
9-
document.getElementById('root'),
6+
<React.StrictMode>
7+
<App />
8+
</React.StrictMode>,
9+
document.getElementById('root'),
1010
);

0 commit comments

Comments
 (0)