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
|
|
|
|
|
|
|
rules:
|
|
|
|
# Possible Errors
|
2016-03-03 22:45:08 +01:00
|
|
|
# http://eslint.org/docs/rules/#possible-errors
|
2016-07-13 00:09:41 +02:00
|
|
|
comma-dangle: [2, only-multiline]
|
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-02-09 05:23:42 +01:00
|
|
|
no-proto: 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]
|
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
|
2016-01-14 01:14:28 +01:00
|
|
|
no-redeclare: 2
|
2016-03-03 22:45:08 +01:00
|
|
|
no-self-assign: 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
|
|
|
|
no-useless-escape: 2
|
|
|
|
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
|
2016-07-13 00:09:41 +02:00
|
|
|
no-restricted-modules: [2, sys, _linklist]
|
2016-09-10 05:37:32 +02:00
|
|
|
no-restricted-properties: [2, {
|
|
|
|
object: assert,
|
|
|
|
property: deepEqual,
|
|
|
|
message: Please use assert.deepStrictEqual().
|
|
|
|
}]
|
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-07-13 00:09:41 +02:00
|
|
|
brace-style: [2, 1tbs, {allowSingleLine: true}]
|
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-08-06 21:11:38 +02:00
|
|
|
indent: [2, 2, {SwitchCase: 1, MemberExpression: 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]
|
2015-06-11 19:08:25 +02:00
|
|
|
max-len: [2, 80, 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
|
2015-06-13 21:33:46 +02:00
|
|
|
no-multiple-empty-lines: [2, {max: 2}]
|
2016-09-18 07:43:49 +02:00
|
|
|
no-tabs: 2
|
2015-06-13 21:33:46 +02:00
|
|
|
no-trailing-spaces: 2
|
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
|
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-19 06:44:30 +02:00
|
|
|
align-function-arguments: 2
|
2016-04-20 00:47:12 +02:00
|
|
|
align-multiline-assignment: 2
|
2016-04-18 19:56:37 +02:00
|
|
|
assert-fail-single-argument: 2
|
2016-07-13 00:09:41 +02:00
|
|
|
new-with-error: [2, Error, RangeError, TypeError, SyntaxError, ReferenceError]
|
2016-05-15 19:01:44 +02:00
|
|
|
no-definegetter-definesetter: 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
|