-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
36 lines (35 loc) · 1.11 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
const prettierConfig = require('./prettier.config');
module.exports = {
parser: 'babel-eslint',
plugins: ['prettier', 'import'],
extends: ['eslint:recommended', 'prettier', 'plugin:prettier/recommended'],
env: { browser: true, node: true, es6: true },
parserOptions: { ecmaVersion: 6 },
rules: {
'prettier/prettier': ['warn', prettierConfig],
eqeqeq: 'warn',
'guard-for-in': 'error',
'no-console': 'off',
'no-multiple-empty-lines': ['warn', { max: 1 }],
'no-duplicate-imports': 'warn',
'no-shadow': 'error',
'no-unused-vars': 'warn',
'no-use-before-define': ['error', 'nofunc'],
'no-var': 'error',
'object-shorthand': 'warn',
'one-var': ['warn', 'never'],
'prefer-const': 'warn',
'prefer-template': 'warn',
'sort-imports': ['warn', { ignoreDeclarationSort: true }],
'spaced-comment': 'warn',
'import/first': 'warn',
'import/newline-after-import': 'warn',
'import/order': [
'warn',
{
'newlines-between': 'always',
groups: [['builtin', 'external'], 'internal', ['sibling', 'parent'], 'index'],
},
],
},
};