mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 15:37:55 -05:00
[eslint config] [breaking] disallow empty methods
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user