Skip to content

Commit e9d3293

Browse files
author
Bernabe Gonzalez
committed
Init commit
0 parents  commit e9d3293

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+12035
-0
lines changed

.babelrc

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"presets": [
3+
[
4+
"env", {
5+
"targets": {}
6+
}
7+
],
8+
"react",
9+
"stage-1"
10+
],
11+
"env": {
12+
"production": {
13+
"plugins": [
14+
"transform-react-constant-elements",
15+
"transform-react-remove-prop-types",
16+
["babel-plugin-styled-components", {
17+
"ssr": true
18+
}]
19+
]
20+
}
21+
}
22+
}

.circleci/config.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
jobs:
3+
build:
4+
environment:
5+
CC_TEST_REPORTER_ID: ca4447b67e8c7cbd304c6a31bd36137e5bc24d5355f51a96281434f9ae479fb9
6+
docker:
7+
- image: circleci/node:10.14.2-browsers
8+
9+
steps:
10+
- checkout
11+
- restore_cache:
12+
name: Restore Yarn Package Cache
13+
keys:
14+
- dependency-cache
15+
- run:
16+
name: Install dependencies
17+
command: yarn
18+
- run:
19+
name: Run tests
20+
command: yarn test:cover
21+
- run:
22+
name: Run linter
23+
command: yarn lint
24+
25+
- save_cache:
26+
key: dependency-cache
27+
paths:
28+
- ~/.cache/yarn
29+
30+
- run:
31+
name: Setup Code Climate test reporter
32+
command: |
33+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
34+
chmod +x ./cc-test-reporter
35+
./cc-test-reporter before-build
36+
./cc-test-reporter after-build

