Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hjxenjoy/eslint-config-react-jsone
react app eslint config for js
https://github.com/hjxenjoy/eslint-config-react-jsone
Last synced: about 1 month ago
JSON representation
react app eslint config for js
- Host: GitHub
- URL: https://github.com/hjxenjoy/eslint-config-react-jsone
- Owner: hjxenjoy
- License: mit
- Created: 2019-10-17T04:36:12.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-07T11:19:16.000Z (over 4 years ago)
- Last Synced: 2024-10-10T04:16:30.657Z (about 1 month ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-config-react-jsone
eslint config for create-react-app
## Installation
```sh
npm install --save-dev eslint-config-react-jsone
yarn add -D eslint-config-react-jsone
```## Configuration
### Add eslint config file
1. remove eslintConfig in `package.json`
2. create `.eslintrc` file in root directory```json
{
"extends": "react-jsone"
}
```### Add prettier config file
create `.prettierrc` file into root directory
```json
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"semi": false,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "auto",
"overrides": [
{
"files": ["*.css", "*.less", "*.scss"],
"options": {
"singleQuote": false
}
}
]
}
```### Add eslint autoFixOnSave
Add code below into `.vscode/settings.json`
```json
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
```