-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
66 lines (64 loc) · 1.7 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
const fs = require('fs');
const path = require('path');
const isProduction = process.env.ENV === 'production';
const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
);
module.exports = {
root: true,
env: {
browser: true,
jquery: true,
commonjs: true,
es6: true,
'jest/globals': true,
},
extends: ['airbnb-base', 'prettier'],
plugins: ['prettier', 'html'],
rules: {
'prettier/prettier': ['error', prettierOptions],
'no-console': 'off',
'no-debugger': isProduction ? 'error' : 'off',
'no-unused-vars': 'off',
'eol-last': 'off',
'linebreak-style': 'off',
'no-param-reassign': 'off',
'no-script-url': 'off',
'no-return-assign': 'off',
'no-multi-assign': 'off',
'no-template-curly-in-string': 'off',
'no-plusplus': 'off',
'global-require': 'off',
'no-webpack-loader-syntax': 'off',
'import/prefer-default-export': 'off',
'prefer-promise-reject-errors': 'off',
'class-methods-use-this': 'off',
radix: 'off',
'no-shadow': 'off',
'prefer-destructuring': 'off',
'func-names': 'off',
'arrow-body-style': 'off',
'no-restricted-globals': 'off',
'no-underscore-dangle': 'off',
'function-paren-newline': 'off',
'no-throw-literal': 'off',
camelcase: 'off',
'no-empty': ['error', { allowEmptyCatch: true }],
'max-len': ['error', { code: 300 }],
'import/extensions': 'off',
'import/no-unresolved': 'off',
},
settings: {
'import/resolver': 'webpack',
},
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
allowImportExportEverywhere: true,
},
globals: {
$: true,
jquery: true,
console: true,
},
};