Skip to content
This repository was archived by the owner on Oct 23, 2018. It is now read-only.

Commit 9078bba

Browse files
committed
Add ESLint and formats all code.
1 parent 618f1e3 commit 9078bba

File tree

4 files changed

+430
-21
lines changed

4 files changed

+430
-21
lines changed

basic/.eslintrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": "airbnb",
4+
"plugins": ["react", "react-native", "jsx-a11y", "import"],
5+
"rules": {
6+
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"]}]
7+
},
8+
{
9+
"env": {
10+
"jest": true
11+
}
12+
}
13+
}

basic/App.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import React from 'react';
2-
import { ApolloProvider } from 'react-apollo';
3-
import { ApolloClient, HttpLink, InMemoryCache } from 'apollo-client-preset';
4-
import ListPage from './components/ListPage';
1+
import React from 'react'
2+
import { ApolloProvider } from 'react-apollo'
3+
import { ApolloClient, HttpLink, InMemoryCache } from 'apollo-client-preset'
4+
import ListPage from './components/ListPage'
55

6-
const httpLink = new HttpLink({ uri: 'http://localhost:4000' });
6+
const httpLink = new HttpLink({ uri: 'http://localhost:4000' })
77

88
const client = new ApolloClient({
99
link: httpLink,
10-
cache: new InMemoryCache()
11-
});
10+
cache: new InMemoryCache(),
11+
})
1212

1313
export default class App extends React.Component {
1414
render() {
1515
return (
1616
<ApolloProvider client={client}>
1717
<ListPage />
1818
</ApolloProvider>
19-
);
19+
)
2020
}
2121
}

basic/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
"version": "0.1.0",
44
"private": true,
55
"devDependencies": {
6+
"eslint": "^4.18.0",
7+
"eslint-config-airbnb": "^16.1.0",
8+
"eslint-config-airbnb-base": "^12.1.0",
9+
"eslint-plugin-import": "^2.8.0",
10+
"eslint-plugin-jsx-a11y": "^6.0.3",
11+
"eslint-plugin-react": "^7.6.1",
12+
"eslint-plugin-react-native": "^3.2.1",
613
"jest-expo": "25.1.0",
714
"react-native-scripts": "1.8.1",
815
"react-test-renderer": "16.0.0"

0 commit comments

Comments
 (0)