Skip to content

Commit

Permalink
Tailored linter config to Typescript and incorporated Prettier format…
Browse files Browse the repository at this point in the history
…ter in lint command
  • Loading branch information
jjhbw committed Apr 12, 2020
1 parent f515165 commit 3160527
Show file tree
Hide file tree
Showing 4 changed files with 707 additions and 22 deletions.
16 changes: 13 additions & 3 deletions .eslintrc.yaml
@@ -1,9 +1,19 @@
parser: babel-eslint
parser: "@typescript-eslint/parser"
parserOptions:
project: tsconfig.json
sourceType: module
extends:
- airbnb
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:import/errors
- plugin:import/warnings
- plugin:import/typescript
- plugin:jest/recommended
- prettier
- prettier/@typescript-eslint
plugins:
- flowtype
- "@typescript-eslint"
- jest
env:
browser: true
rules:
Expand Down
13 changes: 10 additions & 3 deletions package.json
Expand Up @@ -31,8 +31,8 @@
"testCovPrepare": "rm -rf ./coverage .nyc_output .nyc_tmp && mkdir .nyc_tmp",
"testDev": "NODE_ENV=development jest --coverage && mv .nyc_output/coverage-final.json .nyc_tmp/coverage-dev.json && rm -rf .nyc_output",
"testCovReport": "cp -r .nyc_tmp .nyc_output && nyc report --reporter=html --reporter=lcov --reporter=text",
"lint": "eslint src",
"lint-fix": "eslint --fix src"
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
"lint-fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\""
},
"engines": {
"node": ">=6"
Expand All @@ -50,7 +50,14 @@
"@types/node": "^13.9.2",
"@types/qrcode": "^1.3.4",
"@types/sax": "^1.2.1",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"coveralls": "2.13.1",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prettier": "^3.1.2",
"jest": "^25.1.0",
"mockdate": "^2.0.5",
"nyc": "10.0.0",
Expand Down Expand Up @@ -79,4 +86,4 @@
"!**/__mocks__/**"
]
}
}
}
3 changes: 0 additions & 3 deletions tsconfig.json
Expand Up @@ -12,8 +12,5 @@
},
"include": [
"src"
],
"exclude": [
"src/__tests__/**/*"
]
}

0 comments on commit 3160527

Please sign in to comment.