forked from neutrinojs/webpack-chain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
56 lines (55 loc) · 1.61 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
/* eslint-disable import/no-extraneous-dependencies */
const {
rules: airbnbBaseStyle,
} = require('eslint-config-airbnb-base/rules/style');
const {
rules: airbnbBaseBestPractices,
} = require('eslint-config-airbnb-base/rules/best-practices');
module.exports = {
extends: [
'eslint-config-airbnb-base',
'plugin:prettier/recommended',
'prettier/babel',
'plugin:ava/recommended',
],
plugins: ['eslint-plugin-babel', 'eslint-plugin-ava'],
parser: 'babel-eslint',
env: {
es6: true,
commonjs: true,
node: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
// Disable rules for which there are eslint-plugin-babel replacements:
// https://github.com/babel/eslint-plugin-babel#rules
'new-cap': 'off',
'no-invalid-this': 'off',
'object-curly-spacing': 'off',
semi: 'off',
'no-unused-expressions': 'off',
// Ensure the replacement rules use the options set by airbnb rather than ESLint defaults.
'babel/new-cap': airbnbBaseStyle['new-cap'],
'babel/no-invalid-this': airbnbBaseBestPractices['no-invalid-this'],
'babel/object-curly-spacing': airbnbBaseStyle['object-curly-spacing'],
'babel/semi': airbnbBaseStyle.semi,
'babel/no-unused-expressions':
airbnbBaseBestPractices['no-unused-expressions'],
'class-methods-use-this': 'off',
'no-shadow': 'off',
'no-underscore-dangle': 'off',
'prettier/prettier': [
'error',
{
singleQuote: true,
jsxBracketSameLine: true,
trailingComma: 'all',
proseWrap: 'always',
endOfLine: 'lf',
},
],
},
};