.codeclimate.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
version: "2"
2+
checks:
3+
# Methods or functions defined with a high number of arguments
4+
argument-count:
5+
config:
6+
threshold: 5
7+
8+
# Boolean logic that may be hard to understand
9+
complex-logic:
10+
config:
11+
threshold: 4
12+
13+
# Excessive lines of code within a single file
14+
file-lines:
15+
config:
16+
threshold: 500
17+
18+
# Functions or methods that may be hard to understand
19+
method-complexity:
20+
config:
21+
threshold: 20
22+
23+
# Classes defined with a high number of functions or methods
24+
method-count:
25+
config:
26+
threshold: 20
27+
28+
# Deeply nested control structures like if or case
29+
nested-control-flow:
30+
config:
31+
threshold: 4
32+
33+
# Functions or methods with a high number of return statements
34+
return-statements:
35+
config:
36+
threshold: 4
37+
38+
# Excessive lines of code within a single function or method
39+
# Disabled because the render function will exceed this threshold many times
40+
method-lines:
41+
enabled: false
42+
43+
# Duplicate code which is not identical but shares the same structure (e.g. variable names may differ)
44+
# Disabled because it gives some false positives
45+
similar-code:
46+
enabled: false
47+
48+
# Duplicate code which is syntactically identical (but may be formatted differently)
49+
# Disabled because it gives some false positives
50+
identical-code:
51+
enabled: false
52+
plugins:
53+
eslint:
54+
enabled: true
55+
exclude_patterns:
56+
- "dist/"
57+
- "server/build/"
58+
- "node_modules/"
59+
- "/test/**/*"
60+
- "**/vendor/"
61+
- "**/*.d.ts"
62+
- "coverage/**/*"
63+
- "src/locales/"

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
node_modules/*
3+
tools/*
4+
src/webpack-public-path.js
5+
server/build

.eslintrc

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:import/errors",
5+
"plugin:import/warnings",
6+
"airbnb"
7+
],
8+
"plugins": [
9+
"react",
10+
"react-hooks"
11+
],
12+
"parser": "babel-eslint",
13+
"parserOptions": {
14+
"ecmaVersion": 6,
15+
"sourceType": "module",
16+
"ecmaFeatures": {
17+
"jsx": true,
18+
"experimentalObjectRestSpread": true
19+
}
20+
},
21+
"env": {
22+
"es6": true,
23+
"browser": true,
24+
"node": true,
25+
"jquery": true,
26+
"jest": true
27+
},
28+
"rules": {
29+
"object-curly-newline": 0,
30+
"no-class-assign": 0,
31+
"no-param-reassign": 0,
32+
"class-methods-use-this": 0,
33+
"consistent-return": 0,
34+
"no-shadow": 0,
35+
"global-require": 0,
36+
"eqeqeq": 0,
37+
"no-unused-expressions": [1, { "allowShortCircuit": true, "allowTernary": true }],
38+
"array-callback-return": 0,
39+
"no-console": [1, { "allow": ["warn", "error"] }],
40+
"no-debugger": 1,
41+
"no-var": 1,
42+
"semi": [1, "always"],
43+
"no-trailing-spaces": 1,
44+
"eol-last": 1,
45+
"no-underscore-dangle": 0,
46+
"no-alert": 0,
47+
"no-lone-blocks": 0,
48+
"jsx-quotes": 1,
49+
"no-multi-spaces": 1,
50+
"block-spacing": 1,
51+
"brace-style": 1,
52+
"comma-dangle": 0,
53+
"comma-spacing": [1, { "before": false, "after": true }],
54+
"comma-style": 1,
55+
"key-spacing": 1,
56+
"no-empty": [1, { "allowEmptyCatch": true }],
57+
"no-multiple-empty-lines": [1, { "max": 1 }],
58+
"arrow-spacing": 1,
59+
"no-const-assign": 1,
60+
"object-curly-spacing": [1, "always"],
61+
"space-before-blocks" : [1, "always"],
62+
"keyword-spacing": 1,
63+
"indent": [1, 2, { "SwitchCase": 1 }],
64+
"max-len": 0,
65+
"jsx-a11y/click-events-have-key-events": 0,
66+
"jsx-a11y/label-has-for": 0,
67+
"jsx-a11y/no-static-element-interactions": 0,
68+
"jsx-a11y/anchor-is-valid": 0,
69+
"react/display-name": [ 1, { "ignoreTranspilerName": false }],
70+
"react/forbid-prop-types": [1, { "forbid": ["any"] }],
71+
"react/jsx-curly-spacing": 1,
72+
"react/jsx-filename-extension": 0,
73+
"react/jsx-indent-props": 0,
74+
"react/jsx-key": 1,
75+
"react/jsx-max-props-per-line": 0,
76+
"react/jsx-no-duplicate-props": 1,
77+
"react/jsx-no-literals": 0,
78+
"react/jsx-no-undef": 1,
79+
"react/jsx-pascal-case": 1,
80+
"react/jsx-sort-prop-types": 0,
81+
"react/jsx-sort-props": 0,
82+
"react/jsx-uses-react": 1,
83+
"react/jsx-uses-vars": 1,
84+
"react/no-danger": 1,
85+
"react/no-did-mount-set-state": 1,
86+
"react/no-did-update-set-state": 1,
87+
"react/no-direct-mutation-state": 1,
88+
"react/no-multi-comp": 1,
89+
"react/no-set-state": 0,
90+
"react/no-unknown-property": 1,
91+
"react/prefer-es6-class": 1,
92+
"react/prop-types": 1,
93+
"react/react-in-jsx-scope": 1,
94+
"react/require-default-props": 0,
95+
"react/self-closing-comp": 1,
96+
"react/sort-comp": 1,
97+
"react/jsx-wrap-multilines": 0,
98+
"react/no-array-index-key": 0,
99+
"import/extensions": 1,
100+
"import/prefer-default-export": 0,
101+
"import/no-extraneous-dependencies": 0,
102+
"import/no-named-as-default": 0,
103+
"react-hooks/rules-of-hooks": "error"
104+
},
105+
"settings": {
106+
"import/resolver": {
107+
"node": {
108+
"paths": ["src"]
109+
}
110+
}
111+
}
112+
}

.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# node-waf configuration
20+
.lock-wscript
21+
22+
# Compiled binary addons (http://nodejs.org/api/addons.html)
23+
build/Release
24+
25+
# Dependency directory
26+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27+
node_modules
28+
29+
#dist folder
30+
dist
31+
32+
#Webstorm metadata
33+
.idea
34+
35+
#VSCode metadata
36+
.vscode
37+
38+
# Mac files
39+
.DS_Store
40+
41+
# Environment variables
42+
.env.dev
43+
.env.staging
44+
.env.prod
45+
46+
# Server build
47+
server/build

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
save-exact=true
2+
package-lock = false

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10.14.2

.stylelintrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
defaultSeverity: "warning",
4+
"plugins": [ "stylelint-order" ],
5+
"rules": {
6+
"number-leading-zero": "never",
7+
"order/properties-alphabetical-order": true
8+
}
9+
}

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
cache: yarn
3+
node_js:
4+
- "8"
5+
script:
6+
- yarn lint
7+
- yarn test

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Rootstrap
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: yarn start:server

0 commit comments

Comments
 (0)