Skip to content

Commit ff8305a

Browse files
committed
"fix" prettier
1 parent 9610883 commit ff8305a

File tree

5 files changed

+26
-16
lines changed

5 files changed

+26
-16
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.eslintrc.js

.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* eslint-disable no-unused-vars */
2+
const OFF = 0
3+
const WARN = 1
4+
const ERR = 2
5+
6+
module.exports = {
7+
root: true,
8+
extends: ['react-app','eslint:recommended', 'plugin:react/recommended'],
9+
plugins: ['react'],
10+
rules: {
11+
// stuff that prettier fails to do well
12+
// https://itnext.io/how-to-replace-prettier-by-eslint-rules-21574359e041
13+
'semi': [ERR, 'never'],
14+
'indent': [ERR, 'tab'],
15+
'quotes': [ERR, 'single'],
16+
// 'max-len': [WARN, { 'code': 80 }],
17+
'comma-dangle': [ERR, 'always-multiline'],
18+
'object-curly-spacing': [ERR, 'always'],
19+
'react/jsx-closing-bracket-location': [ERR, 'line-aligned'],
20+
21+
'no-console': OFF,
22+
'no-multiple-empty-lines': [ERR , { max: 2, maxBOF: 0, maxEOF: 0 }],
23+
},
24+
}

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@
2121
},
2222
"devDependencies": {
2323
"eslint": "^5.16.0",
24-
"eslint-plugin-prettier": "^3.1.0",
2524
"gh-pages": "^2.0.0",
2625
"husky": "^3.0.1",
27-
"prettier": "^1.18.2",
28-
"pretty-quick": "^1.11.1"
2926
},
3027
"scripts": {
3128
"start": "react-scripts start",
@@ -35,8 +32,7 @@
3532
},
3633
"husky": {
3734
"hooks": {
38-
"pre-commit": "pretty-quick --staged --pattern \"src/**/*.*(js|jsx)\"",
39-
"pre-push": "yarn run lint"
35+
"pre-push": "yarn lint"
4036
}
4137
},
4238
"browserslist": {

0 commit comments

Comments
 (0)