modifies ESLint to be less aggressive
This commit is contained in:
12
.eslintrc.js
12
.eslintrc.js
@@ -148,7 +148,7 @@ module.exports = exports = {
|
||||
"consistent-this": [ WARN, "self" ],
|
||||
"eol-last": WARN,
|
||||
"func-names": WARN,
|
||||
"func-style": [ WARN, "declaration" ],
|
||||
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
|
||||
"id-length": [ WARN, { "min": 2, "max": 32 } ],
|
||||
"indent": [ WARN, 2 ],
|
||||
"jsx-quotes": [ WARN, "prefer-double" ],
|
||||
@@ -156,7 +156,7 @@ module.exports = exports = {
|
||||
// "linebreak-style": [ WARN, "unix" ],
|
||||
"lines-around-comment": [ WARN, { "beforeBlockComment": true } ],
|
||||
"max-depth": [ WARN, 8 ],
|
||||
"max-len": [ WARN, 132 ],
|
||||
"max-len": OFF,
|
||||
"max-nested-callbacks": [ WARN, 8 ],
|
||||
"max-params": [ WARN, 8 ],
|
||||
"new-cap": WARN,
|
||||
@@ -181,7 +181,7 @@ module.exports = exports = {
|
||||
"no-unneeded-ternary": WARN,
|
||||
"object-curly-spacing": [ WARN, "always" ],
|
||||
"one-var": OFF,
|
||||
"operator-assignment": [ WARN, "never" ],
|
||||
"operator-assignment": OFF,
|
||||
"operator-linebreak": OFF,
|
||||
"padded-blocks": [ WARN, "never" ],
|
||||
"quote-props": [ WARN, "consistent-as-needed" ],
|
||||
@@ -196,5 +196,9 @@ module.exports = exports = {
|
||||
"space-return-throw-case": OFF,
|
||||
"space-unary-ops": ERROR,
|
||||
"spaced-comment": [ WARN, "always" ],
|
||||
"wrap-regex": WARN
|
||||
"wrap-regex": WARN,
|
||||
|
||||
// React-specific overridesf
|
||||
"react/display-name": OFF,
|
||||
"react/prop-types": OFF
|
||||
}};
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'payload/client/scss/app.css';
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<React.Fragment>
|
||||
@@ -16,7 +15,7 @@ class App extends Component {
|
||||
</Switch>
|
||||
</React.Fragment>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import React, { Component } from 'react';
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import App from './components/App';
|
||||
|
||||
const Index = props => {
|
||||
const Index = () => {
|
||||
return (
|
||||
<Router>
|
||||
<App />
|
||||
</Router>
|
||||
)
|
||||
}
|
||||
<Router>
|
||||
<App />
|
||||
</Router>
|
||||
);
|
||||
};
|
||||
|
||||
render(<Index />, document.getElementById('app'));
|
||||
|
||||
53
package-lock.json
generated
53
package-lock.json
generated
@@ -4380,10 +4380,33 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-react": {
|
||||
"version": "7.10.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz",
|
||||
"integrity": "sha512-18rzWn4AtbSUxFKKM7aCVcj5LXOhOKdwBino3KKWy4psxfPW0YtIbE8WNRDUdyHFL50BeLb6qFd4vpvNYyp7hw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"doctrine": "^2.1.0",
|
||||
"has": "^1.0.3",
|
||||
"jsx-ast-utils": "^2.0.1",
|
||||
"prop-types": "^15.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"has": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-scope": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
|
||||
"integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
|
||||
"version": "3.7.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz",
|
||||
"integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esrecurse": "^4.1.0",
|
||||
@@ -4407,9 +4430,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "5.5.3",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz",
|
||||
"integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==",
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz",
|
||||
"integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@@ -6499,9 +6522,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"ignore": {
|
||||
"version": "3.3.7",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz",
|
||||
"integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==",
|
||||
"version": "3.3.10",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz",
|
||||
"integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==",
|
||||
"dev": true
|
||||
},
|
||||
"ignore-by-default": {
|
||||
@@ -7757,6 +7780,15 @@
|
||||
"promise": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"jsx-ast-utils": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz",
|
||||
"integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-includes": "^3.0.3"
|
||||
}
|
||||
},
|
||||
"kareem": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.2.1.tgz",
|
||||
@@ -12840,7 +12872,8 @@
|
||||
},
|
||||
"stringstream": {
|
||||
"version": "0.0.5",
|
||||
"resolved": ""
|
||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
||||
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "4.0.0",
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
"babel-loader": "^8.0.0-beta.4",
|
||||
"css-loader": "^1.0.0",
|
||||
"eslint": "^4.19.1",
|
||||
"eslint-plugin-react": "^7.10.0",
|
||||
"express": "^4.16.3",
|
||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
|
||||
@@ -3,28 +3,26 @@ import React, { Component } from 'react';
|
||||
import './Button.css';
|
||||
|
||||
class Button extends Component {
|
||||
render() {
|
||||
render() {
|
||||
let classes = this.props.className ? `btn ${this.props.className}` : 'btn';
|
||||
|
||||
var classes = this.props.className ? `btn ${this.props.className}` : 'btn';
|
||||
|
||||
if (this.props.type) {
|
||||
classes += ` btn-${this.props.type}`;
|
||||
}
|
||||
|
||||
if (this.props.size) {
|
||||
classes += ` btn-${this.props.size}`;
|
||||
}
|
||||
|
||||
if (this.props.icon) {
|
||||
classes += ` btn-icon`;
|
||||
}
|
||||
|
||||
return (
|
||||
<button className={classes} onClick={this.props.onClick}>
|
||||
{this.props.children}
|
||||
</button>
|
||||
)
|
||||
if (this.props.type) {
|
||||
classes += ` btn-${this.props.type}`;
|
||||
}
|
||||
|
||||
if (this.props.size) {
|
||||
classes += ` btn-${this.props.size}`;
|
||||
}
|
||||
|
||||
if (this.props.icon) {
|
||||
classes += ' btn-icon';
|
||||
}
|
||||
return (
|
||||
<button className={classes} onClick={this.props.onClick}>
|
||||
{this.props.children}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Button;
|
||||
@@ -3,12 +3,12 @@ import React from 'react';
|
||||
import './index.css';
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
<svg className="emblem" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<title>Payload Emblem</title>
|
||||
<path className="cls-1" d="M49.12.26l-43,26.92a1.64,1.64,0,0,0-.79,1.52V71.41a1.7,1.7,0,0,0,.79,1.43l43,26.9a1.62,1.62,0,0,0,1.77,0l43-26.9a1.69,1.69,0,0,0,.78-1.43V28.7a1.61,1.61,0,0,0-.78-1.41l-43-27A1.62,1.62,0,0,0,49.12.26ZM85.64,68.9,51.05,90.66a1.94,1.94,0,0,1-2.07,0L14.23,68.9a1.92,1.92,0,0,1-.91-1.64V32.74a1.92,1.92,0,0,1,.91-1.64L49,9.34a1.94,1.94,0,0,1,2.07,0L85.77,31.1a1.9,1.9,0,0,1,.92,1.64V67.26a1.9,1.9,0,0,1-.92,1.64Z"/>
|
||||
<path className="cls-1" d="M50,53.56v25.6a1.52,1.52,0,0,0,2.32,1.28l24.9-15.66a2.44,2.44,0,0,0,1.12-2V37.15A2.2,2.2,0,0,0,78,36Z"/>
|
||||
<path className="cls-2" d="M77.22,35.14l-.34-.21-25.6-16a2.46,2.46,0,0,0-2.61,0L28.5,31.59,24,34.38a1.73,1.73,0,0,0-.55,2.38,1.8,1.8,0,0,0,.55.55L33,42.92,50,53.59,78,36A2.32,2.32,0,0,0,77.22,35.14Z"/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<svg className="emblem" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||
<title>Payload Emblem</title>
|
||||
<path className="cls-1" d="M49.12.26l-43,26.92a1.64,1.64,0,0,0-.79,1.52V71.41a1.7,1.7,0,0,0,.79,1.43l43,26.9a1.62,1.62,0,0,0,1.77,0l43-26.9a1.69,1.69,0,0,0,.78-1.43V28.7a1.61,1.61,0,0,0-.78-1.41l-43-27A1.62,1.62,0,0,0,49.12.26ZM85.64,68.9,51.05,90.66a1.94,1.94,0,0,1-2.07,0L14.23,68.9a1.92,1.92,0,0,1-.91-1.64V32.74a1.92,1.92,0,0,1,.91-1.64L49,9.34a1.94,1.94,0,0,1,2.07,0L85.77,31.1a1.9,1.9,0,0,1,.92,1.64V67.26a1.9,1.9,0,0,1-.92,1.64Z"/>
|
||||
<path className="cls-1" d="M50,53.56v25.6a1.52,1.52,0,0,0,2.32,1.28l24.9-15.66a2.44,2.44,0,0,0,1.12-2V37.15A2.2,2.2,0,0,0,78,36Z"/>
|
||||
<path className="cls-2" d="M77.22,35.14l-.34-.21-25.6-16a2.46,2.46,0,0,0-2.61,0L28.5,31.59,24,34.38a1.73,1.73,0,0,0-.55,2.38,1.8,1.8,0,0,0,.55.55L33,42.92,50,53.59,78,36A2.32,2.32,0,0,0,77.22,35.14Z"/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -4,10 +4,10 @@ import Emblem from 'payload/client/components/graphics/Emblem';
|
||||
import './index.css';
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
<aside className="sidebar">
|
||||
return (
|
||||
<aside className="sidebar">
|
||||
<Emblem />
|
||||
Testing 123
|
||||
</aside>
|
||||
)
|
||||
Testing 123
|
||||
</aside>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
export default props => {
|
||||
export default () => {
|
||||
return (
|
||||
<h1>Login</h1>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user