forked from web-scrobbler/web-scrobbler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.yml
191 lines (138 loc) · 4.81 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
env:
browser: true
es6: true
node: true
mocha: true
parserOptions:
ecmaVersion: 8
extends: 'eslint:recommended'
globals:
$: readonly
browser: readonly
chrome: readonly
define: readonly
plugins: [jsdoc]
rules:
# Possible errors
# Enforce "for" loop update clause moving the counter
# in the right direction
for-direction: error
# Disallow unnecessary parentheses
no-extra-parens: error
# Disallow template literal placeholder syntax in regular string
no-template-curly-in-string: error
# Disallow assignments that can lead to race conditions due to
# usage of await or yield
# NOTE: This rule produces false positive results
# for the extension code, so it's turned off.
require-atomic-updates: off
# Best practices
# Enforce consistent brace style for all control statements
curly: error
# Require the use of === and !==
eqeqeq: error
# Disallow `else` blocks after `return` statements in `if` statements
no-else-return: error
# Disallow empty functions
no-empty-function: error
# Disallow function declarations and expressions inside loop statements
no-loop-func: error
# Disallow new operators with the String, Number, and Boolean objects
no-new-wrappers: error
# Disallow reassigning function parameters
no-param-reassign: error
# Disallow unnecessary concatenation of strings
no-useless-concat: error
# Disallow redundant return statements
no-useless-return: error
# Strict mode
# Require global strict mode directive
strict: [error, global]
# Stylistic issues
# Require 'one true brace style', in which the opening brace
# of a block is placed on the same line as its corresponding
# statement or declaration
brace-style: [error, 1tbs]
# Disallow spaces inside of brackets
array-bracket-spacing: [error, never]
# Require CamelCase
camelcase: [error, {properties: never}]
# Require space after comma
comma-spacing: [error, {after: true}]
# Require newline at the end of files
eol-last: [error, always]
# Disallow spacing between function identifiers and their invocations
func-call-spacing: error
# Use tabs as indentation
# Enforce indentation level for case clauses in switch statements
indent: [error, tab, {SwitchCase: 1}]
# Require space after colon in object literal properties
key-spacing: [error, {afterColon: true}]
# Require space before and after keywords
keyword-spacing: [error]
# Require Unix line endings
linebreak-style: [error, unix]
# Disallow empty block statements
no-empty: [error, {allowEmptyCatch: true}]
# Disallow `if` statements as the only statement in `else` blocks
no-lonely-if: error
# Disallow multiple spaces
no-multi-spaces: error
# Disallow nested ternary expressions
no-nested-ternary: error
# Disallow trailing whitespace at the end of lines
no-trailing-spaces: error
# Disallow ternary operators when simpler alternatives exist
no-unneeded-ternary: error
# Disallow whitespace before properties
no-whitespace-before-property: error
one-var: [error, never]
# Require spaces inside curly braces
object-curly-spacing: [error, always]
# Require single quotes
quotes: [error, single]
# Require space before blocks
space-before-blocks: [error, always]
# Disallow a space before function parenthesis
space-before-function-paren: [error, never]
# Disallow spaces inside of parentheses
space-in-parens: error
# Require spacing around infix operators
space-infix-ops: error
# Enforce consistent spacing after the # or /* in a comment
spaced-comment: error
# Require semicolon at the end of statement
semi: [error, always]
# Enforce spacing around colons of switch statements
switch-colon-spacing: [error, {after: true, before: false}]
# ECMAScript 6
# Require parentheses around arrow function arguments
arrow-parens: error
arrow-spacing: error
# Require let or const instead of var
no-var: error
# Require method and property shorthand syntax for object literals
object-shorthand: [error, always]
# Require `const` declarations for variables
# that are never reassigned after declared
prefer-const: [error, { destructuring: all }]
# Require template literals instead of string concatenation
prefer-template: error
# Disallow spacing around embedded expressions of template strings
template-curly-spacing: error
# JSDoc plugin
jsdoc/check-param-names: 1
jsdoc/check-syntax: 1
jsdoc/check-tag-names: 1
jsdoc/check-types: [1, {noDefaults: true}]
jsdoc/no-undefined-types: 1
jsdoc/require-param: 1
jsdoc/require-param-description: 1
jsdoc/require-param-name: 1
jsdoc/require-param-type: 1
jsdoc/require-returns-check: 1
jsdoc/require-returns-description: 1
jsdoc/require-returns-type: 1
jsdoc/valid-types: 1
settings:
jsdoc: {tagNamePreference: {class: constructor, returns: return}}