Skip to content

Commit 019e0f7

Browse files
committed
[eslint config] add config for disabled new rules
1 parent 41ca203 commit 019e0f7

File tree

1 file changed

+29
-0
lines changed
  • packages/eslint-config-airbnb/rules

1 file changed

+29
-0
lines changed

packages/eslint-config-airbnb/rules/react.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,35 @@ module.exports = {
500500
// Enforce that props are read-only
501501
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md
502502
'react/prefer-read-only-props': 'off',
503+
504+
// Prevent usage of `javascript:` URLs
505+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
506+
// TODO: enable, semver-major
507+
'react/jsx-no-script-url': ['off', [
508+
{
509+
name: 'Link',
510+
props: ['to'],
511+
},
512+
]],
513+
514+
// Disallow unnecessary fragments
515+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
516+
// TODO: enable, semver-major
517+
'react/jsx-no-useless-fragment': 'off',
518+
519+
// Prevent adjacent inline elements not separated by whitespace
520+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
521+
// TODO: enable? semver-major
522+
'react/no-adjacent-inline-elements': 'off',
523+
524+
// Enforce a specific function type for function components
525+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
526+
// TODO: enable! semver-minor, but do it in a major to be safe
527+
// TODO: investigate if setting namedComponents to expression vs declaration is problematic
528+
'react/function-component-definition': ['off', {
529+
namedComponents: 'function-expression',
530+
unnamedComponents: 'function-expression',
531+
}],
503532
},
504533

505534
settings: {

0 commit comments

Comments
 (0)