Skip to content

Commit dc91eb5

Browse files
committed
refactor: 🎉 initial setup
1 parent 5a62c87 commit dc91eb5

28 files changed

+5957
-3748
lines changed

.babelrc

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

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
indent_size = 4
12+
trim_trailing_whitespace = false

.eslintrc.js

Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
module.exports = {
2+
'env': {
3+
'browser': true,
4+
'commonjs': true,
5+
'es6': true,
6+
'node': true
7+
},
8+
'extends': 'eslint:recommended',
9+
'parser': 'babel-eslint',
10+
'rules': {
11+
'accessor-pairs': 2,
12+
'array-callback-return': 2,
13+
'array-bracket-spacing': 2,
14+
'arrow-body-style': 2,
15+
'arrow-parens': [
16+
2,
17+
'as-needed',
18+
],
19+
'arrow-spacing': 2,
20+
'block-scoped-var': 2,
21+
'block-spacing': 2,
22+
'brace-style': 2,
23+
'camelcase': [
24+
2,
25+
{
26+
properties: 'always',
27+
},
28+
],
29+
'capitalized-comments': [
30+
2,
31+
'always',
32+
{
33+
ignoreConsecutiveComments: true,
34+
},
35+
],
36+
'class-methods-use-this': 2,
37+
'comma-dangle': [
38+
1,
39+
'always-multiline',
40+
],
41+
'comma-spacing': 2,
42+
'comma-style': 2,
43+
'computed-property-spacing': 2,
44+
'consistent-return': 2,
45+
'consistent-this': 2,
46+
'curly': 2,
47+
'default-case': 2,
48+
'dot-location': [
49+
1,
50+
'property',
51+
],
52+
'dot-notation': 2,
53+
'eol-last': 2,
54+
'eqeqeq': 2,
55+
'func-call-spacing': 2,
56+
'func-name-matching': 2,
57+
'func-names': 2,
58+
'global-require': 2,
59+
'guard-for-in': 2,
60+
'id-length': [
61+
2,
62+
{
63+
min: 1,
64+
max: 24,
65+
},
66+
],
67+
'indent': [
68+
2,
69+
2,
70+
{
71+
SwitchCase: 1,
72+
VariableDeclarator: {
73+
var: 2,
74+
let: 2,
75+
const: 3,
76+
},
77+
},
78+
],
79+
'key-spacing': 2,
80+
'keyword-spacing': 2,
81+
'linebreak-style': 2,
82+
'lines-around-comment': [
83+
2,
84+
{
85+
beforeBlockComment: true,
86+
afterBlockComment: false,
87+
allowBlockStart: true,
88+
allowBlockEnd: true,
89+
allowObjectStart: true,
90+
allowObjectEnd: true,
91+
allowArrayStart: true,
92+
allowArrayEnd: true,
93+
},
94+
],
95+
'lines-around-directive': 2,
96+
'max-depth': 2,
97+
'max-len': [
98+
2,
99+
{
100+
code: 120,
101+
},
102+
],
103+
'max-nested-callbacks': 2,
104+
'max-statements-per-line': [
105+
2,
106+
{
107+
max: 2,
108+
},
109+
],
110+
'new-cap': 2,
111+
'new-parens': 2,
112+
'newline-after-var': 2,
113+
'newline-before-return': 2,
114+
'newline-per-chained-call': 2,
115+
'no-alert': 2,
116+
'no-array-constructor': 2,
117+
'no-await-in-loop': 2,
118+
'no-caller': 2,
119+
'no-console': 0,
120+
'no-continue': 0,
121+
'no-div-regex': 2,
122+
'no-duplicate-imports': 2,
123+
'no-else-return': 2,
124+
'no-empty-function': 2,
125+
'no-eq-null': 2,
126+
'no-eval': 2,
127+
'no-extend-native': 2,
128+
'no-extra-bind': 2,
129+
'no-extra-label': 2,
130+
'no-extra-parens': [
131+
2,
132+
'all',
133+
{
134+
nestedBinaryExpressions: false,
135+
},
136+
],
137+
'no-floating-decimal': 2,
138+
'no-global-assign': 2,
139+
'no-implicit-coercion': 2,
140+
'no-implicit-globals': 2,
141+
'no-implied-eval': 2,
142+
'no-invalid-this': 2,
143+
'no-iterator': 2,
144+
'no-labels': 2,
145+
'no-lone-blocks': 2,
146+
'no-lonely-if': 2,
147+
'no-loop-func': 2,
148+
'no-magic-numbers': [
149+
0,
150+
{
151+
ignore: [0, 1],
152+
ignoreArrayIndexes: true,
153+
},
154+
],
155+
'no-mixed-operators': 2,
156+
'no-mixed-spaces-and-tabs': 2,
157+
'no-multi-assign': 2,
158+
'no-multi-spaces': 2,
159+
'no-multi-str': 2,
160+
'no-multiple-empty-lines': [
161+
2,
162+
{
163+
max: 3,
164+
},
165+
],
166+
'no-negated-condition': 2,
167+
'no-nested-ternary': 2,
168+
'no-new-func': 2,
169+
'no-new-object': 2,
170+
'no-new-wrappers': 2,
171+
'no-new': 2,
172+
'no-octal-escape': 2,
173+
'no-param-reassign': 2,
174+
'no-plusplus': [
175+
2,
176+
{
177+
allowForLoopAfterthoughts: true,
178+
},
179+
],
180+
'no-proto': 2,
181+
'no-prototype-builtins': 2,
182+
'no-restricted-properties': 2,
183+
'no-return-assign': 2,
184+
'no-return-await': 2,
185+
'no-script-url': 2,
186+
'no-self-compare': 2,
187+
'no-sequences': 2,
188+
'no-tabs': 2,
189+
'no-template-curly-in-string': 2,
190+
'no-throw-literal': 2,
191+
'no-trailing-spaces': 2,
192+
'no-unsafe-negation': 2,
193+
'no-unmodified-loop-condition': 2,
194+
'no-unneeded-ternary': 2,
195+
'no-unused-expressions': [
196+
2,
197+
{
198+
allowShortCircuit: true,
199+
},
200+
],
201+
'no-useless-call': 2,
202+
'no-useless-computed-key': 2,
203+
'no-useless-concat': 2,
204+
'no-useless-constructor': 2,
205+
'no-useless-escape': 2,
206+
'no-useless-rename': 2,
207+
'no-useless-return': 2,
208+
'no-var': 2,
209+
'no-void': 2,
210+
'no-warning-comments': 2,
211+
'no-whitespace-before-property': 2,
212+
'no-with': 2,
213+
'object-shorthand': 2,
214+
'object-property-newline': 2,
215+
'operator-assignment': 2,
216+
'operator-linebreak': [
217+
2,
218+
'after',
219+
],
220+
'padded-blocks': [
221+
2,
222+
'never',
223+
],
224+
'prefer-arrow-callback': 2,
225+
'prefer-const': 2,
226+
'prefer-destructuring': 2,
227+
'prefer-promise-reject-errors': 2,
228+
'prefer-rest-params': 2,
229+
'prefer-spread': 2,
230+
'prefer-template': 2,
231+
'quote-props': [
232+
2,
233+
'consistent-as-needed',
234+
],
235+
'quotes': [
236+
2,
237+
'single',
238+
],
239+
'radix': 2,
240+
'require-await': 2,
241+
'require-jsdoc': 2,
242+
'rest-spread-spacing': 2,
243+
'semi': 2,
244+
'semi-spacing': 2,
245+
'space-before-blocks': 2,
246+
'space-in-parens': 2,
247+
'space-infix-ops': 2,
248+
'space-unary-ops': [
249+
2,
250+
{
251+
words: true,
252+
nonwords: false,
253+
},
254+
],
255+
'spaced-comment': 2,
256+
'strict': 2,
257+
'symbol-description': 2,
258+
'template-curly-spacing': 2,
259+
'valid-jsdoc': 2,
260+
'vars-on-top': 2,
261+
'wrap-iife': 2,
262+
'wrap-regex': 2,
263+
'yoda': 2
264+
},
265+
};

