From 542e699686150d05ab638492ee35a77859e59829 Mon Sep 17 00:00:00 2001 From: Aftab Alam <532906+one-aalam@users.noreply.github.com> Date: Mon, 6 Apr 2020 09:25:54 +0530 Subject: [PATCH] fix: Issue with missing dependencies and scripts in package.json --- package.json | 19 +++++++++++++------ tsconfig.eslint.json | 7 +++++++ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 tsconfig.eslint.json diff --git a/package.json b/package.json index 581aafa..6871f5f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "next dev", "build": "next build", "start": "next start", - "tslint": "tslint -p . -c tslint.json", + "lint": "eslint . --ext .ts,.tsx", "test": "jest", "test:watch": "jest --watch", "test:ci": "jest --ci", @@ -27,8 +27,18 @@ "@types/node": "^13.11.0", "@types/react": "^16.9.32", "@types/react-dom": "^16.9.6", + "@typescript-eslint/eslint-plugin": "^2.26.0", + "@typescript-eslint/eslint-plugin-tslint": "^2.26.0", + "@typescript-eslint/parser": "^2.26.0", "auto-changelog": "^1.16.4", "babel-jest": "^25.2.6", + "eslint": "^6.8.0", + "eslint-config-airbnb-typescript": "^7.2.0", + "eslint-config-prettier": "^6.10.1", + "eslint-plugin-import": "^2.20.2", + "eslint-plugin-jsx-a11y": "^6.2.3", + "eslint-plugin-react": "^7.19.0", + "eslint-plugin-react-hooks": "^3.0.0", "husky": "^4.2.3", "identity-obj-proxy": "^3.0.0", "jest": "^25.2.7", @@ -36,9 +46,6 @@ "prettier": "^2.0.2", "react-test-renderer": "^16.13.1", "tslint": "^6.1.1", - "tslint-config-airbnb": "^5.11.2", - "tslint-config-prettier": "^1.18.0", - "tslint-react-hooks": "^2.2.2", "typescript": "^3.8.3" }, "husky": { @@ -49,8 +56,8 @@ "lint-staged": { "*.+(ts|tsx)": [ "prettier --write", - "jest --findRelatedTests", - "tslint" + "lint", + "jest --findRelatedTests" ] }, "prettier": { diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 0000000..b629ca6 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,7 @@ +{ + // extends your base config so you don't have to redefine your compilerOptions + "extends": "./tsconfig.json", + "include": [ + "**/*.js" + ] +}