[eslint-v2][react] acceptTranspilerName => ignoreTranspilerName

This commit is contained in:
Harrison Shoff
2016-02-20 12:59:00 -08:00
committed by Jordan Harband
parent e0959d0f1d
commit ff0adbe291
3 changed files with 9 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ module.exports = {
'rules': {
// Prevent missing displayName in a React component definition
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
'react/display-name': [0, { 'acceptTranspilerName': false }],
'react/display-name': [0, { 'ignoreTranspilerName': true }],
// Forbid certain propTypes (any, array, object)
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md
'react/forbid-prop-types': [0, { 'forbid': ['any', 'array', 'object'] }],
@@ -116,6 +116,9 @@ module.exports = {
// Prevent extra closing tags for components without children
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
'react/self-closing-comp': 2,
// Enforce spaces before the closing bracket of self-closing JSX elements
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
'react/jsx-space-before-closing': [2, 'always'],
// Enforce component methods order
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md
'react/sort-comp': [2, {

View File

@@ -59,9 +59,10 @@ module.exports = {
'new-parens': 0,
// allow/disallow an empty newline after var statement
'newline-after-var': 0,
// enforces new line after each method call in the chain to make it more readable and easy to maintain
// enforces new line after each method call in the chain to make it
// more readable and easy to maintain
// http://eslint.org/docs/rules/newline-per-chained-call
'newline-per-chained-call': [2, { "ignoreChainWithDepth": 3 }],
'newline-per-chained-call': [2, { 'ignoreChainWithDepth': 3 }],
// disallow use of the Array constructor
'no-array-constructor': 0,
// disallow use of the continue statement

View File

@@ -14,7 +14,8 @@ const cli = new CLIEngine({
function lint(text) {
// @see http://eslint.org/docs/developer-guide/nodejs-api.html#executeonfiles
// @see http://eslint.org/docs/developer-guide/nodejs-api.html#executeontext
return cli.executeOnText(text).results[0];
const linter = cli.executeOnText(text);
return linter.results[0];
}
function wrapComponent(body) {