This repository has been archived by the owner on Aug 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
48 lines (47 loc) · 1.55 KB
/
.eslintrc.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
44
45
46
47
48
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
ecmaVersion: 2018,
sourceType: "module"
},
extends: [
"eslint:recommended",
"plugin:sonarjs/recommended",
"plugin:functional/recommended",
"plugin:functional/external-recommended",
"plugin:jest/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:total-functions/recommended"
// TODO replace tslint's no-any and no-unsafe-any
// See https://github.com/typescript-eslint/typescript-eslint/issues/791
],
env: {
"jest/globals": true,
browser: true,
es6: true
},
plugins: ["jest", "sonarjs", "functional", "@typescript-eslint", "prettier", "total-functions"],
rules: {
// Additional rules that are not part of `eslint:recommended`.
// See https://eslint.org/docs/rules/
"no-eval": "error",
"no-implied-eval": "error",
"no-await-in-loop": "error",
"no-new-wrappers": "error",
"eqeqeq": "error",
"no-caller": "error",
"require-unicode-regexp": "error",
"no-loss-of-precision": "error",
// Make typescript-eslint rules more aggressive.
"@typescript-eslint/consistent-type-assertions": ["error", {
"assertionStyle": "never"
}],
// Don't need this given the above rule bans type assertions entirely.
"total-functions/no-unsafe-type-assertion": 0
}
};