.gitignore

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Created by https://www.gitignore.io/api/node,macos,linux,windows
1+
# Created by https://www.gitignore.io/api/node,macos,linux,windows,visualstudiocode
22

33
### Linux ###
44
*~
@@ -118,6 +118,13 @@ typings/
118118
# Serverless directories
119119
.serverless
120120

121+
### VisualStudioCode ###
122+
.vscode/*
123+
!.vscode/settings.json
124+
!.vscode/tasks.json
125+
!.vscode/launch.json
126+
!.vscode/extensions.json
127+
121128
### Windows ###
122129
# Windows thumbnail cache files
123130
Thumbs.db
@@ -144,4 +151,9 @@ $RECYCLE.BIN/
144151
*.lnk
145152

146153

147-
# End of https://www.gitignore.io/api/node,macos,linux,windows
154+
# End of https://www.gitignore.io/api/node,macos,linux,windows,visualstudiocode
155+
156+
157+
### Custom ###
158+
159+
.vscode/settings.json

.lintstagedrc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
linters:
2+
src/**/*.js:
3+
- prettier --write
4+
- eslint
5+
- git add
6+
*.{json,md}:
7+
- prettier --write
8+
- git add

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"eslint.enable": false,
32
"editor.formatOnSave": true
43
}

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Luigi De Rosa <[email protected]> (http://luruke.com/)
2+
Thierry Michel <[email protected]> (https://www.epic.net/)

CONTRIBUTE.md

Whitespace-only changes.

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Contributing
2+
3+
> TBD…
4+
5+
- `yarn install`
6+
- `lerna bootstrap`

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Luigi De Rosa, Thierry Michel
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.

0 commit comments

Comments
 (0)