-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
69 lines (69 loc) · 2.32 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
module.exports = {
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
plugins: ['@typescript-eslint', 'prettier', '@manifoldco/stencil'],
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
legacyDecorators: true,
jsx: true,
},
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
},
},
rules: {
'@manifoldco/stencil/component-prefix': ['error', { prefix: 'manifold-' }],
'@manifoldco/stencil/require-render-decorator': 'off',
'@manifoldco/stencil/restrict-required-props': 'error',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-unused-vars': 'off', // compiler catches these well enough
'arrow-parens': 'off', // let Prettier decide
camelcase: 'off', // underscores are a thing
'class-methods-use-this': 'off', // component lifecycle methods sometimes don't use `this`
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
exports: 'never',
functions: 'never', // function commas are weird
imports: 'always-multiline',
objects: 'always-multiline',
},
],
curly: ['error', 'all'],
'func-names': 'off',
'function-paren-newline': 'off', // let Prettier decide
'implicit-arrow-linebreak': 'off', // let Prettier decide
'import/extensions': 'off', // TypeScript handles this
'import/no-named-as-default': 'off',
'import/no-extraneous-dependencies': 'off', // We need zero deps for npm
'import/prefer-default-export': 'off', // named exports are perfectly fine
'lines-between-class-members': 'off', // class members don’t need that space!
'max-len': 'off', // let Prettier decide
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-fallthrough': 'off',
'no-irregular-whitespace': 'off',
'object-curly-newline': 'off', // let Prettier decide,
'prettier/prettier': 'error',
'no-return-assign': 'off',
},
};