Skip to content

Commit 1db5fae

Browse files
committed
Update eslint to latest + Fix linting problems
1 parent 5514c6a commit 1db5fae

File tree

8 files changed

+183
-95
lines changed

8 files changed

+183
-95
lines changed

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
"max-len": [1, 120],
1414
"no-multiple-empty-lines": [1, { max: 2, maxBOF: 0, maxEOF: 0 }],
1515
"no-trailing-spaces": 1,
16-
"react/jsx-tag-spacing": { beforeSelfClosing: "allow" },
16+
"react/jsx-tag-spacing": [1, { beforeSelfClosing: "never" }],
1717
"arrow-parens": [1, "always"],
1818
"import/no-extraneous-dependencies": [1, { devDependencies: true }],
1919
"react/jsx-filename-extension": [1, { extensions: [".js", ".jsx"] }],
@@ -49,6 +49,8 @@ module.exports = {
4949
"react/jsx-one-expression-per-line": 0,
5050
"react/jsx-props-no-multi-spaces": 0,
5151
"react/jsx-wrap-multilines": 0,
52+
"react/state-in-constructor": 0,
53+
"react/jsx-curly-newline": 0,
5254

5355
// Maybe enable later:
5456
"jsx-a11y/click-events-have-key-events": 0,

examples/parent-child-demo/src/components/Tagged.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Fragment } from 'react';
1+
import React from 'react';
22

33
const Tagged = ({name, showProps, children}) => {
44
const shownProps = !showProps ? '' : ' ' +
@@ -10,11 +10,11 @@ const Tagged = ({name, showProps, children}) => {
1010
<div className='tagged'>
1111
{ (React.Children.count(children) === 0)
1212
? <span className='tag'>{'<' + name + shownProps + '/>'}</span>
13-
: <Fragment>
13+
: <>
1414
<span className='tag'>{'<' + name + shownProps + '>'}</span>
1515
<div className='indented'>{children}</div>
1616
<span className='tag'>{'</' + name + '>'}</span>
17-
</Fragment>
17+
</>
1818
}
1919
</div>
2020
);

examples/parent-child-demo/src/samples/Legacy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint arrow-body-style: 0, react/no-multi-comp: 0, no-unused-vars: [1, { "args": "none" }] */
1+
/* eslint arrow-body-style: 0, max-classes-per-file: 0, no-unused-vars: [1, { "args": "none" }] */
22
import React, { Component } from 'react';
33
import { traceLifecycle } from 'react-lifecycle-visualizer';
44

examples/parent-child-demo/src/samples/New.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint arrow-body-style: 0, react/no-multi-comp: 0, no-unused-vars: [1, { "args": "none" }] */
1+
/* eslint arrow-body-style: 0, max-classes-per-file: 0, no-unused-vars: [1, { "args": "none" }] */
22
import React, { Component } from 'react';
33
import { traceLifecycle } from 'react-lifecycle-visualizer';
44

0 commit comments

Comments
 (0)