Skip to content

Commit 2c0f737

Browse files
committed
Use ups configs
1 parent e980f47 commit 2c0f737

File tree

8 files changed

+106
-122
lines changed

8 files changed

+106
-122
lines changed

.eslintrc

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,6 @@
11
{
2-
"extends": [
3-
"eslint:recommended",
4-
"plugin:jsx-a11y/recommended",
5-
"plugin:prettier/recommended",
6-
"plugin:react/recommended"
7-
],
8-
"plugins": ["jsx-a11y"],
9-
"parser": "babel-eslint",
10-
"parserOptions": {
11-
"ecmaVersion": 2018,
12-
"sourceType": "module",
13-
"ecmaFeatures": {
14-
"jsx": true
15-
}
16-
},
17-
"env": {
18-
"es6": true,
19-
"browser": true,
20-
"node": true
21-
},
2+
"extends": "@upstatement/eslint-config/react",
223
"rules": {
23-
"no-console": ["error", { "allow": ["warn", "error"] }],
24-
25-
"curly": "error",
26-
"eqeqeq": "error",
27-
"no-eq-null": "error",
28-
29-
"no-use-before-define": ["error", "nofunc"],
30-
31-
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
32-
"comma-dangle": ["error", "always-multiline"],
33-
"comma-spacing": "error",
34-
"comma-style": "error",
35-
"func-call-spacing": "error",
36-
"indent": ["error", 2, { "SwitchCase": 1, "MemberExpression": 1 }],
37-
"key-spacing": ["error", { "mode": "minimum" }],
38-
"keyword-spacing": "error",
39-
"object-curly-spacing": ["error", "always"],
40-
"one-var": ["error", "never"],
41-
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
42-
"semi": ["error", "always"],
43-
"space-before-function-paren": ["error", "never"],
44-
"space-infix-ops": "error",
45-
46-
"arrow-spacing": "error",
47-
"no-duplicate-imports": "error",
48-
"no-useless-constructor": "error",
49-
"no-var": "error",
50-
"prefer-const": "error",
51-
"prefer-template": "error",
52-
534
"react/no-unescaped-entities": ["error", { "forbid": [">", "\"", "}"] }]
545
}
556
}

.prettierrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"dependencies": {
2929
"animejs": "^2.2.0",
3030
"babel-plugin-styled-components": "^1.7.1",
31-
"gatsby": "^2.0.6",
32-
"gatsby-image": "^2.0.7",
31+
"gatsby": "^2.0.8",
32+
"gatsby-image": "^2.0.9",
3333
"gatsby-plugin-google-analytics": "^2.0.6",
3434
"gatsby-plugin-netlify": "^2.0.0",
3535
"gatsby-plugin-offline": "^2.0.5",
@@ -39,29 +39,31 @@
3939
"gatsby-plugin-sitemap": "^2.0.1",
4040
"gatsby-plugin-styled-components": "^3.0.0",
4141
"gatsby-remark-external-links": "0.0.4",
42-
"gatsby-remark-images": "^2.0.1",
42+
"gatsby-remark-images": "^2.0.2",
4343
"gatsby-source-filesystem": "^2.0.1",
4444
"gatsby-transformer-remark": "^2.1.3",
45-
"gatsby-transformer-sharp": "^2.1.1",
45+
"gatsby-transformer-sharp": "^2.1.2",
4646
"prop-types": "^15.6.2",
4747
"react": "^16.5.2",
4848
"react-anchor-link-smooth-scroll": "^1.0.11",
4949
"react-dom": "^16.5.2",
5050
"react-helmet": "^5.2.0",
5151
"react-transition-group": "^2.4.0",
52-
"scrollreveal": "^4.0.2",
52+
"scrollreveal": "^4.0.4",
5353
"styled-components": "^3.4.9"
5454
},
5555
"devDependencies": {
56+
"@upstatement/eslint-config": "0.2.1",
57+
"@upstatement/prettier-config": "^0.2.1",
5658
"babel-eslint": "^9.0.0",
5759
"eslint": "^5.6.0",
58-
"eslint-config-prettier": "^3.0.1",
60+
"eslint-config-prettier": "^3.1.0",
5961
"eslint-plugin-jsx-a11y": "^6.1.1",
6062
"eslint-plugin-prettier": "^2.6.2",
6163
"eslint-plugin-react": "^7.11.1",
62-
"husky": "^0.14.3",
63-
"lint-staged": "^7.2.2",
64-
"prettier": "^1.14.2",
65-
"pretty-quick": "^1.6.0"
64+
"husky": "^1.0.0-rc.15",
65+
"lint-staged": "^7.3.0",
66+
"prettier": "^1.14.3",
67+
"pretty-quick": "^1.7.0"
6668
}
6769
}

prettier.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@upstatement/prettier-config');

src/components/jobs.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const TabsContainer = styled.div`
1616
display: flex;
1717
align-items: flex-start;
1818
position: relative;
19-
2019
${media.thone`display: block;`};
2120
`;
2221
const Tabs = styled.div`
@@ -33,7 +32,8 @@ const Tabs = styled.div`
3332
`;
3433
const Tab = styled.button`
3534
${mixins.link};
36-
display: block;
35+
display: flex;
36+
align-items: center;
3737
width: 100%;
3838
background-color: transparent;
3939
height: ${theme.tabHeight}px;
@@ -45,8 +45,9 @@ const Tab = styled.button`
4545
font-family: ${theme.fonts.SFMono};
4646
font-size: ${theme.fontSizes.smallish};
4747
color: ${props => (props.isActive ? theme.colors.green : theme.colors.lightGrey)};
48-
${media.tablet`padding: 0 10px 2px;`};
48+
${media.tablet`padding: 0 15px 2px;`};
4949
${media.thone`
50+
${mixins.flexCenter};
5051
padding: 0 15px;
5152
text-align: center;
5253
border-left: 0;

src/components/loader.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const LoaderContainer = styled.div`
2121
const LogoWrapper = styled.div`
2222
width: max-content;
2323
max-width: 100px;
24+
transition: ${theme.transition};
25+
opacity: ${props => (props.show ? 1 : 0)};
2426
svg {
2527
width: 100%;
2628
height: 100%;
@@ -39,9 +41,15 @@ class Loader extends Component {
3941
finishLoading: PropTypes.func.isRequired,
4042
};
4143

44+
state = {
45+
show: false,
46+
};
47+
4248
componentDidMount() {
43-
document.body.style.overflow = 'hidden';
44-
this.animate();
49+
this.setState({ show: true }, () => {
50+
document.body.style.overflow = 'hidden';
51+
this.animate();
52+
});
4553
}
4654

4755
animate() {
@@ -55,7 +63,7 @@ class Loader extends Component {
5563
loader
5664
.add({
5765
targets: '#logo path',
58-
delay: 0,
66+
delay: 500,
5967
duration: 2000,
6068
easing: 'easeInOutQuart',
6169
strokeDashoffset: [anime.setDashoffset, 0],
@@ -83,9 +91,11 @@ class Loader extends Component {
8391
}
8492

8593
render() {
94+
const { show } = this.state;
95+
8696
return (
8797
<LoaderContainer className="loader">
88-
<LogoWrapper>
98+
<LogoWrapper show={show}>
8999
<svg id="logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
90100
<title>Loader Logo</title>
91101
<g>

src/style/theme.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const theme = {
5050
headerHeight: '100px',
5151
headerScrollHeight: '70px',
5252
margin: '20px',
53+
5354
tabHeight: 42,
5455
tabWidth: 120,
5556

0 commit comments

Comments
 (0)