-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebuild from scratch as V3 with breaking changes
- Loading branch information
0 parents
commit cb58269
Showing
34 changed files
with
5,650 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"presets": [ | ||
["@babel/env", { | ||
"targets": { | ||
"browsers": ["last 2 versions"], | ||
"node": "6" | ||
}, | ||
"loose": true, | ||
"useBuiltIns": false | ||
}], | ||
"@babel/preset-stage-3", | ||
"@babel/typescript" | ||
], | ||
"plugins": [ | ||
["@babel/plugin-transform-runtime", { | ||
"helpers": true, | ||
"polyfill": false, | ||
"regenerator": false, | ||
"moduleName": "@babel/runtime" | ||
}] | ||
], | ||
"env": { | ||
"test": { | ||
"plugins": [ | ||
"./test/_setup/arrow-function-coverage-fix.js", | ||
"istanbul" | ||
] | ||
} | ||
}, | ||
"ignore": [ | ||
"src/lib/vendor/**/*.*", | ||
"./test/_setup/arrow-function-coverage-fix.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
engines: | ||
tslint: | ||
enabled: true | ||
duplication: | ||
enabled: true | ||
config: | ||
languages: | ||
- javascript | ||
fixme: | ||
enabled: true | ||
ratings: | ||
paths: | ||
- src/** | ||
exclude_paths: | ||
- doc/**/* | ||
- dist/**/* | ||
- test/**/* | ||
- vendor/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# see editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
lib/**/* | ||
src/lib/vendor/**/* | ||
*.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// http://eslint.org/docs/user-guide/configuring | ||
|
||
module.exports = { | ||
root: true, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
sourceType: 'module', | ||
}, | ||
env: { | ||
browser: true, | ||
}, | ||
extends: ['airbnb-base', 'prettier'], | ||
plugins: ['import', 'prettier'], | ||
settings: { | ||
"import/resolver": { | ||
"node": true, | ||
"typescript": true | ||
}, | ||
}, | ||
rules: { | ||
'import/extensions': [ | ||
'error', | ||
'always', | ||
// hide known extensions that are resolved by webpack | ||
{ | ||
js: 'never', | ||
ts: 'never', | ||
}, | ||
], | ||
// prettier compatibility | ||
'max-len': 0, | ||
'prettier/prettier': [ | ||
'error', | ||
{ singleQuote: true, trailingComma: 'all', printWidth: 100, tabWidth: 2 }, | ||
], | ||
// only for use with getter-setters | ||
'no-underscore-dangle': 0, | ||
// to correctly work on windows with some tools that create windows line-endings | ||
// this will be correct by git when committed | ||
'linebreak-style': 0 | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## copy to .npmignore | ||
.DS_Store | ||
.idea | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
node_modules/ | ||
.npm | ||
.eslintcache | ||
/coverage/ | ||
/.nyc_output/ | ||
/tmp/ | ||
|
||
## only ignore in git | ||
/lib | ||
/index.js | ||
/index.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## copy from .gitignore | ||
.DS_Store | ||
.idea | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
node_modules/ | ||
.npm | ||
.eslintcache | ||
/coverage/ | ||
/.nyc_output/ | ||
/tmp/ | ||
|
||
# .npmignore | ||
.babelrc | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.js | ||
.gitignore | ||
.nvmrc | ||
.nycrc | ||
.prettierignore | ||
.prettierrc | ||
.travis.yml | ||
AUTHORS.md | ||
CONTRIBUTING.md | ||
tsconfig.json | ||
tslint.json | ||
/docs | ||
/example | ||
/src | ||
/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"sourceMap": false, | ||
"instrument": false, | ||
"check-coverage": true, | ||
"per-file": true, | ||
"lines": 90, | ||
"statements": 90, | ||
"functions": 100, | ||
"branches": 80, | ||
"include": [ | ||
"src/**/*.{js,ts}" | ||
], | ||
"exclude": [ | ||
"test/**/*.spec.{js,ts}", | ||
"src/lib/vendor/**/*.*" | ||
], | ||
"reporter": [ | ||
"lcov", | ||
"text-summary" | ||
], | ||
"extension": [ | ||
".js", | ||
".ts" | ||
], | ||
"cache": true, | ||
"all": true, | ||
"report-dir": "./coverage" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# for potential vendor files in src | ||
lib/**/* | ||
src/lib/vendor/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"overrides": [ | ||
{ | ||
"files": "*.json", | ||
"options": { | ||
"printWidth": 999999 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: node_js | ||
|
||
cache: yarn | ||
|
||
node_js: | ||
- 'stable' | ||
- '6' | ||
- '8' | ||
- '10' | ||
|
||
sudo: false | ||
|
||
script: | ||
- yarn test | ||
|
||
deploy: | ||
- provider: npm | ||
email: '[email protected]' | ||
api_key: | ||
secure: Pu74+OVhLBIwgB8i2/k46XpSdYbtFccRdkZvSMTP3sbHgJvvlq/8KN9iWgnqi6kXE1e9vWM5Ru0oSS1+qtGPrHWy2f4ZRml+RJ1G0vVvRBAO9U7XsKiOVtRTJaTNQnCZONnDSCV3Q853T8mEYC/g3PcEGbfmsMhz21Dr0iNQBLA= | ||
on: | ||
tags: true | ||
node: 'stable' | ||
skip_cleanup: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [Arjan van Wijk](https://github.com/thanarie) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Contributing | ||
|
||
## Adding docs | ||
|
||
Documentation is important, so any additions or improvements are welcomed! | ||
|
||
## Adding features | ||
|
||
Wanting to add a feature? Awesome! | ||
|
||
If you're not sure the feature will be accepted, you can first open an issue to | ||
see what others think. | ||
|
||
Otherwise, just open a PR and describe what the feature is for; what problem it | ||
solves, why it should be added. | ||
|
||
You should also provide tests for the new feature, so we know it's working and | ||
to show of the usage. | ||
|
||
At last, please update the docs, describing how this new feature can be used. | ||
|
||
## Fixing bugs | ||
|
||
You found a bug? How embarrassing! | ||
|
||
If you don't know how to fix it yourself, you can open an issue describing the | ||
bug; how to reproduce, desired behavior, actual behavior. | ||
|
||
Otherwise, you can open a PR. Please add a test first to show the incorrect | ||
behavior, and then add the fix so the test passes. | ||
|
||
## Code style | ||
|
||
Please keep the code style consistent, defined by .editorconfig and the linters | ||
in place. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2018 Tha Narie | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.