-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.eslintrc.cjs
37 lines (36 loc) · 1.11 KB
/
.eslintrc.cjs
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
const { overrides } = require('@netlify/eslint-config-node')
module.exports = {
extends: '@netlify/eslint-config-node',
parserOptions: {
sourceType: 'module',
},
rules: {
'func-style': ['error', 'declaration'],
complexity: 'off',
'import/extensions': ['error', 'ignorePackages'],
'max-lines': 'off',
'n/no-missing-import': 'off',
'no-magic-numbers': 'off',
'max-lines-per-function': 'off',
// This rule enforces using Buffers with `JSON.parse()`. However, TypeScript
// does not recognize yet that `JSON.parse()` accepts Buffers as argument.
'unicorn/prefer-json-parse-buffer': 'off',
},
overrides: [
...overrides,
{
files: '*.ts',
rules: {
// Pure ES modules with TypeScript require using `.js` instead of `.ts`
// in imports
'import/extensions': 'off',
'import/no-namespace': 'off',
// https://github.com/typescript-eslint/typescript-eslint/issues/2483
'max-lines': 'off',
'max-statements': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
},
},
],
}