forked from dsriseah/ursys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc-rules.js
59 lines (55 loc) · 1.81 KB
/
.eslintrc-rules.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
/*///////////////////////////////// ABOUT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\
These are the specific overrides we use. It's imported in our
.eslintrc.js file
\*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ * /////////////////////////////////////*/
/// RULE OVERRIDES ////////////////////////////////////////////////////////////
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const URSYS_STYLE = {
/* ursys style overrides */
'spaced-comment': 'off',
'camelcase': 'off',
'comma-dangle': ['error', 'never'],
'no-underscore-dangle': 'off',
'lines-between-class-members': 'off',
'no-bitwise': 'off',
'import/prefer-default-export': 'off',
'object-shorthand': 'off'
};
/* allow debugging features */
const BROWSER_DEBUG = {
'no-console': 'off',
'no-debugger': 'warn',
'no-alert': 'warn',
'no-restricted-syntax': 'off'
};
/* turn off typescript recommendations */
const HELP_TSJS = {
'no-undef': 'off', // @typescript-eslint/no-undef handles this better
'no-unused-vars': 'off', // @typescript-eslint/no-unused-vars handles this better
'no-shadow': 'off',
'no-param-reassign': 'off',
'object-curly-newline': 'off',
'react/jsx-props-no-spreading': 'off',
'arrow-body-style': 'off',
'no-plusplus': 'off',
'prefer-const': 'off',
'prefer-destructuring': 'off',
'class-methods-use-this': 'off',
'jsx-a11y/label-has-associated-control': 'off'
};
/* disable prettier conflicts manually */
const YUCK_PRETTIER = {
'arrow-parens': 'off'
};
/* these are our specific overrides of the recommended rules */
const RULES = {
...URSYS_STYLE,
...BROWSER_DEBUG,
...HELP_TSJS,
...YUCK_PRETTIER
};
/// EXPORTS ///////////////////////////////////////////////////////////////////
/// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
module.exports = {
RULES
};