Skip to content

Commit

Permalink
Update eslint to latest + Fix linting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Oblosys committed Aug 18, 2019
1 parent 5514c6a commit 1db5fae
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 95 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Expand Up @@ -13,7 +13,7 @@ module.exports = {
"max-len": [1, 120],
"no-multiple-empty-lines": [1, { max: 2, maxBOF: 0, maxEOF: 0 }],
"no-trailing-spaces": 1,
"react/jsx-tag-spacing": { beforeSelfClosing: "allow" },
"react/jsx-tag-spacing": [1, { beforeSelfClosing: "never" }],
"arrow-parens": [1, "always"],
"import/no-extraneous-dependencies": [1, { devDependencies: true }],
"react/jsx-filename-extension": [1, { extensions: [".js", ".jsx"] }],
Expand Down Expand Up @@ -49,6 +49,8 @@ module.exports = {
"react/jsx-one-expression-per-line": 0,
"react/jsx-props-no-multi-spaces": 0,
"react/jsx-wrap-multilines": 0,
"react/state-in-constructor": 0,
"react/jsx-curly-newline": 0,

// Maybe enable later:
"jsx-a11y/click-events-have-key-events": 0,
Expand Down
6 changes: 3 additions & 3 deletions examples/parent-child-demo/src/components/Tagged.js
@@ -1,4 +1,4 @@
import React, { Fragment } from 'react';
import React from 'react';

const Tagged = ({name, showProps, children}) => {
const shownProps = !showProps ? '' : ' ' +
Expand All @@ -10,11 +10,11 @@ const Tagged = ({name, showProps, children}) => {
<div className='tagged'>
{ (React.Children.count(children) === 0)
? <span className='tag'>{'<' + name + shownProps + '/>'}</span>
: <Fragment>
: <>
<span className='tag'>{'<' + name + shownProps + '>'}</span>
<div className='indented'>{children}</div>
<span className='tag'>{'</' + name + '>'}</span>
</Fragment>
</>
}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion examples/parent-child-demo/src/samples/Legacy.js
@@ -1,4 +1,4 @@
/* eslint arrow-body-style: 0, react/no-multi-comp: 0, no-unused-vars: [1, { "args": "none" }] */
/* eslint arrow-body-style: 0, max-classes-per-file: 0, no-unused-vars: [1, { "args": "none" }] */
import React, { Component } from 'react';
import { traceLifecycle } from 'react-lifecycle-visualizer';

Expand Down
2 changes: 1 addition & 1 deletion examples/parent-child-demo/src/samples/New.js
@@ -1,4 +1,4 @@
/* eslint arrow-body-style: 0, react/no-multi-comp: 0, no-unused-vars: [1, { "args": "none" }] */
/* eslint arrow-body-style: 0, max-classes-per-file: 0, no-unused-vars: [1, { "args": "none" }] */
import React, { Component } from 'react';
import { traceLifecycle } from 'react-lifecycle-visualizer';

Expand Down

0 comments on commit 1db5fae

Please sign in to comment.