Skip to content

Commit

Permalink
support eslint with typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Nov 13, 2019
1 parent b0d4378 commit 2854551
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 2 deletions.
17 changes: 16 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,20 @@
},
"env": {
"browser": true
}
},
"overrides": [
{
"files": "**/*.+(ts|tsx)",
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint/eslint-plugin"],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"eslint-config-prettier/@typescript-eslint"
]
}
]
}
100 changes: 100 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPLv3",
"scripts": {
"build": "babel src --extensions .js,.ts,.tsx --out-dir dist",
"lint": "eslint --ignore-path .gitignore .",
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
"check-types": "tsc",
"prettier": "prettier --ignore-path .gitignore \"**/*.+(js|json|ts|tsx)\"",
"format": "npm run prettier -- --write",
Expand All @@ -17,6 +17,8 @@
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
"@babel/preset-typescript": "^7.7.2",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"prettier": "^1.19.1",
Expand Down

0 comments on commit 2854551

Please sign in to comment.