Skip to content

Commit

Permalink
Add react's package.json instruction to append --ext js,jsx,ts,tsx
Browse files Browse the repository at this point in the history
…option to eslint

See #4 (#4)

Also updated this project's package.json - the change is not needed for
eslint v5, but it's compatible with both v5 & v6, so it won't hurt.

Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
  • Loading branch information
kiprasmel committed Feb 2, 2020
1 parent 2a9f9aa commit 119d184
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -176,6 +176,7 @@ See also [the README of vscode-eslint](https://github.com/microsoft/vscode-eslin
1. Crack open your `package.json` and
1. replace `"extends": "react-app"` with `"extends": "sarpik"`
2. replace `"eslint": "5.x" with `"eslint": "6.x"`
3. update `lint` and `lint:fix` scripts - append the `--ext js,jsx,ts,tsx` option (required for eslint `6.x`, see https://github.com/sarpik/eslint-config-sarpik/issues/4)

## 🤬🤬🤬🤬 IT'S NOT WORKING

Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -8,8 +8,8 @@
"license": "MIT",
"private": false,
"scripts": {
"lint": " eslint . --ignore-pattern '!.eslintrc.js'",
"lint:fix": "eslint . --ignore-pattern '!.eslintrc.js' --fix",
"lint": " eslint . --ext js,jsx,ts,tsx --ignore-pattern '!.eslintrc.js'",
"lint:fix": "eslint . --ext js,jsx,ts,tsx --ignore-pattern '!.eslintrc.js' --fix",
"prepublishOnly": "yarn lint:fix",
"postpublish": "npx install-peerdeps --global --yarn eslint-config-sarpik@latest"
},
Expand Down

0 comments on commit 119d184

Please sign in to comment.