-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0b4f41d
Showing
19 changed files
with
7,721 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,13 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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,2 @@ | ||
/dist | ||
/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,261 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"globals": {}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "tsconfig.eslint.json", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["import", "unicorn", "jsdoc", "prefer-arrow", "editorconfig", "@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"default": "array" | ||
} | ||
], | ||
"@typescript-eslint/await-thenable": ["error"], | ||
"@typescript-eslint/consistent-type-definitions": ["error"], | ||
"@typescript-eslint/dot-notation": ["error"], | ||
"@typescript-eslint/explicit-function-return-type": [ | ||
"error", | ||
{ | ||
"allowConciseArrowFunctionExpressionsStartingWithVoid": true, | ||
"allowDirectConstAssertionInArrowFunctions": true, | ||
"allowExpressions": true, | ||
"allowHigherOrderFunctions": true, | ||
"allowTypedFunctionExpressions": true | ||
} | ||
], | ||
"@typescript-eslint/explicit-member-accessibility": [ | ||
"error", | ||
{ | ||
"accessibility": "explicit", | ||
"overrides": { | ||
"accessors": "explicit", | ||
"constructors": "no-public", | ||
"methods": "explicit", | ||
"parameterProperties": "explicit", | ||
"properties": "explicit" | ||
} | ||
} | ||
], | ||
"@typescript-eslint/indent": ["off"], | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "semi", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/member-ordering": ["error"], | ||
"@typescript-eslint/method-signature-style": ["error"], | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ | ||
"format": ["camelCase"], | ||
"leadingUnderscore": "allow", | ||
"selector": "default", | ||
"trailingUnderscore": "allow" | ||
}, | ||
{ | ||
"format": ["camelCase", "UPPER_CASE"], | ||
"leadingUnderscore": "allow", | ||
"selector": "variable", | ||
"trailingUnderscore": "allow" | ||
}, | ||
{ | ||
"format": ["PascalCase"], | ||
"selector": "typeLike" | ||
}, | ||
{ | ||
"format": ["PascalCase"], | ||
"selector": "enumMember" | ||
} | ||
], | ||
"@typescript-eslint/no-empty-function": ["error"], | ||
"@typescript-eslint/no-empty-interface": ["error"], | ||
"@typescript-eslint/no-explicit-any": ["off"], | ||
"@typescript-eslint/no-inferrable-types": [ | ||
"error", | ||
{ | ||
"ignoreParameters": true | ||
} | ||
], | ||
"@typescript-eslint/no-misused-new": ["error"], | ||
"@typescript-eslint/no-non-null-assertion": ["error"], | ||
"@typescript-eslint/no-parameter-properties": ["off"], | ||
"@typescript-eslint/no-require-imports": ["error"], | ||
"@typescript-eslint/no-shadow": ["error"], | ||
"@typescript-eslint/no-unused-expressions": ["error"], | ||
"@typescript-eslint/no-var-requires": ["off"], | ||
"@typescript-eslint/prefer-for-of": ["error"], | ||
"@typescript-eslint/prefer-function-type": ["error"], | ||
"@typescript-eslint/prefer-namespace-keyword": ["error"], | ||
"@typescript-eslint/prefer-readonly": ["error"], | ||
"@typescript-eslint/promise-function-async": ["error"], | ||
"@typescript-eslint/quotes": ["error", "single"], | ||
"@typescript-eslint/semi": ["error", "always"], | ||
"@typescript-eslint/type-annotation-spacing": ["error"], | ||
"@typescript-eslint/typedef": [ | ||
"error", | ||
{ | ||
"arrayDestructuring": false, | ||
"arrowParameter": false, | ||
"memberVariableDeclaration": false, | ||
"objectDestructuring": false, | ||
"parameter": false, | ||
"propertyDeclaration": false, | ||
"variableDeclaration": false, | ||
"variableDeclarationIgnoreFunction": false | ||
} | ||
], | ||
"@typescript-eslint/unified-signatures": ["error"], | ||
"arrow-parens": ["error", "as-needed"], | ||
"brace-style": ["error", "1tbs"], | ||
"comma-dangle": ["error"], | ||
"complexity": [ | ||
"error", | ||
{ | ||
"max": 12 | ||
} | ||
], | ||
"constructor-super": ["error"], | ||
"curly": ["error"], | ||
"default-case": ["error"], | ||
"editorconfig/charset": ["error"], | ||
"editorconfig/eol-last": ["error"], | ||
"editorconfig/indent": ["off"], | ||
"editorconfig/linebreak-style": ["error"], | ||
"editorconfig/no-trailing-spaces": ["error"], | ||
"eol-last": ["off"], | ||
"eqeqeq": ["error", "always"], | ||
"guard-for-in": ["error"], | ||
"id-blacklist": [ | ||
"error", | ||
"any", | ||
"Number", | ||
"number", | ||
"String", | ||
"string", | ||
"Boolean", | ||
"boolean", | ||
"Undefined", | ||
"undefined" | ||
], | ||
"id-match": ["error"], | ||
"import/no-deprecated": ["warn"], | ||
"import/order": [ | ||
"error", | ||
{ | ||
"alphabetize": { | ||
"caseInsensitive": true, | ||
"order": "asc" | ||
}, | ||
"groups": ["builtin", "external", "internal"], | ||
"newlines-between": "always" | ||
} | ||
], | ||
"jsdoc/check-alignment": ["error"], | ||
"jsdoc/check-indentation": ["error"], | ||
"jsdoc/newline-after-description": ["error"], | ||
"jsdoc/no-types": ["error"], | ||
"linebreak-style": ["off"], | ||
"max-classes-per-file": ["off"], | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 120 | ||
} | ||
], | ||
"no-bitwise": ["error"], | ||
"no-caller": ["error"], | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": [ | ||
"warn", | ||
"dir", | ||
"timeLog", | ||
"assert", | ||
"clear", | ||
"count", | ||
"countReset", | ||
"group", | ||
"groupEnd", | ||
"table", | ||
"dirxml", | ||
"error", | ||
"groupCollapsed", | ||
"Console", | ||
"profile", | ||
"profileEnd", | ||
"timeStamp", | ||
"context" | ||
] | ||
} | ||
], | ||
"no-debugger": ["error"], | ||
"no-duplicate-imports": ["error"], | ||
"no-empty": ["error"], | ||
"no-eval": ["error"], | ||
"no-fallthrough": ["error"], | ||
"no-irregular-whitespace": ["error"], | ||
"no-multiple-empty-lines": [ | ||
"error", | ||
{ | ||
"max": 2 | ||
} | ||
], | ||
"no-new-wrappers": ["error"], | ||
"no-redeclare": ["error"], | ||
"no-restricted-imports": ["error", "rxjs/Rx"], | ||
"no-return-await": ["error"], | ||
"no-shadow": ["off"], | ||
"no-throw-literal": ["error"], | ||
"no-trailing-spaces": ["off"], | ||
"no-undef-init": ["error"], | ||
"no-underscore-dangle": ["error"], | ||
"no-unused-labels": ["error"], | ||
"no-var": ["error"], | ||
"prefer-arrow/prefer-arrow-functions": [ | ||
"error", | ||
{ | ||
"allowStandaloneDeclarations": true, | ||
"disallowPrototype": false, | ||
"singleReturnOnly": false | ||
} | ||
], | ||
"prefer-const": ["error"], | ||
"quote-props": ["error", "as-needed"], | ||
"radix": ["error"], | ||
"space-before-function-paren": [ | ||
"error", | ||
{ | ||
"anonymous": "always", | ||
"asyncArrow": "always", | ||
"named": "never" | ||
} | ||
], | ||
"space-in-parens": ["error", "never"], | ||
"spaced-comment": [ | ||
"error", | ||
"always", | ||
{ | ||
"markers": ["/"] | ||
} | ||
], | ||
"unicode-bom": ["off"], | ||
"unicorn/filename-case": ["error"] | ||
} | ||
} |
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,71 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: 🛎 Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 📄 Read .nvmrc | ||
id: nvm | ||
run: echo "::set-output name=version::$(cat .nvmrc)" | ||
|
||
- name: 🛠 Setup node.js | ||
uses: actions/setup-node@v2.1.2 | ||
with: | ||
node-version: '${{ steps.nvm.outputs.version }}' | ||
|
||
- name: 📦 Install | ||
run: yarn install | ||
|
||
- name: 🕵️ Lint | ||
run: yarn lint | ||
|
||
- name: 👷♂️ Build | ||
run: yarn build | ||
|
||
- name: 🧪 Test | ||
run: yarn test | ||
|
||
- name: 💯 Report to Coveralls | ||
uses: coverallsapp/github-action@v1.1.2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 👀 Check for version update | ||
id: version | ||
uses: EndBug/version-check@v1 | ||
with: | ||
file-url: https://unpkg.com/small-store/package.json | ||
static-checking: localIsNew | ||
|
||
- name: 📋 Get Commits since last Release | ||
if: steps.version.outputs.changed == 'true' | ||
uses: simbo/changes-since-last-release-action@v1 | ||
id: changes | ||
|
||
- name: 🎁 Create tag and GitHub Release | ||
if: steps.version.outputs.changed == 'true' | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.version.outputs.version }} | ||
release_name: Release ${{ steps.version.outputs.version }} | ||
body: | | ||
Changes since ${{ steps.changes.outputs.last-tag }}: | ||
${{ steps.changes.outputs.log }} | ||
- name: 🚚 Publish to npm | ||
if: steps.version.outputs.changed == 'true' | ||
uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ secrets.NPM_AUTH_TOKEN }} |
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,12 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
/dist | ||
/node_modules | ||
/coverage | ||
|
||
/.vscode/* | ||
!/.vscode/settings.json | ||
|
||
*.log | ||
|
||
.DS_Store |
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 |
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 @@ | ||
/dist | ||
/node_modules | ||
/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,6 @@ | ||
{ | ||
"trailingComma": "none", | ||
"singleQuote": true, | ||
"arrowParens": "avoid", | ||
"printWidth": 120 | ||
} |
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 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"eslint.lintTask.options": " -c .eslintrc --ext .ts,.tsx,.js,jsx .", | ||
"prettier.configPath": "./.prettierrc", | ||
"prettier.packageManager": "yarn", | ||
"prettier.prettierPath": "./node_modules/prettier" | ||
} |
Oops, something went wrong.