Skip to content

Commit 6bb1792

Browse files
committed
setup environment
1 parent ac1682d commit 6bb1792

Some content is hidden

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

60 files changed

+11990
-1
lines changed

.babelrc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"presets": [["env", {
3+
"targets": {
4+
"node": 4,
5+
"browsers": [
6+
"ie 9",
7+
"ios 9",
8+
"last 2 chrome versions",
9+
"last 2 edge versions",
10+
"last 2 firefox versions",
11+
]
12+
}
13+
}]],
14+
"plugins": [
15+
"./resources/inline-invariant",
16+
"syntax-async-functions",
17+
"syntax-async-generators",
18+
"transform-class-properties",
19+
"transform-flow-strip-types",
20+
"transform-object-rest-spread",
21+
["transform-es2015-classes", {"loose": true}],
22+
["transform-es2015-destructuring", {"loose": true}],
23+
["transform-es2015-spread", {"loose": true}]
24+
]
25+
}

.esdoc.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"source": "./src",
3+
"destination": "./docs",
4+
"excludes": [
5+
"__tests__"
6+
],
7+
"plugins": [
8+
9+
{
10+
"name": "esdoc-standard-plugin",
11+
"option": {
12+
"coverage": {"enable": true},
13+
"brand": {
14+
"title": "create-graphql-server-authorization",
15+
"description": "Adds authorization to create-graphql-server",
16+
"repository": "https://github.com/tobkle/create-graphql-server-authorization",
17+
"author": "Tobias Klemmer"
18+
}
19+
}
20+
},
21+
22+
{
23+
"name": "esdoc-ecmascript-proposal-plugin",
24+
"option": {
25+
"objectRestSpread": true
26+
}
27+
},
28+
29+
{
30+
"name": "esdoc-flow-type-plugin",
31+
"option": {
32+
"enable": true
33+
}
34+
}
35+
36+
]
37+
}

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/src/__tests__/code/**

.eslintrc

+220
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
{
2+
"parser": "babel-eslint",
3+
4+
"plugins": [
5+
"babel",
6+
"flowtype",
7+
"prettier"
8+
],
9+
10+
"env": {
11+
"es6": true,
12+
"node": true,
13+
"mocha": true
14+
},
15+
16+
"parserOptions": {
17+
"arrowFunctions": true,
18+
"binaryLiterals": true,
19+
"blockBindings": true,
20+
"classes": true,
21+
"defaultParams": true,
22+
"destructuring": true,
23+
"experimentalObjectRestSpread": true,
24+
"forOf": true,
25+
"generators": true,
26+
"globalReturn": true,
27+
"jsx": true,
28+
"modules": true,
29+
"objectLiteralComputedProperties": true,
30+
"objectLiteralDuplicateProperties": true,
31+
"objectLiteralShorthandMethods": true,
32+
"objectLiteralShorthandProperties": true,
33+
"octalLiterals": true,
34+
"regexUFlag": true,
35+
"regexYFlag": true,
36+
"restParams": true,
37+
"spread": true,
38+
"superInFunctions": true,
39+
"templateStrings": true,
40+
"unicodeCodePointEscapes": true
41+
},
42+
43+
"rules": {
44+
"prettier/prettier": ["error", {"singleQuote": true, "parser": "flow"}],
45+
"flowtype/space-after-type-colon": [2, "always"],
46+
"flowtype/space-before-type-colon": [2, "never"],
47+
"flowtype/space-before-generic-bracket": [2, "never"],
48+
"flowtype/union-intersection-spacing": [2, "always"],
49+
"flowtype/no-weak-types": [2, {"any": false}],
50+
"flowtype/define-flow-type": 2,
51+
"flowtype/use-flow-type": 2,
52+
"flowtype/semi": 2,
53+
"arrow-parens": [2, "as-needed"],
54+
"arrow-spacing": 2,
55+
"block-scoped-var": 0,
56+
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
57+
"callback-return": 2,
58+
"comma-dangle": 0,
59+
"comma-spacing": 0,
60+
"comma-style": [2, "last"],
61+
"complexity": 0,
62+
"computed-property-spacing": [2, "never"],
63+
"consistent-return": 0,
64+
"consistent-this": 0,
65+
"curly": [2, "all"],
66+
"default-case": 0,
67+
"dot-location": [2, "property"],
68+
"dot-notation": 0,
69+
"eol-last": 2,
70+
"eqeqeq": ["error", "smart"],
71+
"func-names": 0,
72+
"func-style": 0,
73+
"generator-star-spacing": [2, {"before": false, "after": true}],
74+
"guard-for-in": 2,
75+
"handle-callback-err": [2, "error"],
76+
"id-length": 0,
77+
"id-match": [2, "^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$"],
78+
"indent": 0,
79+
"init-declarations": 0,
80+
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
81+
"keyword-spacing": 2,
82+
"linebreak-style": 2,
83+
"lines-around-comment": 0,
84+
"max-depth": 0,
85+
"max-len": [2, 80, 4],
86+
"max-nested-callbacks": 0,
87+
"max-params": 0,
88+
"max-statements": 0,
89+
"new-cap": 0,
90+
"new-parens": 2,
91+
"newline-after-var": 0,
92+
"no-alert": 2,
93+
"no-array-constructor": 2,
94+
"no-await-in-loop": 2,
95+
"no-bitwise": 0,
96+
"no-caller": 2,
97+
"no-catch-shadow": 0,
98+
"no-class-assign": 2,
99+
"no-cond-assign": 2,
100+
"no-console": 1,
101+
"no-const-assign": 2,
102+
"no-constant-condition": 2,
103+
"no-continue": 0,
104+
"no-control-regex": 0,
105+
"no-debugger": 1,
106+
"no-delete-var": 2,
107+
"no-div-regex": 2,
108+
"no-dupe-args": 2,
109+
"no-dupe-keys": 2,
110+
"no-duplicate-case": 2,
111+
"no-else-return": 2,
112+
"no-empty": 2,
113+
"no-empty-character-class": 2,
114+
"no-eq-null": 0,
115+
"no-eval": 2,
116+
"no-ex-assign": 2,
117+
"no-extend-native": 2,
118+
"no-extra-bind": 2,
119+
"no-extra-boolean-cast": 2,
120+
"no-extra-parens": 0,
121+
"no-extra-semi": 2,
122+
"no-fallthrough": 2,
123+
"no-floating-decimal": 2,
124+
"no-func-assign": 2,
125+
"no-implicit-coercion": 2,
126+
"no-implied-eval": 2,
127+
"no-inline-comments": 0,
128+
"no-inner-declarations": [2, "functions"],
129+
"no-invalid-regexp": 2,
130+
"no-invalid-this": 0,
131+
"no-irregular-whitespace": 2,
132+
"no-iterator": 2,
133+
"no-label-var": 2,
134+
"no-labels": [2, {"allowLoop": true}],
135+
"no-lone-blocks": 2,
136+
"no-lonely-if": 2,
137+
"no-loop-func": 0,
138+
"no-mixed-requires": [2, true],
139+
"no-mixed-spaces-and-tabs": 2,
140+
"no-multi-spaces": 2,
141+
"no-multi-str": 2,
142+
"no-multiple-empty-lines": 0,
143+
"no-native-reassign": 0,
144+
"no-negated-in-lhs": 2,
145+
"no-nested-ternary": 0,
146+
"no-new": 2,
147+
"no-new-func": 0,
148+
"no-new-object": 2,
149+
"no-new-require": 2,
150+
"no-new-wrappers": 2,
151+
"no-obj-calls": 2,
152+
"no-octal": 2,
153+
"no-octal-escape": 2,
154+
"no-param-reassign": 2,
155+
"no-path-concat": 2,
156+
"no-plusplus": 0,
157+
"no-process-env": 0,
158+
"no-process-exit": 0,
159+
"no-proto": 2,
160+
"no-redeclare": 2,
161+
"no-regex-spaces": 2,
162+
"no-restricted-modules": 0,
163+
"no-return-assign": 2,
164+
"no-script-url": 2,
165+
"no-self-compare": 0,
166+
"no-sequences": 0,
167+
"no-shadow": 2,
168+
"no-shadow-restricted-names": 2,
169+
"no-spaced-func": 2,
170+
"no-sparse-arrays": 2,
171+
"no-ternary": 0,
172+
"no-this-before-super": 2,
173+
"no-throw-literal": 2,
174+
"no-trailing-spaces": 2,
175+
"no-undef": 2,
176+
"no-undef-init": 2,
177+
"no-undefined": 0,
178+
"no-underscore-dangle": 0,
179+
"no-unexpected-multiline": 2,
180+
"no-unneeded-ternary": 2,
181+
"no-unreachable": 2,
182+
"no-unused-expressions": 2,
183+
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}],
184+
"no-use-before-define": 0,
185+
"no-useless-call": 2,
186+
"no-useless-escape": 2,
187+
"no-useless-return": 2,
188+
"no-var": 2,
189+
"no-void": 2,
190+
"no-warning-comments": 0,
191+
"no-with": 2,
192+
"object-curly-spacing": [0, "always"],
193+
"object-shorthand": [2, "always"],
194+
"one-var": [2, "never"],
195+
"operator-assignment": [2, "always"],
196+
"padded-blocks": 0,
197+
"prefer-const": 2,
198+
"prefer-reflect": 0,
199+
"prefer-spread": 0,
200+
"quote-props": [2, "as-needed", {"numbers": true}],
201+
"radix": 2,
202+
"require-yield": 0,
203+
"semi": [2, "always"],
204+
"semi-spacing": [2, {"before": false, "after": true}],
205+
"sort-vars": 0,
206+
"space-before-blocks": [2, "always"],
207+
"space-in-parens": 0,
208+
"space-infix-ops": [2, {"int32Hint": false}],
209+
"space-unary-ops": [2, {"words": true, "nonwords": false}],
210+
"spaced-comment": [2, "always"],
211+
"strict": 0,
212+
"use-isnan": 2,
213+
"valid-jsdoc": 0,
214+
"valid-typeof": 2,
215+
"vars-on-top": 0,
216+
"wrap-iife": 2,
217+
"wrap-regex": 0,
218+
"yoda": [2, "never", {"exceptRange": true}]
219+
}
220+
}

.flowconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[ignore]
2+
.*/lib/.*
3+
.*/dist/.*
4+
.*/coverage/.*
5+
.*/resources/.*
6+
7+
[include]
8+
9+
[libs]
10+
flow-typed
11+
12+
[options]
13+
experimental.const_params=true

.gitignore

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
.yarn-metadata.json
57+
58+
# dotenv environment variables file
59+
.env
60+
61+
dist
62+
log
63+
src/__tests__/debug
64+
65+
.DS_Store
66+
67+
src/__tests__/code/generated/*.js

.npmignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.*
2+
*.swp
3+
*~
4+
*.iml
5+
.*.haste_cache.*
6+
.DS_Store
7+
.idea
8+
npm-debug.log
9+
10+
.babelrc
11+
CONTRIBUTING.md
12+
node_modules
13+
coverage
14+
resources
15+
src
16+
dist
17+
*.js.flow
18+
esdoc.json
19+
log

0 commit comments

Comments
 (0)