-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
57 lines (57 loc) · 2.22 KB
/
.eslintrc
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["tsconfig.json"]
},
"plugins": [
// This enables using new lint rules powered by the TypeScript compiler API.
// https://github.com/typescript-eslint/typescript-eslint
"@typescript-eslint",
// This makes it so the IDE reports lint rejections as warnings only. This is
// better than errors because most lint rejections are not runtime errors. This
// allows IDE errors to be exclusive for e.g. static type errors which often are
// reflective of real runtime errors.
// https://github.com/bfanger/eslint-plugin-only-warn
"only-warn",
// This enables the use of a lint rule to reject function declarations. This is
// preferable as a way to encourage higher order function usage. For example it is not
// possible to wrap a function declaration with Open Telemetry instrumentation but it is
// possible to wrap an arrow function since its an expression.
// https://github.com/TristonJ/eslint-plugin-prefer-arrow
"prefer-arrow",
// This enables the use of a lint rule to reject use of @deprecated functions.
// https://github.com/gund/eslint-plugin-deprecation
"deprecation",
// Import sorting integrated into ESLint.
// https://github.com/lydell/eslint-plugin-simple-import-sort
"simple-import-sort",
// https://github.com/microsoft/tsdoc/tree/master/eslint-plugin
"tsdoc"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"overrides": [],
"rules": {
"quotes": ["warn", "backtick"],
"tsdoc/syntax": "warn",
"simple-import-sort/imports": [
"warn",
{
"groups": []
}
],
"simple-import-sort/exports": "warn",
"deprecation/deprecation": "warn",
"prefer-arrow/prefer-arrow-functions": "warn",
// TypeScript makes these safe & effective
"no-case-declarations": "off",
// Same approach used by TypeScript noUnusedLocals
"@typescript-eslint/no-unused-vars": ["warn", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }]
}
}