Skip to content

Commit

Permalink
dev: use eslint prettier plugin (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max and crazy-max authored Mar 21, 2022
1 parent 4d58d49 commit 3292b1b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -16,6 +17,7 @@
},
"plugins": [
"@typescript-eslint",
"jest"
"jest",
"prettier"
]
}
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3292b1b

Please sign in to comment.