-
Notifications
You must be signed in to change notification settings - Fork 0
/
typescript.js
43 lines (37 loc) · 1.49 KB
/
typescript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
module.exports = {
"parser": "typescript-eslint-parser",
"plugins": [
// https://github.com/nzakas/eslint-plugin-typescript
"typescript"
],
// Airbnb does not currently provide any rules for TypeScript,
// so turn on some basic ones here.
//
// These are intended to supplement the rules for other environments (e.g. React).
// You should extend both 'react' AND 'typescript' in your project.
"rules": {
// TypeScript compiler will handle this.
"no-undef": "off",
// --- https://github.com/nzakas/eslint-plugin-typescript#supported-rules
"typescript/adjacent-overload-signatures": "error",
"typescript/class-name-casing": "error",
"typescript/explicit-function-return-type": ["error", {
"allowExpressions": true
}],
"typescript/member-delimiter-style": "error",
"typescript/member-ordering": "error",
"typescript/no-angle-bracket-type-assertion": "error",
"typescript/no-array-constructor": "error",
"typescript/no-empty-interface": "error",
"typescript/no-inferrable-types": "error",
"typescript/no-namespace": "error",
"typescript/no-non-null-assertion": "error",
"typescript/no-triple-slash-reference": "error",
// Fixes the no-unused-vars from ESLint, if core rule is enabled.
"typescript/no-unused-vars": "error",
"typescript/no-use-before-define": "error",
"typescript/no-var-requires": "error",
"typescript/prefer-namespace-keyword": "error",
"typescript/type-annotation-spacing": "error"
},
};