addons-frontend/.eslintrc

93 строки
2.8 KiB
Plaintext
Исходник Обычный вид История

2016-02-23 19:05:25 +03:00
{
2018-06-27 18:00:54 +03:00
"extends": [
"amo",
"plugin:amo/recommended"
],
"globals": {
"CLIENT_CONFIG": true,
"document": true,
2017-05-22 19:05:15 +03:00
"webpackIsomorphicTools": true,
"ga": true,
// https://flow.org/en/docs/types/utilities/#toc-objmap
"$ObjMap": true,
// https://flow.org/en/docs/types/utilities/#toc-propertytype
"$PropertyType": true,
// These are undocumented utilities that ship with Flow
// https://github.com/facebook/flow/issues/875
"$ReadOnlyArray": true,
"$Rest": true,
"$Shape": true,
"$Keys": true,
2018-09-17 13:02:37 +03:00
"$Values": true,
// See: https://github.com/facebook/flow/issues/1609
"SyntheticEvent": true,
"SyntheticInputEvent": true,
// See: https://github.com/facebook/flow/issues/5627
"TimeoutID": true,
// Standard DOM globals:
"Generator": true,
"HTMLAnchorElement": true,
"HTMLButtonElement": true,
"HTMLElement": true,
"HTMLInputElement": true,
2018-01-18 00:54:52 +03:00
"HTMLSelectElement": true,
"HTMLTextAreaElement": true,
"Node": true,
// This is used to send form data to the API.
"FormData": true,
// This is used to upload files in the browser.
"File": true,
"FileReader": true,
"ProgressEvent": true,
// Types that can be used with sendBeacon:
"BodyInit": true
},
"parser": "babel-eslint",
2016-02-24 15:27:44 +03:00
"rules": {
// These rules are not compatible with Prettier.
"implicit-arrow-linebreak": "off",
2018-06-22 21:55:18 +03:00
"indent": "off",
"no-mixed-operators": "off",
"operator-linebreak": "off",
"react/jsx-one-expression-per-line": "off",
2019-08-26 13:10:49 +03:00
"react/jsx-curly-newline": "off",
// We omit `debug` because we don't turn that on by default.
"amo/only-log-strings": ["error", {
"methods": ["fatal", "info", "error", "warn"]
2019-01-07 13:48:26 +03:00
}],
2019-06-03 19:56:13 +03:00
"react/default-props-match-prop-types": "off",
// This rule is disabled because it outputs a lot of false positives, see:
// https://github.com/benmosher/eslint-plugin-import/issues/1343
"import/no-cycle": "off",
// This rule is only a warning but it is too noisy: we have test cases
// without `expect` because we're using `sinon` too.
"jest/expect-expect": "off"
},
"settings": {
"import/core-modules": [
// This is a workaround for: https://github.com/benmosher/eslint-plugin-import/issues/793
"redux-saga/effects",
],
"import/ignore": [
// Because of CommonJS incompatibility, we can't
// check for bad imports in node_modules.
"node_modules",
// Ignore non-JS imports.
2016-08-22 22:59:41 +03:00
"\\.gif$",
"\\.jpeg$",
"\\.jpg$",
"\\.mp4$",
2016-08-22 22:59:41 +03:00
"\\.png$",
"\\.scss$",
"\\.svg$",
"\\.webm$"
],
"import/resolver": {
"node": {
// This adds ./src for relative imports.
"moduleDirectory": ["node_modules", "src"]
}
}
2016-02-24 15:27:44 +03:00
}
2016-02-23 19:05:25 +03:00
}