forked from netlify/build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
48 lines (43 loc) · 1.37 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
44
45
46
47
48
'use strict'
const { overrides } = require('@netlify/eslint-config-node')
module.exports = {
extends: '@netlify/eslint-config-node',
rules: {
strict: 2,
// Fails with npm 7 monorepos due to the following bug:
// https://github.com/benmosher/eslint-plugin-import/issues/1986
'import/no-extraneous-dependencies': 0,
'import/no-unresolved': 0,
'node/no-missing-require': 0,
// eslint-plugin-ava needs to know where test files are located
'ava/no-ignored-test-files': [2, { files: ['tests/**/*.js', '!tests/{helpers,fixtures}/**/*.{js,json}'] }],
'ava/no-import-test-files': [2, { files: ['tests/**/*.js', '!tests/{helpers,fixtures}/**/*.{js,json}'] }],
},
overrides: [
...overrides,
{
files: ['**/fixtures/**/*.js'],
rules: {
'import/no-unresolved': 0,
},
},
{
files: ['**/fixtures/handlers_*/**/*.js'],
parserOptions: {
sourceType: 'module',
},
rules: {
'node/no-unsupported-features/es-syntax': 0,
},
},
// @todo As it stands, this rule is problematic with methods that get+send
// many parameters, such as `runCommand` in `src/commands/run_command.js`.
// We should discuss whether we want to keep this rule or discontinue it.
{
files: ['packages/build/**/*.js'],
rules: {
'max-lines-per-function': 'off',
},
},
],
}