[eslint config] [breaking] disallow empty methods

This commit is contained in:
Jordan Harband
2016-04-17 12:48:54 -07:00
parent c97bd772b4
commit 3efe10d42e
2 changed files with 9 additions and 0 deletions

View File

@@ -37,6 +37,14 @@ module.exports = {
'no-div-regex': 0,
// disallow else after a return in an if
'no-else-return': 2,
// disallow empty functions, except for standalone funcs/arrows
// http://eslint.org/docs/rules/no-empty-function
'no-empty-function': [2, {
'allow': [
'functions',
'arrowFunctions',
]
}],
// disallow Unnecessary Labels
// http://eslint.org/docs/rules/no-extra-label
'no-extra-label': 2,

View File

@@ -23,6 +23,7 @@ function wrapComponent(body) {
return `
import React from 'react';
export default class MyComponent extends React.Component {
/* eslint no-empty-function: 0 */
${body}
}
`;