-
Notifications
You must be signed in to change notification settings - Fork 4
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 17ec2fa
Showing
28 changed files
with
7,583 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,17 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": "maintained node versions", | ||
"useBuiltIns": "usage", | ||
"corejs": 3 | ||
} | ||
], | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
"@babel/proposal-class-properties", | ||
"@babel/proposal-object-rest-spread" | ||
] | ||
} |
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,121 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
# | ||
version: 2.1 | ||
|
||
executors: | ||
node: | ||
docker: | ||
- image: circleci/node:12.7 | ||
working_directory: ~/repo | ||
environment: | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_AUTHOR_NAME: vis-bot | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: vis-bot | ||
|
||
jobs: | ||
prepare: | ||
executor: node | ||
|
||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: npm ci | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
|
||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- '*' | ||
|
||
build: | ||
executor: node | ||
|
||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: npm run build | ||
|
||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- 'bin' | ||
|
||
lint: | ||
executor: node | ||
|
||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: npm run lint | ||
|
||
test: | ||
executor: node | ||
|
||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: npm run test | ||
|
||
release: | ||
executor: node | ||
|
||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: | ||
name: Prepare NPM | ||
command: | | ||
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
- run: | ||
name: Release | ||
command: | | ||
npx semantic-release | ||
workflows: | ||
version: 2 | ||
|
||
build: | ||
jobs: | ||
- prepare | ||
|
||
- build: | ||
requires: | ||
- prepare | ||
|
||
- lint: | ||
requires: | ||
- prepare | ||
|
||
- test: | ||
requires: | ||
- prepare | ||
|
||
- release: | ||
requires: | ||
- prepare | ||
- build | ||
- lint | ||
- test | ||
filters: | ||
branches: | ||
only: | ||
- master |
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 @@ | ||
!/.eslintrc | ||
/bin | ||
/dist |
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,97 @@ | ||
module.exports = { | ||
env: { | ||
browser: false, | ||
es6: true, | ||
node: true, | ||
mocha: true | ||
}, | ||
|
||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
sourceType: "module", | ||
ecmaVersion: 2019, | ||
project: "tsconfig.json" | ||
}, | ||
|
||
plugins: ["prettier", "@typescript-eslint"], | ||
|
||
extends: ["eslint:recommended", "prettier"], | ||
|
||
// JavaScript | ||
rules: { | ||
"prettier/prettier": ["error"], | ||
|
||
complexity: ["error", 55], | ||
"max-statements": ["error", 115], | ||
"no-unreachable": "error", | ||
"no-useless-escape": "off", | ||
|
||
"no-console": ["error", { allow: ["info", "warn", "error"] }], | ||
|
||
"valid-jsdoc": [ | ||
"error", | ||
{ | ||
requireReturnDescription: false, | ||
requireReturn: false, | ||
requireParamDescription: false, | ||
requireReturnType: true | ||
} | ||
], | ||
"guard-for-in": 1 | ||
}, | ||
overrides: [ | ||
// TypeScript | ||
{ | ||
files: ["**/*.ts", "**/*.d.ts"], | ||
rules: { | ||
// @TODO: Seems to mostly work just fine but I'm not 100 % sure. | ||
// @TODO: Deprecated, anything like this for tsdoc? | ||
"valid-jsdoc": [ | ||
"warn", | ||
{ | ||
prefer: { | ||
arg: "param", | ||
argument: "param", | ||
return: "returns" | ||
}, | ||
requireParamDescription: true, | ||
requireParamType: false, | ||
requireReturn: false, // Requires return for void functions. | ||
requireReturnDescription: true, | ||
requireReturnType: false | ||
} | ||
], | ||
|
||
// Class related. | ||
"@typescript-eslint/member-naming": [ | ||
"error", | ||
{ private: "^_", protected: "^_", public: "^[^_]" } | ||
], | ||
"@typescript-eslint/no-parameter-properties": "off", | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
"@typescript-eslint/prefer-readonly": "error", | ||
|
||
// Other. | ||
"@typescript-eslint/no-unnecessary-type-assertion": "error", | ||
"@typescript-eslint/prefer-includes": "error", | ||
"@typescript-eslint/prefer-regexp-exec": "error", | ||
// @TODO: Seems like a good thing, not yet on npm though. | ||
// "@typescript-eslint/require-await": "error", | ||
|
||
// These are hoisted, I have no idea why it reports them by default. | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ functions: false, classes: false, typedefs: false } | ||
], | ||
// False positives for overloading, also tsc compiles with errors anyway. | ||
"no-dupe-class-members": "off", | ||
// Blocks typesafe exhaustive switch (switch (x) { … default: const never: never = x }). | ||
"no-case-declarations": "off", | ||
// Reports used types. | ||
"no-unused-vars": "off", | ||
// Reports typeof bigint as an error, tsc validates this anyway so no problem turning this off. | ||
"valid-typeof": "off" | ||
} | ||
} | ||
] | ||
}; |
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 @@ | ||
# npm files | ||
/node_modules | ||
/npm-debug.log | ||
|
||
# ide or system files | ||
/.idea | ||
/.c9 | ||
/*.iml | ||
/.project | ||
/.settings | ||
/.directory | ||
|
||
# temporary files | ||
/.*.sw[op] | ||
/.commits.tmp | ||
/gen | ||
/.nyc_output | ||
/coverage | ||
/.rpt2_cache | ||
|
||
# built files | ||
/bin | ||
/dist | ||
/vis-dev-util-0.0.0-no-version.tgz |
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,4 @@ | ||
{ | ||
"**/*.{js,ts}": ["eslint --fix", "git add"], | ||
"**/*.{css,html,js,json,ts}": ["prettier --write", "git add"] | ||
} |
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 @@ | ||
{ | ||
"extension": ["js", "ts"], | ||
"require": ["./babel.require.js"], | ||
"spec": ["./test/**/*.test.*"], | ||
"watch-files": ["./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 @@ | ||
.eslintignore |
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 @@ | ||
{} |
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 @@ | ||
branch: master | ||
plugins: | ||
- '@semantic-release/commit-analyzer' | ||
- '@semantic-release/release-notes-generator' | ||
- '@semantic-release/npm' | ||
- '@semantic-release/github' |
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,9 @@ | ||
declare module "*.css" { | ||
const value: string; | ||
export default value; | ||
} | ||
|
||
declare module "*.html" { | ||
const value: string; | ||
export default value; | ||
} |
Oops, something went wrong.