Created
April 23, 2019 11:54
-
-
Save deliseev/abbf4930640e983a13bc58c157e38508 to your computer and use it in GitHub Desktop.
create-react-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
yarn create react-app ... | |
yarn add -D eslint-config-prettier eslint-plugin-prettier husky lint-staged prettier pretty-quick |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Launch Chrome against localhost", | |
"url": "http://localhost:3000", | |
"webRoot": "${workspaceFolder}/src", | |
"sourceMapPathOverrides": { | |
"webpack:///src/*": "${webRoot}/*" | |
} | |
} | |
] | |
} |
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
"eslintConfig": { | |
"extends": [ | |
"react-app", | |
"plugin:prettier/recommended" | |
], | |
"rules": { | |
"jsx-quotes": [ | |
"error", | |
"prefer-double" | |
] | |
} | |
}, | |
"prettier": { | |
"trailingComma": "es5", | |
"semi": false, | |
"singleQuote": true, | |
"jsxSingleQuote": false | |
}, | |
"lint-staged": { | |
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [ | |
"pretty-quick --staged", | |
"git add" | |
] | |
}, | |
"husky": { | |
"hooks": { | |
"pre-commit": "lint-staged" | |
} | |
} |
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
{ | |
"editor.formatOnSave": true, | |
"html.format.endWithNewline": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment