Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit afdd50d

Browse files
committed
TypeScript support to ESLint
1 parent 4f9cdf5 commit afdd50d

File tree

3 files changed

+168
-42
lines changed

3 files changed

+168
-42
lines changed

.eslintrc.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module.exports = {
2-
parser: 'babel-eslint',
2+
parser: '@typescript-eslint/parser',
3+
plugins: [
4+
'@typescript-eslint'
5+
],
36
extends: [
47
'streamr-nodejs'
58
],
@@ -35,7 +38,11 @@ module.exports = {
3538
'lines-between-class-members': 'off',
3639
'padded-blocks': 'off',
3740
'no-use-before-define': 'off',
38-
'import/order': 'off'
41+
'import/order': 'off',
42+
'no-shadow': 'off',
43+
'@typescript-eslint/no-shadow': 'error',
44+
'no-unused-vars': 'off',
45+
'@typescript-eslint/no-unused-vars': ['error']
3946
},
4047
settings: {
4148
'import/resolver': {

package-lock.json

Lines changed: 155 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"prepack": "npm run build",
2525
"prebuild": "npm run eslint -- --cache",
2626
"dev": "webpack --progress --colors --watch --mode=development",
27-
"eslint": "eslint --cache-location=node_modules/.cache/.eslintcache/ . ",
27+
"eslint": "eslint --cache-location=node_modules/.cache/.eslintcache/ '*/**/*.{js,ts}'",
2828
"test": "jest --detectOpenHandles",
2929
"test-unit": "jest test/unit --detectOpenHandles",
3030
"coverage": "jest --coverage",
@@ -54,16 +54,17 @@
5454
"@babel/preset-typescript": "^7.12.13",
5555
"@types/debug": "^4.1.5",
5656
"@types/qs": "^6.9.5",
57+
"@typescript-eslint/eslint-plugin": "^4.15.1",
58+
"@typescript-eslint/parser": "^4.15.1",
5759
"async-mutex": "^0.2.6",
58-
"babel-eslint": "^10.1.0",
5960
"babel-loader": "^8.2.2",
6061
"babel-plugin-add-module-exports": "^1.0.4",
6162
"babel-plugin-transform-class-properties": "^6.24.1",
6263
"benchmark": "^2.1.4",
6364
"buffer": "^6.0.3",
6465
"chromedriver": "^88.0.0",
6566
"core-js": "^3.8.3",
66-
"eslint": "^7.18.0",
67+
"eslint": "^7.20.0",
6768
"eslint-config-airbnb": "^18.2.1",
6869
"eslint-config-streamr-nodejs": "^1.3.0",
6970
"eslint-loader": "^4.0.2",

0 commit comments

Comments
 (0)