1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Add ESLint rule forbidding extraneous defaultProps (#7453)

This commit is contained in:
Whymarrh Whitby 2019-11-18 11:38:10 -03:30 committed by GitHub
parent a271e7f456
commit 659b4360bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 6 deletions

View File

@ -149,6 +149,7 @@
"padded-blocks": "off", "padded-blocks": "off",
"quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}], "quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
"react/no-deprecated": 0, "react/no-deprecated": 0,
"react/default-props-match-prop-types": 2,
"semi": [2, "never"], "semi": [2, "never"],
"semi-spacing": [2, { "before": false, "after": true }], "semi-spacing": [2, { "before": false, "after": true }],
"space-before-blocks": [2, "always"], "space-before-blocks": [2, "always"],

View File

@ -4,8 +4,6 @@ const h = require('react-hyperscript')
const MenuDroppo = require('../../menu-droppo') const MenuDroppo = require('../../menu-droppo')
const extend = require('xtend') const extend = require('xtend')
const noop = () => {}
class Dropdown extends Component { class Dropdown extends Component {
render () { render () {
const { const {
@ -55,8 +53,6 @@ class Dropdown extends Component {
} }
Dropdown.defaultProps = { Dropdown.defaultProps = {
isOpen: false,
onClick: noop,
useCssTransition: false, useCssTransition: false,
} }

View File

@ -7,7 +7,6 @@ export default class Tooltip extends PureComponent {
arrow: true, arrow: true,
children: null, children: null,
containerClassName: '', containerClassName: '',
hideOnClick: false,
html: null, html: null,
onHidden: null, onHidden: null,
position: 'left', position: 'left',

View File

@ -25,7 +25,6 @@ class DraggableSeed extends Component {
static defaultProps = { static defaultProps = {
className: '', className: '',
onClick () {},
} }
componentWillReceiveProps (nextProps) { componentWillReceiveProps (nextProps) {