diff --git a/.eslintrc.json b/.eslintrc.json index 0a4cb4e2..ba2a82bd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,7 +7,8 @@ "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", - "plugin:jest/recommended" + "plugin:jest/recommended", + "plugin:prettier/recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -16,6 +17,7 @@ }, "plugins": [ "@typescript-eslint", - "jest" + "jest", + "prettier" ] } diff --git a/package.json b/package.json index de62311a..7c086617 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,8 @@ "main": "lib/main.js", "scripts": { "build": "ncc build src/main.ts --source-map --minify --license licenses.txt", - "lint-check": "eslint src/**/*.ts __tests__/**/*.ts", - "lint-fix": "eslint --fix src/**/*.ts __tests__/**/*.ts", - "prettier-check": "prettier --check **/*.ts", - "prettier-fix": "prettier --write **/*.ts", - "lint": "yarn run lint-check && yarn run prettier-check", - "format": "yarn run lint-fix && yarn run prettier-fix", + "lint": "eslint src/**/*.ts __tests__/**/*.ts", + "format": "eslint --fix src/**/*.ts __tests__/**/*.ts", "test": "jest --coverage", "all": "yarn run build && yarn run format && yarn test" }, @@ -37,6 +33,7 @@ "@typescript-eslint/parser": "^5.14.0", "@vercel/ncc": "^0.33.3", "eslint": "^8.11.0", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-jest": "^26.1.1", "eslint-plugin-prettier": "^4.0.0", "jest": "^27.2.5", diff --git a/yarn.lock b/yarn.lock index f6d79212..7b8cba6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1557,6 +1557,11 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== + eslint-plugin-jest@^26.1.1: version "26.1.1" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.1.tgz#7176dd745ef8bca3070263f62cdf112f2dfc9aa1"