Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"browser": true,
"es2021": true
},
"extends": ["airbnb", "plugin:prettier/recommended"],
"extends": ["plugin:react/recommended", "airbnb", "plugin:react/jsx-runtime"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"radix": "off",
"no-console": "warn",
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off"
"linebreak-style": ["error", "unix"]
}
}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# lock files
package-lock.json
yarn.lock

# eslint
.eslintcache

Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
# React Simple Boilerplate

Already intalled and configured:
* ESLint (airbnb)
* Prettier
* Husky with lint-staged

- ESLint (airbnb)
- Prettier
- Husky with lint-staged

Install with `npm install` or `yarn install`

Run with `npm start` or `yarn start`

Lint with `npm run lint` or `yarn run lint`

# Configure husky

After the first installation, run (only once) :

`npm run prepare`

# Configure git (only for Windows)

Force git to use LF end of line everywhere:
Expand Down Expand Up @@ -56,4 +63,4 @@ If you've already cloned this repository, remove it and clone it again.
}
```

You might have to close and reopen Visual Studio Code after the plugins install and setting changes.
You might have to close and reopen Visual Studio Code after the plugins install and setting changes.
Loading