From 119d1848a47cb199750d629d1e4d5a71bf9612e5 Mon Sep 17 00:00:00 2001 From: Kipras Melnikovas Date: Sun, 2 Feb 2020 23:18:59 +0200 Subject: [PATCH] Add react's package.json instruction to append `--ext js,jsx,ts,tsx` option to eslint See #4 (https://github.com/sarpik/eslint-config-sarpik/issues/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 --- README.md | 1 + package.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eced4e4..bad4196 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index 4588c7f..d300d50 100644 --- a/package.json +++ b/package.json @@ -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" },