Skip to content

Commit

Permalink
Update ESLint and related dependencies (kriasoft#1412)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzzy authored Sep 28, 2017
1 parent a9f37d7 commit 40c5d33
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 101 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: node_js
node_js:
- '8'
- '7'
- 'stable'
- '6'
env:
- CXX=g++-4.8
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@
"cross-env": "^5.0.1",
"css-loader": "^0.28.4",
"enzyme": "^2.9.1",
"eslint": "^4.4.1",
"eslint-config-airbnb": "^15.0.1",
"eslint-config-prettier": "^2.3.0",
"eslint": "^4.7.2",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.6.0",
"eslint-import-resolver-node": "^0.3.1",
"eslint-loader": "^1.8.0",
"eslint-plugin-css-modules": "^2.7.1",
"eslint-plugin-flowtype": "^2.34.1",
"eslint-plugin-import": "^2.6.1",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-react": "^7.0.1",
"eslint-loader": "^1.9.0",
"eslint-plugin-css-modules": "^2.7.5",
"eslint-plugin-flowtype": "^2.36.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.4.0",
"file-loader": "^0.11.2",
"front-matter": "^2.1.2",
"glob": "^7.1.2",
Expand Down Expand Up @@ -99,7 +99,7 @@
"postcss-pseudoelements": "^5.0.0",
"postcss-selector-matches": "^3.0.1",
"postcss-selector-not": "^3.0.1",
"prettier": "^1.5.2",
"prettier": "^1.7.2",
"raw-loader": "^0.5.1",
"react-deep-force-update": "^2.0.1",
"react-error-overlay": "^1.0.9",
Expand Down
4 changes: 1 addition & 3 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ async function onLocationChange(location, action) {
}

appInstance = ReactDOM.render(
<App context={context}>
{route.component}
</App>,
<App context={context}>{route.component}</App>,
container,
() => onRenderComplete(route, location),
);
Expand Down
26 changes: 13 additions & 13 deletions src/components/Html.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,44 +41,44 @@ class Html extends React.Component {
<head>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
<title>
{title}
</title>
<title>{title}</title>
<meta name="description" content={description} />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{scripts.map(script =>
<link key={script} rel="preload" href={script} as="script" />,
)}
{scripts.map(script => (
<link key={script} rel="preload" href={script} as="script" />
))}
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
{styles.map(style =>
{styles.map(style => (
<style
key={style.id}
id={style.id}
dangerouslySetInnerHTML={{ __html: style.cssText }}
/>,
)}
/>
))}
</head>
<body>
<div id="app" dangerouslySetInnerHTML={{ __html: children }} />
<script
dangerouslySetInnerHTML={{ __html: `window.App=${serialize(app)}` }}
/>
{scripts.map(script => <script key={script} src={script} />)}
{config.analytics.googleTrackingId &&
{config.analytics.googleTrackingId && (
<script
dangerouslySetInnerHTML={{
__html:
'window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;' +
`ga('create','${config.analytics
.googleTrackingId}','auto');ga('send','pageview')`,
}}
/>}
{config.analytics.googleTrackingId &&
/>
)}
{config.analytics.googleTrackingId && (
<script
src="https://www.google-analytics.com/analytics.js"
async
defer
/>}
/>
)}
</body>
</html>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Layout.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Layout', () => {
test('renders children correctly', () => {
const wrapper = renderer
.create(
<App context={{ insertCss: () => {} }}>
<App context={{ insertCss: () => {}, fetch: () => {} }}>
<Layout>
<div className="child" />
</Layout>
Expand Down
4 changes: 1 addition & 3 deletions src/components/Page/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ class Page extends React.Component {
return (
<div className={s.root}>
<div className={s.container}>
<h1>
{title}
</h1>
<h1>{title}</h1>
<div
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: html }}
Expand Down
4 changes: 1 addition & 3 deletions src/routes/admin/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class Admin extends React.Component {
return (
<div className={s.root}>
<div className={s.container}>
<h1>
{this.props.title}
</h1>
<h1>{this.props.title}</h1>
<p>...</p>
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/routes/contact/Contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class Contact extends React.Component {
return (
<div className={s.root}>
<div className={s.container}>
<h1>
{this.props.title}
</h1>
<h1>{this.props.title}</h1>
<p>...</p>
</div>
</div>
Expand Down
8 changes: 2 additions & 6 deletions src/routes/error/ErrorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ class ErrorPage extends React.Component {
if (__DEV__ && this.props.error) {
return (
<div>
<h1>
{this.props.error.name}
</h1>
<pre>
{this.props.error.stack}
</pre>
<h1>{this.props.error.name}</h1>
<pre>{this.props.error.stack}</pre>
</div>
);
}
Expand Down
10 changes: 4 additions & 6 deletions src/routes/home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,18 @@ class Home extends React.Component {
<div className={s.root}>
<div className={s.container}>
<h1>React.js News</h1>
{this.props.news.map(item =>
{this.props.news.map(item => (
<article key={item.link} className={s.newsItem}>
<h1 className={s.newsTitle}>
<a href={item.link}>
{item.title}
</a>
<a href={item.link}>{item.title}</a>
</h1>
<div
className={s.newsDesc}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: item.content }}
/>
</article>,
)}
</article>
))}
</div>
</div>
);
Expand Down
4 changes: 1 addition & 3 deletions src/routes/login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class Login extends React.Component {
return (
<div className={s.root}>
<div className={s.container}>
<h1>
{this.props.title}
</h1>
<h1>{this.props.title}</h1>
<p className={s.lead}>
Log in with your username or company email address.
</p>
Expand Down
4 changes: 1 addition & 3 deletions src/routes/not-found/NotFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class NotFound extends React.Component {
return (
<div className={s.root}>
<div className={s.container}>
<h1>
{this.props.title}
</h1>
<h1>{this.props.title}</h1>
<p>Sorry, the page you were trying to view does not exist.</p>
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/routes/register/Register.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class Register extends React.Component {
return (
<div className={s.root}>
<div className={s.container}>
<h1>
{this.props.title}
</h1>
<h1>{this.props.title}</h1>
<p>...</p>
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ app.get('*', async (req, res, next) => {

const data = { ...route };
data.children = ReactDOM.renderToString(
<App context={context}>
{route.component}
</App>,
<App context={context}>{route.component}</App>,
);
data.styles = [{ id: 'css', cssText: [...css].join('') }];
data.scripts = [assets.vendor.js];
Expand Down
Loading

0 comments on commit 40c5d33

Please sign in to comment.