Skip to content

Commit ff0adbe

Browse files
hshoffljharb
authored andcommitted
[eslint-v2][react] acceptTranspilerName => ignoreTranspilerName
1 parent e0959d0 commit ff0adbe

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
'rules': {
1111
// Prevent missing displayName in a React component definition
1212
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
13-
'react/display-name': [0, { 'acceptTranspilerName': false }],
13+
'react/display-name': [0, { 'ignoreTranspilerName': true }],
1414
// Forbid certain propTypes (any, array, object)
1515
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md
1616
'react/forbid-prop-types': [0, { 'forbid': ['any', 'array', 'object'] }],
@@ -116,6 +116,9 @@ module.exports = {
116116
// Prevent extra closing tags for components without children
117117
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
118118
'react/self-closing-comp': 2,
119+
// Enforce spaces before the closing bracket of self-closing JSX elements
120+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
121+
'react/jsx-space-before-closing': [2, 'always'],
119122
// Enforce component methods order
120123
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md
121124
'react/sort-comp': [2, {

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ module.exports = {
5959
'new-parens': 0,
6060
// allow/disallow an empty newline after var statement
6161
'newline-after-var': 0,
62-
// enforces new line after each method call in the chain to make it more readable and easy to maintain
62+
// enforces new line after each method call in the chain to make it
63+
// more readable and easy to maintain
6364
// http://eslint.org/docs/rules/newline-per-chained-call
64-
'newline-per-chained-call': [2, { "ignoreChainWithDepth": 3 }],
65+
'newline-per-chained-call': [2, { 'ignoreChainWithDepth': 3 }],
6566
// disallow use of the Array constructor
6667
'no-array-constructor': 0,
6768
// disallow use of the continue statement

packages/eslint-config-airbnb/test/test-react-order.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const cli = new CLIEngine({
1414
function lint(text) {
1515
// @see http://eslint.org/docs/developer-guide/nodejs-api.html#executeonfiles
1616
// @see http://eslint.org/docs/developer-guide/nodejs-api.html#executeontext
17-
return cli.executeOnText(text).results[0];
17+
const linter = cli.executeOnText(text);
18+
return linter.results[0];
1819
}
1920

2021
function wrapComponent(body) {

0 commit comments

Comments
 (0)