-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
36 lines (33 loc) · 866 Bytes
/
index.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 eslint = require("@paciolan/eslint-config");
const react = {
parser: "babel-eslint",
plugins: ["babel", "react"],
env: {
browser: true
},
rules: {
"react/prop-types": "warn"
},
extends: ["plugin:react/recommended"],
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
settings: {
react: {
version: "detect"
}
}
};
// custom merge for @paciolan/eslint-config and @paciolan/eslint-config-react
const merge = (eslint, react) => ({
parser: react.parser,
env: Object.assign({}, eslint.env, react.env),
plugins: react.plugins.concat(eslint.plugins),
extends: eslint.extends.concat(react.extends),
rules: Object.assign({}, eslint.rules, react.rules),
parserOptions: Object.assign({}, eslint.parserOptions, react.parserOptions),
settings: react.settings
});
module.exports = merge(eslint, react);