Skip to content

Commit 04c061a

Browse files
committed
Upgrade Prettier and fix changes
1 parent 7af9c69 commit 04c061a

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

.prettierrc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2+
"arrowParens": "avoid",
23
"bracketSpacing": true,
4+
"semi": false,
35
"singleQuote": true,
46
"tabWidth": 2,
5-
"useTabs": false,
67
"trailingComma": "none",
7-
"semi": false
8-
}
8+
"useTabs": false
9+
}

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"e2e": "concurrently -k -s first -n \"app,mock,e2e\" \"BROWSER=none yarn start\" \"yarn e2e:mock\" \"yarn e2e:run\"",
2828
"e2e:mock": "node ./e2e/fixtures/server.js",
2929
"e2e:run": "wait-on -l http-get://localhost:3000 && cypress run",
30-
"lint": "eslint src --max-warnings 0 && prettier --check 'src/**/*.js'",
30+
"lint": "eslint src --max-warnings 0 && prettier --config .prettierrc --check 'src/**/*.js'",
3131
"lint:fix": "eslint --fix src",
3232
"prettier": "prettier --config .prettierrc --write 'src/**/*.js'",
3333
"eject": "react-scripts eject"
@@ -42,7 +42,12 @@
4242
],
4343
"rules": {
4444
"import/no-anonymous-default-export": "off",
45-
"prettier/prettier": "error"
45+
"prettier/prettier": [
46+
"error",
47+
{
48+
"arrowParens": "avoid"
49+
}
50+
]
4651
}
4752
},
4853
"husky": {
@@ -68,7 +73,7 @@
6873
"husky": "^3.0.4",
6974
"lint-staged": "^9.2.5",
7075
"morgan": "^1.10.0",
71-
"prettier": "^1.18.2",
76+
"prettier": "^2.7.1",
7277
"pretty-quick": "^3.1.3",
7378
"serve": "^13.0.4",
7479
"wait-on": "^3.3.0"

src/Components/forms/index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class Forms extends Component {
2929
if (magicLinkRequest.status === 200) {
3030
this.setState({
3131
loading: false,
32-
msg:
33-
'We have sent you a verification email, Please check your emails.'
32+
msg: 'We have sent you a verification email, Please check your emails.'
3433
})
3534
}
3635
} catch (err) {
@@ -51,8 +50,7 @@ class Forms extends Component {
5150
})
5251
}
5352
return this.setState({
54-
err:
55-
'Sorry, we are currently experiencing technical issues, please try again later.',
53+
err: 'Sorry, we are currently experiencing technical issues, please try again later.',
5654
loading: false
5755
})
5856
}
@@ -66,8 +64,7 @@ class Forms extends Component {
6664
return this.setState({
6765
userId,
6866
showEmailBox: true,
69-
err:
70-
'Failed to verify your email address, due to expire token or server failure. Please use the box below and try again.'
67+
err: 'Failed to verify your email address, due to expire token or server failure. Please use the box below and try again.'
7168
})
7269
}
7370
if (code === 'success') {

src/Components/forms/inputs/checkListB.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ export default ({ onChange, list, name }) => {
88
{list.map(listItem => (
99
<div
1010
key={listItem.label}
11-
className={`form-table ${listItem.level === "It's empty" &&
12-
'form-table-tr-is-empty'}`}
11+
className={`form-table ${
12+
listItem.level === "It's empty" && 'form-table-tr-is-empty'
13+
}`}
1314
>
1415
<div className="form-table-single">
1516
<CheckBox

src/Components/forms/inputs/textArea.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ export default ({
1717
type={type}
1818
name={name}
1919
id={name}
20-
className={`form-control form-control-text-area ${isEmpty &&
21-
'is-empty'}`}
20+
className={`form-control form-control-text-area ${
21+
isEmpty && 'is-empty'
22+
}`}
2223
placeholder={placeholder}
2324
value={value}
2425
onChange={onChange}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9891,10 +9891,10 @@ prettier-linter-helpers@^1.0.0:
98919891
dependencies:
98929892
fast-diff "^1.1.2"
98939893

9894-
prettier@^1.18.2:
9895-
version "1.19.1"
9896-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
9897-
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
9894+
prettier@^2.7.1:
9895+
version "2.7.1"
9896+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
9897+
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
98989898

98999899
pretty-bytes@^5.3.0:
99009900
version "5.6.0"

0 commit comments

Comments
 (0)