forked from prettier/eslint-config-prettier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.base.js
71 lines (69 loc) · 1.89 KB
/
.eslintrc.base.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
70
71
"use strict";
const pkg = require("./package.json");
module.exports = {
extends: [
"google",
"plugin:flowtype/recommended",
"plugin:react/all",
"plugin:unicorn/recommended",
"plugin:vue/recommended"
],
plugins: [
"prettier",
...pkg.files
.filter(name => !name.includes("/") && name !== "index.js")
.map(ruleFileName => ruleFileName.replace(/\.js$/, ""))
],
parserOptions: {
parser: "babel-eslint",
ecmaVersion: 2018,
sourceType: "script",
// Needed for the lint-verify-fail.test.js test.
loggerFn: () => {},
ecmaFeatures: {
jsx: true
}
},
env: {
es6: true,
node: true
},
rules: {
indent: "off",
"no-dupe-keys": "error",
strict: "error",
"prefer-spread": "off",
"require-jsdoc": "off",
"prettier/prettier": ["error", {}],
// Force a conflict with Prettier in test-lint/flowtype.js.
"flowtype/object-type-delimiter": ["error", "semicolon"],
"react/jsx-filename-extension": "off",
"react/jsx-no-bind": "off",
// Force a conflict with Prettier in test-lint/standard.js.
"standard/computed-property-even-spacing": ["error", "even"],
"unicorn/consistent-function-scoping": "off",
"unicorn/filename-case": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/prefer-flat-map": "off",
"unicorn/prevent-abbreviations": "off",
// Force a conflict with Prettier in test-lint/babel.js.
"object-curly-spacing": "off",
"babel/object-curly-spacing": ["error", "never"]
},
overrides: [
{
files: ["*.ts", "*.tsx"],
parserOptions: { parser: "@typescript-eslint/parser" },
rules: {
// Force a conflict with Prettier in test-lint/typescript.js.
// This is included in "plugin:@typescript-eslint/recommended".
"@typescript-eslint/indent": "error"
}
}
],
settings: {
react: {
version: "16"
}
}
};