2016-02-23 19:05:25 +03:00
|
|
|
{
|
2018-06-27 18:00:54 +03:00
|
|
|
"extends": [
|
|
|
|
"amo",
|
|
|
|
"plugin:amo/recommended"
|
|
|
|
],
|
2016-02-25 00:42:06 +03:00
|
|
|
"globals": {
|
2016-04-28 00:06:27 +03:00
|
|
|
"CLIENT_CONFIG": true,
|
2017-09-28 21:49:47 +03:00
|
|
|
"document": true,
|
2017-05-22 19:05:15 +03:00
|
|
|
"webpackIsomorphicTools": true,
|
2017-08-09 14:53:45 +03:00
|
|
|
"ga": true,
|
2018-07-11 18:56:15 +03:00
|
|
|
// https://flow.org/en/docs/types/utilities/#toc-objmap
|
|
|
|
"$ObjMap": true,
|
2017-10-05 00:47:41 +03:00
|
|
|
// https://flow.org/en/docs/types/utilities/#toc-propertytype
|
|
|
|
"$PropertyType": true,
|
2018-05-03 18:50:57 +03:00
|
|
|
// These are undocumented utilities that ship with Flow
|
2017-10-05 00:47:41 +03:00
|
|
|
// https://github.com/facebook/flow/issues/875
|
2018-06-08 15:12:11 +03:00
|
|
|
"$ReadOnlyArray": true,
|
2018-09-25 20:01:29 +03:00
|
|
|
"$Rest": true,
|
2017-10-05 00:47:41 +03:00
|
|
|
"$Shape": true,
|
2018-05-03 18:50:57 +03:00
|
|
|
"$Keys": true,
|
2018-09-17 13:02:37 +03:00
|
|
|
"$Values": true,
|
2017-10-05 00:47:41 +03:00
|
|
|
// See: https://github.com/facebook/flow/issues/1609
|
|
|
|
"SyntheticEvent": true,
|
2018-05-03 18:50:57 +03:00
|
|
|
"SyntheticInputEvent": true,
|
|
|
|
// See: https://github.com/facebook/flow/issues/5627
|
|
|
|
"TimeoutID": true,
|
2017-10-05 00:47:41 +03:00
|
|
|
// Standard DOM globals:
|
2018-02-09 21:28:36 +03:00
|
|
|
"Generator": true,
|
2018-08-09 18:56:15 +03:00
|
|
|
"HTMLAnchorElement": true,
|
2018-05-24 22:49:54 +03:00
|
|
|
"HTMLButtonElement": true,
|
2017-09-26 20:18:54 +03:00
|
|
|
"HTMLElement": true,
|
|
|
|
"HTMLInputElement": true,
|
2018-01-18 00:54:52 +03:00
|
|
|
"HTMLSelectElement": true,
|
2018-02-09 21:28:36 +03:00
|
|
|
"HTMLTextAreaElement": true,
|
2017-09-26 20:18:54 +03:00
|
|
|
"Node": true,
|
2018-05-17 11:35:45 +03:00
|
|
|
// This is used to send form data to the API.
|
2018-05-17 11:53:20 +03:00
|
|
|
"FormData": true,
|
|
|
|
// This is used to upload files in the browser.
|
2018-05-24 22:49:54 +03:00
|
|
|
"File": true,
|
2019-08-21 19:04:57 +03:00
|
|
|
"FileReader": true,
|
2020-10-16 14:10:30 +03:00
|
|
|
"ProgressEvent": true,
|
|
|
|
// Types that can be used with sendBeacon:
|
|
|
|
"BodyInit": true
|
2016-02-25 00:42:06 +03:00
|
|
|
},
|
|
|
|
"parser": "babel-eslint",
|
2016-02-24 15:27:44 +03:00
|
|
|
"rules": {
|
2018-08-18 05:05:49 +03:00
|
|
|
// These rules are not compatible with Prettier.
|
|
|
|
"implicit-arrow-linebreak": "off",
|
2018-06-22 21:55:18 +03:00
|
|
|
"indent": "off",
|
2018-08-18 05:05:49 +03:00
|
|
|
"no-mixed-operators": "off",
|
|
|
|
"operator-linebreak": "off",
|
2018-11-15 13:21:30 +03:00
|
|
|
"react/jsx-one-expression-per-line": "off",
|
2019-08-26 13:10:49 +03:00
|
|
|
"react/jsx-curly-newline": "off",
|
2018-11-15 13:21:30 +03:00
|
|
|
// 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
|
2020-12-11 17:32:28 +03:00
|
|
|
"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"
|
2016-08-20 01:15:37 +03:00
|
|
|
},
|
|
|
|
"settings": {
|
2018-11-16 23:01:31 +03:00
|
|
|
"import/core-modules": [
|
|
|
|
// This is a workaround for: https://github.com/benmosher/eslint-plugin-import/issues/793
|
|
|
|
"redux-saga/effects",
|
|
|
|
],
|
2016-08-20 01:15:37 +03:00
|
|
|
"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$",
|
2016-08-20 01:15:37 +03:00
|
|
|
"\\.jpg$",
|
|
|
|
"\\.mp4$",
|
2016-08-22 22:59:41 +03:00
|
|
|
"\\.png$",
|
|
|
|
"\\.scss$",
|
|
|
|
"\\.svg$",
|
2016-08-20 01:15:37 +03:00
|
|
|
"\\.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
|
|
|
}
|