Skip to content

Commit

Permalink
integrate prettier with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Nov 12, 2019
1 parent 481461b commit 51a4802
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"plugin:@typescript-eslint/recommended",
"plugin:security/recommended",
"prettier",
"prettier/@typescript-eslint"
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand All @@ -13,7 +14,8 @@
"plugins": [
"@typescript-eslint",
"mocha",
"security"
"security",
"prettier"
],
"env": {
"es6": true,
Expand All @@ -23,12 +25,10 @@
},
"rules": {
"prefer-spread": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/triple-slash-reference": "off",
"security/detect-non-literal-fs-filename": "off",
"security/detect-object-injection": "off",
"@typescript-eslint/no-floating-promises": "error",
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 120
}
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
"scripts": {
"build": "tsc -p .",
"watch": "tsc -p . --watch",
"eslint": "eslint '**/*.ts'",
"prettier": "prettier --check '**/*.ts'",
"lint": "npm-run-all -p eslint prettier",
"lint": "eslint '**/*.ts'",
"fix": "eslint --fix '**/*.ts'",
"test": "mocha ./test"
},
"repository": {
Expand Down Expand Up @@ -46,6 +45,7 @@
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-mocha": "^6.2.1",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-security": "^1.4.0",
"husky": "^3.0.9",
"mocha": "^6.2.2",
Expand Down

0 comments on commit 51a4802

Please sign in to comment.