forked from netlify/gotrue-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
77 lines (75 loc) · 1.89 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
const { overrides } = require('@netlify/eslint-config-node');
module.exports = {
extends: '@netlify/eslint-config-node',
parserOptions: {
sourceType: 'module',
},
env: {
browser: true,
node: true,
es6: true,
},
rules: {
// eslint-plugin-ava needs to know where test files are located
'ava/no-ignored-test-files': [2, { files: ['tests/**/*.js'] }],
// TODO: enable these rules
'consistent-this': 0,
'unicorn/no-this-assignment': 0,
'func-style': 0,
'no-throw-literal': 0,
'no-param-reassign': 0,
'no-magic-numbers': 0,
'fp/no-mutation': 0,
'fp/no-let': 0,
'fp/no-class': 0,
'fp/no-this': 0,
'fp/no-loops': 0,
'fp/no-delete': 0,
'fp/no-mutating-assign': 0,
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-unused-vars': ['error', { vars: 'all', args: 'none', ignoreRestSiblings: true }],
'no-underscore-dangle': 0,
complexity: 0,
'max-depth': 0,
'max-lines': 0,
'promise/prefer-await-to-then': 0,
'promise/no-return-wrap': 0,
'promise/no-nesting': 0,
'node/no-unsupported-features/es-syntax': 0,
camelcase: 0,
'unicorn/prefer-prototype-methods': 0,
},
overrides: [
...overrides,
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
],
},
{
files: ['tests/**/*.js'],
rules: {
'node/no-unpublished-import': 0,
},
},
{
// TODO: remove this
files: ['README.md'],
rules: {
'node/no-missing-import': 0,
'no-console': 0,
'promise/always-return': 0,
'require-await': 0,
'node/exports-style': 0,
'no-shadow': 0,
},
},
],
};