forked from webex/webex-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
119 lines (117 loc) · 2.7 KB
/
.eslintrc.yml
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
extends: "@webex/eslint-config-base"
globals:
PACKAGE_VERSION: false
root: true
rules:
no-warning-comments: warn
require-jsdoc:
- error
- require:
FunctionDeclaration: true
MethodDefinition: true
ClassDeclaration: true
ArrowFunctionExpression: false
FunctionExpression: true
valid-jsdoc:
- error
-
matchDescription: ".+"
prefer:
arg: param
argument: param
return: returns
virtual: abstract
fires: emits
requireParamDescription: false
requireReturn: false
requireReturnType: true
requireReturnDescription: false
# These warnings are transitional during the change from the in-repo config to
# our new style guide
class-methods-use-this: warn
max-len:
- warn
-
ignoreComments: true
no-multi-assign: warn
no-param-reassign: warn
no-shadow: warn
no-underscore-dangle: warn
import/first: warn
import/order: warn
prefer-destructuring:
- error
- VariableDeclarator:
array: false
object: true
AssignmentExpression:
array: false
object: false
- enforceForRenamedProperties: false
no-use-before-define:
- error
-
classes: false
functions: false
variables: true
overrides:
# Reduce the severity of jsdoc violations
# TODO move to the transitional section once the core section moves to core
-
files:
- packages/node_modules/**/*.js
rules:
valid-jsdoc:
- error
-
prefer:
arg: param
argument: param
return: returns
virtual: abstract
fires: emits
requireParamDescription: false
requireReturn: true
requireReturnType: true
requireReturnDescription: false
require-jsdoc:
- warn
- require:
FunctionDeclaration: true
MethodDefinition: true
ClassDeclaration: true
ArrowFunctionExpression: false
FunctionExpression: true
# Relax rules in tests
-
files:
- 'packages/node_modules/**/test/**/*.js'
- 'packages/node_modules/**/*-spec/**/*.js'
env:
mocha: true
rules:
func-names: 0
no-invalid-this: 0
require-jsdoc: 0
# Set webdriver.io globals
-
files:
- 'wdio.helpers.d/**/*.js'
- 'packages/node_modules/**/test/wdio/**/*.js'
globals:
browser: false
$: false
$$: false
step: false
-
files:
- packages/node_modules/@webex/xunit-with-logs
rules:
func-names: 0
no-console: 0
# Allow cli tools to use sync methods
-
files:
- packages/node_modules/**/bin-*/**
rules:
no-sync: 0