mirror of
https://github.com/zhigang1992/yarn.git
synced 2026-04-30 10:11:50 +08:00
**Summary** .eslintrc is deprecated: https://eslint.org/docs/user-guide/configuring#configuration-file-formats **Test plan** ESLint should work the same as before.
43 lines
990 B
JSON
43 lines
990 B
JSON
{
|
|
"extends": "eslint-config-fb-strict",
|
|
"env": {
|
|
"jest": true
|
|
},
|
|
"plugins": [
|
|
"flowtype",
|
|
"yarn-internal",
|
|
"prettier"
|
|
],
|
|
"rules": {
|
|
"yarn-internal/warn-language": "error",
|
|
"max-len": ["error", 120],
|
|
"prefer-arrow-callback": "off",
|
|
"flowtype/require-valid-file-annotation": ["error", "always"],
|
|
"flowtype/space-after-type-colon": ["error", "always"],
|
|
"flowtype/require-return-type": ["error", "always", {"excludeArrowFunctions": true}],
|
|
"require-await": "error",
|
|
"no-process-exit": "error",
|
|
"no-return-await": "error",
|
|
"sort-keys": "off",
|
|
"prettier/prettier": ["error", {
|
|
"singleQuote": true,
|
|
"trailingComma": "all",
|
|
"bracketSpacing": false,
|
|
"printWidth": 120,
|
|
"parser": "flow"
|
|
}]
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": [
|
|
"__tests__/fixtures/**/*.js",
|
|
"bin/*.js",
|
|
"src/cli/index.js"
|
|
],
|
|
"rules": {
|
|
"no-console": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|