forked from Azure/autorest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.default-eslintrc.yaml
105 lines (94 loc) · 3.22 KB
/
.default-eslintrc.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
parser: "@typescript-eslint/parser"
plugins:
- "@typescript-eslint"
- prettier
- unicorn
- node
- jest
- import
env:
es6: true
node: true
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- plugin:node/recommended
- plugin:jest/recommended
- plugin:jest/recommended
- plugin:import/recommended
- plugin:import/typescript
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parserOptions:
ecmaVersion: 2018
sourceType: module
warnOnUnsupportedTypeScriptVersion: false
project: ./tsconfig.json
rules:
"@typescript-eslint/no-unsafe-declaration-merging": off
"@typescript-eslint/no-this-alias": off
"@typescript-eslint/interface-name-prefix": off
"@typescript-eslint/explicit-function-return-type": off
"@typescript-eslint/no-explicit-any": off
"@typescript-eslint/no-empty-interface": off
"@typescript-eslint/no-namespace": off
"@typescript-eslint/explicit-member-accessibility": off
"@typescript-eslint/no-unused-vars": off
"@typescript-eslint/no-parameter-properties": off
"@typescript-eslint/no-angle-bracket-type-assertion": off
"@typescript-eslint/no-use-before-define": off
"@typescript-eslint/no-var-requires": off
"@typescript-eslint/no-empty-function": off
"@typescript-eslint/explicit-module-boundary-types": off
"@typescript-eslint/ban-types": off
"@typescript-eslint/consistent-type-assertions": off
"@typescript-eslint/no-floating-promises": warn
"require-atomic-updates": off
# Prettier config https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
prettier/prettier: off # Don't run prettier in eslint we have rush check-format for that.
arrow-body-style: off
prefer-arrow-callback: off
# Unicorn plugin config
unicorn/filename-case: warn
# =================================================
# Node plugin
# =================================================
# Prevent from using method that are not yet availalbe in the supported version of node.(see engines field of package.json)
node/no-unsupported-features/node-builtins: error
node/no-unsupported-features/es-builtins: error
node/no-unsupported-features/es-syntax: off # Disabling this one otherwise it will complain about typescript imports which get transpiled.
node/no-missing-import: off
node/shebang: off
node/no-unpublished-import: off
# =================================================
# Jest plugin
# =================================================
jest/no-deprecated-functions: off
jest/expect-expect: off
jest/no-standalone-expect: off
jest/no-focused-tests: warn
jest/no-identical-title: warn
# =================================================
# Import plugin
# =================================================
import/no-default-export: warn
import/no-self-import: warn # This cause many circular dependency issues with index files.
import/no-internal-modules: off
import/no-unresolved: off
import/order:
- warn
- groups: ["builtin", "external", "parent", "sibling", "index"]
alphabetize:
order: "asc"
caseInsensitive: true
# Basic config
no-console: warn
no-undef: off
no-unused-vars: off
no-multiple-empty-lines:
- warn
- max: 2
maxBOF: 0
maxEOF: 1