Skip to content

Commit

Permalink
Eslint config: re-enable react/forbid-dom-props rule
Browse files Browse the repository at this point in the history
It's been fixed in jsx-eslint/eslint-plugin-react#2961 and upgraded in #2172
  • Loading branch information
mrtnzlml authored and kodiakhq[bot] committed Apr 9, 2021
1 parent 4bcc4b6 commit 4acf0ad
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/eslint-config-adeira/CHANGELOG.md
Expand Up @@ -16,6 +16,7 @@ In case you want to prolong the support for explicit exact objects you can simpl

Additional changes:

- Broken rule `react/forbid-dom-props` which was disabled in version 5.2.0 was fixed and re-enabled with the same configuration ([related issue](https://github.com/adeira/universe/issues/2005)).
- Rules which were throwing only warnings but errors in strict mode are now enabled as errors for everyone: [`no-unsafe-optional-chaining`](https://eslint.org/docs/rules/no-unsafe-optional-chaining), [`no-nonoctal-decimal-escape`](https://eslint.org/docs/rules/no-nonoctal-decimal-escape), [`prefer-object-spread`](https://eslint.org/docs/rules/prefer-object-spread), [`flowtype/use-read-only-spread`](https://github.com/gajus/eslint-plugin-flowtype/tree/998eb5a315666e342fea929a31dbe67568c8231f#eslint-plugin-flowtype-rules-use-read-only-spread), [`react/jsx-no-constructed-context-values`](https://github.com/yannickcr/eslint-plugin-react/blob/7ce9106e481de153ab373e6867c1aa598686c522/docs/rules/jsx-no-constructed-context-values.md), [`react/jsx-no-target-blank`](https://github.com/yannickcr/eslint-plugin-react/blob/7ce9106e481de153ab373e6867c1aa598686c522/docs/rules/jsx-no-target-blank.md), [`react/no-unstable-nested-components`](https://github.com/yannickcr/eslint-plugin-react/blob/7ce9106e481de153ab373e6867c1aa598686c522/docs/rules/no-unstable-nested-components.md), [`react-native/no-single-element-style-arrays`](https://github.com/Intellicode/eslint-plugin-react-native/blob/0bc91bee113a418b75f11c3c01b9e83ef67bc53b/docs/rules/no-single-element-style-arrays.md), [`react-native/no-unused-styles`](https://github.com/Intellicode/eslint-plugin-react-native/blob/0bc91bee113a418b75f11c3c01b9e83ef67bc53b/docs/rules/no-unused-styles.md), [`jsx-a11y/anchor-has-content`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/7cdbe6b979d9aafba7bad3b57c2f7c27ae7c5bc2/docs/rules/anchor-has-content.md), [`jsx-a11y/heading-has-content`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/7cdbe6b979d9aafba7bad3b57c2f7c27ae7c5bc2/docs/rules/heading-has-content.md), [`jsx-a11y/no-noninteractive-tabindex`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/7cdbe6b979d9aafba7bad3b57c2f7c27ae7c5bc2/docs/rules/no-noninteractive-tabindex.md), `relay/function-required-argument`, [`promise/no-new-statics`](https://github.com/xjamundx/eslint-plugin-promise/blob/6a20f34234655633d67074720453d83b6ed9c256/docs/rules/no-new-statics.md), [`promise/no-return-wrap`](https://github.com/xjamundx/eslint-plugin-promise/blob/6a20f34234655633d67074720453d83b6ed9c256/docs/rules/no-return-wrap.md), [`promise/param-names`](https://github.com/xjamundx/eslint-plugin-promise/blob/6a20f34234655633d67074720453d83b6ed9c256/docs/rules/param-names.md), [`promise/valid-params`](https://github.com/xjamundx/eslint-plugin-promise/blob/6a20f34234655633d67074720453d83b6ed9c256/docs/rules/valid-params.md), [`sx/no-concatenated-classes`](https://github.com/adeira/eslint-plugin-sx/blob/284c0de00281898dae9975cfc2328927ab3106f6/docs/rules/no-concatenated-classes.md), [`sx/no-unused-stylesheet`](https://github.com/adeira/eslint-plugin-sx/blob/284c0de00281898dae9975cfc2328927ab3106f6/docs/rules/no-unused-stylesheet.md) and [`sx/valid-usage`](https://github.com/adeira/eslint-plugin-sx/blob/284c0de00281898dae9975cfc2328927ab3106f6/docs/rules/valid-usage.md)

# 5.3.0
Expand Down
Expand Up @@ -751,7 +751,15 @@ Object {
"react/destructuring-assignment": 0,
"react/display-name": 0,
"react/forbid-component-props": 0,
"react/forbid-dom-props": 0,
"react/forbid-dom-props": Array [
2,
Object {
"forbid": Array [
"class",
"for",
],
},
],
"react/forbid-elements": 0,
"react/forbid-foreign-prop-types": 0,
"react/forbid-prop-types": 0,
Expand Down
10 changes: 9 additions & 1 deletion src/eslint-config-adeira/ourRules.js
Expand Up @@ -368,7 +368,15 @@ module.exports = ({
'react/destructuring-assignment': OFF,
'react/display-name': OFF,
'react/forbid-component-props': OFF,
'react/forbid-dom-props': OFF,
'react/forbid-dom-props': [
ERROR,
{
forbid: [
'class', // https://reactjs.org/docs/dom-elements.html#classname
'for', // https://reactjs.org/docs/dom-elements.html#htmlfor
],
},
],
'react/forbid-elements': OFF,
'react/forbid-foreign-prop-types': OFF,
'react/forbid-prop-types': OFF,
Expand Down

0 comments on commit 4acf0ad

Please sign in to comment.