Bug 1508688 - Enable 'react/no-deprecated' ESLint rule for devtools/. r=devtools-reviewers,nchevobbe

This enables https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md

Differential Revision: https://phabricator.services.mozilla.com/D149485
This commit is contained in:
Tetsuharu Ohzeki 2022-06-16 10:03:12 +00:00
Родитель 07b3d58207
Коммит e88ac8dc9f
1 изменённых файлов: 13 добавлений и 3 удалений

Просмотреть файл

@ -144,6 +144,18 @@ module.exports = {
"mozilla/reject-relative-requires": "error",
},
},
{
// These tests use old React. We should accept deprecated API usages
files: [
"client/inspector/markup/test/doc_markup_events_react_development_15.4.1.html",
"client/inspector/markup/test/doc_markup_events_react_development_15.4.1_jsx.html",
"client/inspector/markup/test/doc_markup_events_react_production_15.3.1.html",
"client/inspector/markup/test/doc_markup_events_react_production_15.3.1_jsx.html",
],
rules: {
"react/no-deprecated": "off",
},
},
],
rules: {
// These are the rules that have been configured so far to match the
@ -159,6 +171,7 @@ module.exports = {
// Rules from the React plugin
"react/display-name": "error",
"react/no-danger": "error",
"react/no-deprecated": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-direct-mutation-state": "error",
@ -183,13 +196,10 @@ module.exports = {
"getInitialState",
"state",
"getChildContext",
"componentWillMount",
"UNSAFE_componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"UNSAFE_componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"UNSAFE_componentWillUpdate",
"componentDidUpdate",
"componentWillUnmount",