2017-04-22 14:22:40 +02:00
|
|
|
## Docs-specific linter rules
|
|
|
|
|
2017-04-21 21:55:51 +02:00
|
|
|
rules:
|
2017-06-01 16:30:17 +02:00
|
|
|
object-curly-spacing: [2, always]
|
|
|
|
|
2017-04-22 14:22:40 +02:00
|
|
|
# ease some restrictions in doc examples
|
2017-04-21 21:55:51 +02:00
|
|
|
no-restricted-properties: 0
|
|
|
|
no-undef: 0
|
|
|
|
no-unused-vars: 0
|
2017-04-22 14:22:40 +02:00
|
|
|
strict: 0
|
|
|
|
|
|
|
|
# add new ECMAScript features gradually
|
|
|
|
no-var: 2
|
|
|
|
prefer-const: 2
|
2017-06-02 11:20:47 +02:00
|
|
|
prefer-rest-params: 2
|
2017-06-27 22:33:07 +02:00
|
|
|
|
|
|
|
# use stricter indent over indent-legacy
|
|
|
|
indent-legacy: 0
|
|
|
|
indent: [2, 2, {ArrayExpression: first,
|
|
|
|
CallExpression: {arguments: first},
|
|
|
|
FunctionDeclaration: {parameters: first},
|
|
|
|
FunctionExpression: {parameters: first},
|
|
|
|
MemberExpression: off,
|
|
|
|
ObjectExpression: first,
|
|
|
|
SwitchCase: 1}]
|