2017-04-21 16:43:49 +02:00
|
|
|
root: true
|
|
|
|
|
2017-04-21 21:55:51 +02:00
|
|
|
plugins:
|
|
|
|
- markdown
|
|
|
|
|
2015-04-28 19:03:05 +02:00
|
|
|
env:
|
|
|
|
node: true
|
2016-02-13 22:57:34 +01:00
|
|
|
es6: true
|
2015-04-28 19:03:05 +02:00
|
|
|
|
2016-10-21 09:40:18 +02:00
|
|
|
parserOptions:
|
2017-02-07 10:41:49 +01:00
|
|
|
ecmaVersion: 2017
|
2016-10-21 09:40:18 +02:00
|
|
|
|
2015-04-28 19:03:05 +02:00
|
|
|
rules:
|
|
|
|
# Possible Errors
|
2016-03-03 22:45:08 +01:00
|
|
|
# http://eslint.org/docs/rules/#possible-errors
|
2016-02-06 05:39:45 +01:00
|
|
|
no-control-regex: 2
|
2015-04-28 19:03:05 +02:00
|
|
|
no-debugger: 2
|
|
|
|
no-dupe-args: 2
|
|
|
|
no-dupe-keys: 2
|
|
|
|
no-duplicate-case: 2
|
2016-02-06 05:39:45 +01:00
|
|
|
no-empty-character-class: 2
|
2015-04-28 19:03:05 +02:00
|
|
|
no-ex-assign: 2
|
2016-04-16 06:22:12 +02:00
|
|
|
no-extra-boolean-cast: 2
|
2016-07-13 00:09:41 +02:00
|
|
|
no-extra-parens: [2, functions]
|
2016-02-06 05:39:45 +01:00
|
|
|
no-extra-semi: 2
|
2016-02-11 00:05:36 +01:00
|
|
|
no-func-assign: 2
|
2016-01-25 22:15:16 +01:00
|
|
|
no-invalid-regexp: 2
|
|
|
|
no-irregular-whitespace: 2
|
2016-02-11 00:05:36 +01:00
|
|
|
no-obj-calls: 2
|
2016-08-14 00:06:43 +02:00
|
|
|
no-template-curly-in-string: 2
|
2016-01-25 22:15:16 +01:00
|
|
|
no-unexpected-multiline: 2
|
2016-02-06 05:39:45 +01:00
|
|
|
no-unreachable: 2
|
2016-08-14 00:06:43 +02:00
|
|
|
no-unsafe-negation: 2
|
2016-02-11 00:05:36 +01:00
|
|
|
use-isnan: 2
|
2016-02-06 05:39:45 +01:00
|
|
|
valid-typeof: 2
|
2015-04-28 19:03:05 +02:00
|
|
|
|
|
|
|
# Best Practices
|
2016-03-03 22:45:08 +01:00
|
|
|
# http://eslint.org/docs/rules/#best-practices
|
2016-09-18 07:43:49 +02:00
|
|
|
dot-location: [2, property]
|
2017-04-16 20:29:35 +02:00
|
|
|
eqeqeq: [2, smart]
|
2015-04-28 19:03:05 +02:00
|
|
|
no-fallthrough: 2
|
2016-08-14 00:06:43 +02:00
|
|
|
no-global-assign: 2
|
2016-05-09 08:09:22 +02:00
|
|
|
no-multi-spaces: 2
|
2016-02-11 00:05:36 +01:00
|
|
|
no-octal: 2
|
2017-06-01 09:57:06 +02:00
|
|
|
no-proto: 2
|
2016-01-14 01:14:28 +01:00
|
|
|
no-redeclare: 2
|
2017-06-01 09:57:06 +02:00
|
|
|
no-restricted-properties:
|
|
|
|
- 2
|
|
|
|
- object: assert
|
|
|
|
property: deepEqual
|
|
|
|
message: Use assert.deepStrictEqual().
|
|
|
|
- object: assert
|
|
|
|
property: equal
|
|
|
|
message: Use assert.strictEqual() rather than assert.equal().
|
|
|
|
- object: assert
|
|
|
|
property: notEqual
|
|
|
|
message: Use assert.notStrictEqual() rather than assert.notEqual().
|
|
|
|
- property: __defineGetter__
|
|
|
|
message: __defineGetter__ is deprecated.
|
|
|
|
- property: __defineSetter__
|
|
|
|
message: __defineSetter__ is deprecated.
|
2016-03-03 22:45:08 +01:00
|
|
|
no-self-assign: 2
|
2017-02-04 20:26:44 +01:00
|
|
|
no-throw-literal: 2
|
2016-02-22 06:19:32 +01:00
|
|
|
no-unused-labels: 2
|
2016-09-18 07:43:49 +02:00
|
|
|
no-useless-call: 2
|
2017-04-24 00:16:24 +02:00
|
|
|
no-useless-concat: 2
|
2016-09-18 07:43:49 +02:00
|
|
|
no-useless-escape: 2
|
2017-04-22 00:50:52 +02:00
|
|
|
no-useless-return: 2
|
2016-09-18 07:43:49 +02:00
|
|
|
no-void: 2
|
|
|
|
no-with: 2
|
2015-04-28 19:03:05 +02:00
|
|
|
|
2016-03-03 22:45:08 +01:00
|
|
|
# Strict Mode
|
|
|
|
# http://eslint.org/docs/rules/#strict-mode
|
2016-07-13 00:09:41 +02:00
|
|
|
strict: [2, global]
|
2016-03-03 22:45:08 +01:00
|
|
|
|
2016-02-19 08:01:06 +01:00
|
|
|
# Variables
|
|
|
|
# http://eslint.org/docs/rules/#variables
|
|
|
|
no-delete-var: 2
|
|
|
|
no-undef: 2
|
2016-07-13 00:09:41 +02:00
|
|
|
no-unused-vars: [2, {args: none}]
|
2016-02-19 08:01:06 +01:00
|
|
|
|
|
|
|
# Node.js and CommonJS
|
|
|
|
# http://eslint.org/docs/rules/#nodejs-and-commonjs
|
|
|
|
no-mixed-requires: 2
|
|
|
|
no-new-require: 2
|
2016-02-22 06:19:32 +01:00
|
|
|
no-path-concat: 2
|
2017-03-29 09:44:12 +02:00
|
|
|
no-restricted-modules: [2, sys]
|
2016-02-19 08:01:06 +01:00
|
|
|
|
2015-04-28 19:03:05 +02:00
|
|
|
# Stylistic Issues
|
2016-03-03 22:45:08 +01:00
|
|
|
# http://eslint.org/docs/rules/#stylistic-issues
|
2016-12-21 06:56:29 +01:00
|
|
|
block-spacing: 2
|
2016-07-13 00:09:41 +02:00
|
|
|
brace-style: [2, 1tbs, {allowSingleLine: true}]
|
2017-06-01 09:57:06 +02:00
|
|
|
comma-dangle: [2, only-multiline]
|
2015-06-28 17:42:35 +02:00
|
|
|
comma-spacing: 2
|
2016-09-18 07:43:49 +02:00
|
|
|
comma-style: 2
|
|
|
|
computed-property-spacing: 2
|
2016-02-08 05:57:14 +01:00
|
|
|
eol-last: 2
|
2016-08-14 00:06:43 +02:00
|
|
|
func-call-spacing: 2
|
2016-11-01 22:41:16 +01:00
|
|
|
func-name-matching: 2
|
2017-04-28 02:27:55 +02:00
|
|
|
func-style: [2, declaration, {allowArrowFunctions: true}]
|
2017-01-01 06:40:59 +01:00
|
|
|
indent: [2, 2, {ArrayExpression: first,
|
|
|
|
CallExpression: {arguments: first},
|
2017-01-09 00:23:34 +01:00
|
|
|
MemberExpression: 1,
|
2017-01-01 06:40:59 +01:00
|
|
|
ObjectExpression: first,
|
|
|
|
SwitchCase: 1}]
|
2016-07-13 00:09:41 +02:00
|
|
|
key-spacing: [2, {mode: minimum}]
|
2016-02-15 17:10:36 +01:00
|
|
|
keyword-spacing: 2
|
2016-07-13 00:09:41 +02:00
|
|
|
linebreak-style: [2, unix]
|
2017-05-03 07:01:57 +02:00
|
|
|
max-len: [2, {code: 80,
|
|
|
|
ignoreRegExpLiterals: true,
|
|
|
|
ignoreUrls: true,
|
|
|
|
tabWidth: 2}]
|
2016-02-08 05:57:14 +01:00
|
|
|
new-parens: 2
|
2016-02-08 19:41:15 +01:00
|
|
|
no-mixed-spaces-and-tabs: 2
|
2016-10-04 05:44:46 +02:00
|
|
|
no-multiple-empty-lines: [2, {max: 2, maxEOF: 0, maxBOF: 0}]
|
2017-04-02 08:06:31 +02:00
|
|
|
no-restricted-syntax: [2, {
|
|
|
|
selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]",
|
|
|
|
message: "setTimeout() must be invoked with at least two arguments."
|
|
|
|
}, {
|
|
|
|
selector: "CallExpression[callee.name='setInterval'][arguments.length<2]",
|
2017-04-06 04:11:48 +02:00
|
|
|
message: "setInterval() must be invoked with at least 2 arguments."
|
|
|
|
}, {
|
|
|
|
selector: "ThrowStatement > CallExpression[callee.name=/Error$/]",
|
|
|
|
message: "Use new keyword when throwing an Error."
|
|
|
|
}]
|
2016-09-18 07:43:49 +02:00
|
|
|
no-tabs: 2
|
2015-06-13 21:33:46 +02:00
|
|
|
no-trailing-spaces: 2
|
2017-02-19 13:45:30 +01:00
|
|
|
one-var-declaration-per-line: 2
|
2016-12-10 11:08:56 +01:00
|
|
|
operator-linebreak: [2, after]
|
2016-07-13 00:09:41 +02:00
|
|
|
quotes: [2, single, avoid-escape]
|
2016-02-08 05:57:14 +01:00
|
|
|
semi: 2
|
2016-09-18 07:43:49 +02:00
|
|
|
semi-spacing: 2
|
2016-07-13 00:09:41 +02:00
|
|
|
space-before-blocks: [2, always]
|
|
|
|
space-before-function-paren: [2, never]
|
|
|
|
space-in-parens: [2, never]
|
2016-02-08 05:57:14 +01:00
|
|
|
space-infix-ops: 2
|
2016-02-03 21:27:40 +01:00
|
|
|
space-unary-ops: 2
|
2017-02-21 18:35:09 +01:00
|
|
|
unicode-bom: 2
|
2015-04-28 19:03:05 +02:00
|
|
|
|
2015-10-08 19:40:10 +02:00
|
|
|
# ECMAScript 6
|
2016-02-09 05:23:42 +01:00
|
|
|
# http://eslint.org/docs/rules/#ecmascript-6
|
2016-07-13 00:09:41 +02:00
|
|
|
arrow-parens: [2, always]
|
|
|
|
arrow-spacing: [2, {before: true, after: true}]
|
2016-02-13 01:59:05 +01:00
|
|
|
constructor-super: 2
|
|
|
|
no-class-assign: 2
|
2016-02-15 17:10:36 +01:00
|
|
|
no-confusing-arrow: 2
|
2016-02-13 01:59:05 +01:00
|
|
|
no-const-assign: 2
|
|
|
|
no-dupe-class-members: 2
|
2016-02-22 06:19:32 +01:00
|
|
|
no-new-symbol: 2
|
2016-02-13 01:59:05 +01:00
|
|
|
no-this-before-super: 2
|
2016-09-30 02:22:36 +02:00
|
|
|
prefer-const: [2, {ignoreReadBeforeAssign: true}]
|
2016-08-11 23:29:22 +02:00
|
|
|
rest-spread-spacing: 2
|
2016-05-05 06:49:47 +02:00
|
|
|
template-curly-spacing: 2
|
2015-10-08 19:40:10 +02:00
|
|
|
|
2015-06-11 19:08:25 +02:00
|
|
|
# Custom rules in tools/eslint-rules
|
2016-04-20 00:47:12 +02:00
|
|
|
align-multiline-assignment: 2
|
2017-04-07 16:18:02 +02:00
|
|
|
assert-throws-arguments: [2, { requireTwo: true }]
|
2017-03-13 19:50:57 +01:00
|
|
|
no-unescaped-regexp-dot: 2
|
2015-04-28 19:03:05 +02:00
|
|
|
|
|
|
|
# Global scoped method and vars
|
2015-05-11 14:24:38 +02:00
|
|
|
globals:
|
2016-07-13 00:09:41 +02:00
|
|
|
COUNTER_HTTP_CLIENT_REQUEST: false
|
|
|
|
COUNTER_HTTP_CLIENT_RESPONSE: false
|
|
|
|
COUNTER_HTTP_SERVER_REQUEST: false
|
|
|
|
COUNTER_HTTP_SERVER_RESPONSE: false
|
|
|
|
COUNTER_NET_SERVER_CONNECTION: false
|
|
|
|
COUNTER_NET_SERVER_CONNECTION_CLOSE: false
|
|
|
|
DTRACE_HTTP_CLIENT_REQUEST: false
|
|
|
|
DTRACE_HTTP_CLIENT_RESPONSE: false
|
|
|
|
DTRACE_HTTP_SERVER_REQUEST: false
|
|
|
|
DTRACE_HTTP_SERVER_RESPONSE: false
|
|
|
|
DTRACE_NET_SERVER_CONNECTION: false
|
|
|
|
DTRACE_NET_STREAM_END: false
|
|
|
|
LTTNG_HTTP_CLIENT_REQUEST: false
|
|
|
|
LTTNG_HTTP_CLIENT_RESPONSE: false
|
|
|
|
LTTNG_HTTP_SERVER_REQUEST: false
|
|
|
|
LTTNG_HTTP_SERVER_RESPONSE: false
|
|
|
|
LTTNG_NET_SERVER_CONNECTION: false
|
|
|
|
LTTNG_NET_STREAM_END: false
|