mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Add support for TS to eslint
See https://khalilstemmler.com/blogs/typescript/eslint-for-typescript/
This commit is contained in:
parent
6643de66a5
commit
94b278a887
20
.eslintrc
20
.eslintrc
@ -2,13 +2,20 @@
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": ["airbnb-base", "prettier"],
|
||||
"extends": [
|
||||
"airbnb-base",
|
||||
"prettier"
|
||||
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2019
|
||||
},
|
||||
"plugins": ["prettier"],
|
||||
"plugins": ["prettier","@typescript-eslint"],
|
||||
"root": true,
|
||||
"rules": {
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"import/no-unresolved": 0,
|
||||
"class-methods-use-this": [0],
|
||||
"prettier/prettier": ["error"],
|
||||
"func-names": "off",
|
||||
@ -28,5 +35,14 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
// enable the rule specifically for TypeScript files
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-module-boundary-types": ["error"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"ignorePatterns": ["**/docs/api/oas/"]
|
||||
}
|
||||
|
@ -63,6 +63,8 @@
|
||||
"snapshotDir": "snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^4.15.1",
|
||||
"@typescript-eslint/parser": "^4.15.1",
|
||||
"async": "^3.1.0",
|
||||
"basic-auth": "^2.0.1",
|
||||
"compression": "^1.7.3",
|
||||
|
Loading…
Reference in New Issue
Block a user