-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
92 lines (92 loc) · 2.48 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
module.exports = {
env: {
node: true,
browser: true,
},
plugins: [
'meteor',
'underscore',
'react-hooks',
],
extends: [
'@meteorjs/eslint-config-meteor',
'airbnb-base',
'plugin:meteor/recommended',
],
settings: {
'import-resolver': 'meteor',
'import/core-modules': [
'meteor',
],
},
globals: {
_: false,
},
rules: {
semi: ['error', 'never'],
'semi-style': ['error', 'first'],
'space-before-function-paren': ['error', {
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
}],
'no-underscore-dangle': ['off', {
allow: [
'_id',
'__',
'_name',
],
},
],
'no-param-reassign': ['error', { props: false }],
'implicit-arrow-linebreak': ['off'],
'arrow-body-style': 'off',
// Remove if we replace confirms with something better
'no-alert': 'off',
'one-var': 'off',
'one-var-declaration-per-line': ['error', 'initializations'],
'no-new': 'off', // Commonly used in Meteor
'object-shorthand': ['error', 'always'],
'arrow-parens': 'off',
'no-nested-ternary': 'off',
'no-unused-vars': ['error', { args: 'after-used', ignoreRestSiblings: true }],
'prefer-destructuring': ['error', { object: true, array: false }],
'operator-linebreak': ['error', 'before', { overrides: { '=': 'after' } }],
// Remove if we add proper logging
'no-console': 'off',
'import/prefer-default-export': 'off',
'import/extensions': ['error', 'always', { js: 'never' }],
'import/no-unresolved': ['error', {
ignore: [
'meteor',
],
}],
'meteor/eventmap-params': ['error', {
templateInstanceParamName: 'template',
}],
'react/jsx-one-expression-per-line': 'off',
'react/jsx-fragments': ['warn', 'syntax'],
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/destructuring-assignment': 'off',
'jsx-a11y/label-has-associated-control': ['error', {
controlComponents: ['Field'],
}],
'jsx-a11y/label-has-for': 'off', // Deprecated for above
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
// Below added to workaround babel-eslint bug github.com/babel/babel-eslint/issues/799
indent: [
'error',
2,
{
ignoredNodes: [
'TemplateLiteral',
],
},
],
'template-curly-spacing': ['off', 'never'],
// end bugfix
},
}