This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
43 lines (40 loc) · 1.54 KB
/
.eslintrc.js
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
module.exports = {
extends: ['@readme/eslint-config', '@readme/eslint-config/typescript'],
plugins: ['node', '@typescript-eslint', 'import'],
root: true,
rules: {
// Disable requiring return types because it's too easy to broaden them by accident.
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-var-requires': 'warn',
'import/no-unresolved': [
'error',
{
ignore: [
// We're just importing types, so we don't need this unresolved.
'har-format',
],
},
],
'no-underscore-dangle': ['error', { allow: ['_id', '_body', '__bodyCache'] }],
// We use `lodash` because it allows for more flexibility that we can't get with standard object accessors.
'you-dont-need-lodash-underscore/get': 'off',
'you-dont-need-lodash-underscore/omit': 'off',
},
overrides: [
{
files: ['examples/**/*.js'],
rules: {
// This was getting really weird in the examples/ folder
// where I know `readmeio` isn't going to be resolvable yet.
// In some versions of node that is true, but in others it's false
// which was causing this rule to trigger 🤯
'eslint-comments/no-unused-disable': 'off',
// We don't want the top level eslint task to fail if the examples
// folders are missing dependencies. These will be tested separately
// during the integration testing step.
'import/no-unresolved': 'off',
},
},
],
};