forked from readmeio/rdme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
26 lines (25 loc) · 977 Bytes
/
.eslintrc
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
{
"extends": ["@readme/eslint-config"],
"root": true,
"parserOptions": {
"ecmaVersion": 2020
},
"rules": {
/**
* Because our command classes have a `run` method that might not always call `this` we need to
* explicitly exclude `run` from this rule.
*/
"class-methods-use-this": ["error", { "exceptMethods": ["run"] }],
/**
* This is a small rule to prevent us from using console.log() statements in our commands.
*
* We've had troubles in the past where our test coverage required us to use Jest mocks for
* console.log() calls, hurting our ability to write resilient tests and easily debug issues.
*
* We should be returning Promise-wrapped values in our main command functions
* so we can write robust tests and take advantage of `bin/rdme`,
* which we use for printing function outputs and returning correct exit codes.
*/
"no-console": ["warn", { "allow": ["info", "warn"] }]
}
}