1
0
Fork 0

adopt everything but rollup config (#118)

This commit is contained in:
ssube 2019-11-09 20:00:54 -06:00 committed by Sean Sube
parent 53e00c59a1
commit 91fb1aff34
17 changed files with 160 additions and 182 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
.nyc_output/
docs/api/
node_modules/
out/api
out/cache/
out/coverage/
out/tmp/

40
.github/ISSUE_TEMPLATE/type_bug.md vendored Normal file
View File

@ -0,0 +1,40 @@
---
name: Bug Report
about: report a problem
title: ''
labels: status/new, type/bug
assignees: ''
---
# Bug
Something is broken!
## Summary
(quick summary of the issue)
## Steps to Reproduce
- install
- configure
- run
- ...
- :(
## Actual Behavior
```none
example
```
## Expected Behavior
```none
example
```
## Details
(detailed description of the expected behavior and what goes wrong)

33
.github/ISSUE_TEMPLATE/type_feature.md vendored Normal file
View File

@ -0,0 +1,33 @@
---
name: Feature Suggestion
about: Suggest an idea for this project
title: ''
labels: status/new, type/feature
assignees: ''
---
# Feature
Something is missing!
## Summary
An elevator pitch of the feature and why it will be useful.
## Scope
- [ ] items to be implemented
- [ ] additional details
## Use Case
At least one concrete use case for the feature, ideally with step-by-step example.
Bonus points if you can refer to another issue here.
## Questions
Outstanding questions, potential problems, and further research that might be needed.
New or updated dependencies should be noted here.

21
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,21 @@
# Merge
Something is ready to be merged!
## Issues
List the issue(s) resolved or addressed by this change.
Changes MUST be related to an issue. If one does not exist, please create one with
[the appropriate issue type](https://github.com/ssube/isolex/blob/master/docs/workflow.md#type).
## Checks
Before creating a PR, please ensure
[all merge requirements](https://github.com/ssube/isolex/blob/master/docs/workflow.md#merges)
are met:
- [ ] Gitlab pipeline has passed
- [ ] lint warnings have not increased
- [ ] documentation has been updated
- [ ] tests have been added and consistently pass

7
.gitignore vendored
View File

@ -3,9 +3,12 @@
.nyc_output/ .nyc_output/
node_modules/ node_modules/
out/ out/
package-lock.json temp/
yarn-error.log
# types
*.bak *.bak
*.swp *.swp
*.tmp *.tmp
package-lock.json
yarn-error.log

View File

@ -1,23 +1,28 @@
.awcache/
.github/ .github/
.nyc_output/
config/ config/
deploy/ deploy/
node_modules/ node_modules/
out/cache/ out/cache/
out/src/ out/coverage/
out/test/ out/coverage-*
out/docs/
out/typings/
out/*.db
out/*.html
out/*.json
out/test-*
out/tmp/
scripts/ scripts/
src/ src/
temp/
test/ test/
vendor/ vendor/
out/*.html
out/*.json
out/*.map
out/entry-*
out/test.*
.codeclimate.yml .codeclimate.yml
.dockerignore
.gitlab-ci.yml .gitlab-ci.yml
.gitmodules .gitmodules
.mdlrc .mdlrc
@ -25,8 +30,6 @@ out/test.*
Dockerfile Dockerfile
licensed.yml licensed.yml
Makefile Makefile
package-lock.json
renovate.json renovate.json
tsconfig.json tsconfig.json
yarn-* yarn-*
yarn.lock

View File

@ -44,7 +44,6 @@ NODE_INFO := $(shell node -v)
# Tool options # Tool options
COVER_OPTS ?= --reporter=lcov --reporter=text-summary --reporter=html --report-dir="$(TARGET_PATH)/coverage" --exclude-after-remap COVER_OPTS ?= --reporter=lcov --reporter=text-summary --reporter=html --report-dir="$(TARGET_PATH)/coverage" --exclude-after-remap
DOCKER_IMAGE ?= ssube/salty:master
MOCHA_OPTS ?= --check-leaks --colors --sort --ui bdd MOCHA_OPTS ?= --check-leaks --colors --sort --ui bdd
RELEASE_OPTS ?= --commit-all RELEASE_OPTS ?= --commit-all

View File

@ -15,14 +15,21 @@
], ],
"module": "es6", "module": "es6",
"moduleResolution": "node", "moduleResolution": "node",
"noImplicitAny": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"noImplicitThis": true,
"outDir": "../out", "outDir": "../out",
"sourceMap": true, "sourceMap": true,
"strict": true, "strict": true,
"strictNullChecks": true,
"target": "es2017", "target": "es2017",
"types": [ "types": [
"chai-as-promised",
"jsonpath-plus", "jsonpath-plus",
"mocha" "mocha",
"node",
"rollup-resources",
"sinon-chai"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types", "../node_modules/@types",

View File

@ -1,153 +0,0 @@
{
"extends": ["tslint:latest"],
"rules": {
"adjacent-overload-signatures": true,
"array-type": [
true,
"generic"
],
"arrow-parens": true,
"arrow-return-shorthand": true,
"await-promise": true,
"ban": [true, {
"message": "use lodash isString",
"name": ["util", "isString"]
}, {
"message": "use lodash isNil",
"name": ["util", "isNullOrUndefined"]
}],
"ban-comma-operator": true,
"ban-types": true,
"class-name": true,
"curly": true,
"cyclomatic-complexity": [
true,
12
],
"deprecation": true,
"eofline": true,
"increment-decrement": true,
"indent": [true, "spaces", 2],
"interface-name": [
true,
"never-prefix"
],
"max-classes-per-file": [
false,
1
],
"max-file-line-count": 250,
"max-line-length": [
true,
180
],
"member-access": true,
"member-ordering": [
true,
{
"order": [
"public-static-method",
"public-static-field",
"public-instance-field",
"protected-instance-field",
"public-constructor",
"public-instance-method",
"protected-instance-method"
]
}
],
"new-parens": true,
"no-angle-bracket-type-assertion": true,
"no-arg": true,
"no-bitwise": false,
"no-boolean-literal-compare": true,
"no-conditional-assignment": true,
"no-console": true,
"no-construct": true,
"no-dead-store": false,
"no-debugger": true,
"no-default-export": true,
"no-default-import": true,
"no-duplicate-super": true,
"no-duplicate-variable": true,
"no-empty-interface": true,
"no-floating-promises": true,
"no-for-in-array": true,
"no-implicit-dependencies": false,
"no-inferred-empty-object-type": true,
"no-inferrable-types": [
true,
"ignore-params",
"ignore-properties"
],
"no-internal-module": true,
"no-invalid-this": true,
"no-irregular-whitespace": true,
"no-magic-numbers": [
true,
-1, 0,
1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 20, 30, 40, 50, 60, 70, 80, 90,
100
],
"no-misused-new": true,
"no-namespace": true,
"no-non-null-assertion": true,
"no-null-keyword": true,
"no-parameter-properties": true,
"no-parameter-reassignment": true,
"no-return-await": true,
"no-shadowed-variable": true,
"no-sparse-arrays": true,
"no-string-literal": true,
"no-string-throw": true,
"no-submodule-imports": false,
"no-unbound-method": true,
"no-unused-expression": true,
"no-var-keyword": true,
"no-void-expression": true,
"prefer-conditional-expression": false,
"prefer-const": true,
"prefer-for-of": true,
"prefer-readonly": true,
"prefer-switch": true,
"quotemark": [
true,
"single",
"jsx-double",
"avoid-escape"
],
"radix": true,
"restrict-plus-operands": true,
"strict-boolean-expressions": true,
"strict-type-predicates": true,
"switch-default": true,
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"triple-equals": true,
"unnecessary-constructor": true,
"use-default-type-parameter": true,
"use-isnan": true,
"variable-name": [
true,
"ban-keywords",
"check-format"
]
},
"jsRules": {
"curly": true,
"trailing-comma": [
true,
{
"multiline": "never",
"singleline": "never"
}
]
},
"rulesDirectory": []
}

View File

@ -1,12 +0,0 @@
{
"extends": ["./tslint.cc.json", "tslint-clean-code", "tslint-sonarts"],
"rulesDirectory": ["../node_modules/tslint-microsoft-contrib"],
"rules": {
"mocha-unneeded-done": true,
"no-banned-terms": true,
"no-delete-expression": true,
"no-for-in": true,
"no-relative-imports": false,
"no-small-switch": false
}
}

View File

@ -1,4 +1,4 @@
#! /bin/sh #! /bin/bash
PROJECT="${ROOT_PATH}" PROJECT="${ROOT_PATH}"
PARENT="$(dirname "${PROJECT}")" PARENT="$(dirname "${PROJECT}")"

View File

@ -3,7 +3,15 @@
STATUS="${1}" STATUS="${1}"
CI_COMMIT_SHA="${CI_COMMIT_SHA:-$(git rev-parse HEAD)}" CI_COMMIT_SHA="${CI_COMMIT_SHA:-$(git rev-parse HEAD)}"
STATUS_BODY="{\"state\": \"${STATUS}\", \"target_url\": \"${CI_PIPELINE_URL}\", \"description\": \"CI pipeline ${STATUS}!\", \"context\": \"gitlab/build\"}" STATUS_BODY="$(cat <<EOF
{
"state": "${STATUS}",
"target_url": "${CI_PIPELINE_URL}",
"description": "CI pipeline ${STATUS}!",
"context": "gitlab/build"
}
EOF
)"
printf "Reporting status for %s...\n%s" "${CI_COMMIT_SHA}" "${STATUS_BODY}" printf "Reporting status for %s...\n%s" "${CI_COMMIT_SHA}" "${STATUS_BODY}"
printf "%s" "${STATUS_BODY}" | curl -d @- \ printf "%s" "${STATUS_BODY}" | curl -d @- \

5
src/lib.ts Normal file
View File

@ -0,0 +1,5 @@
import { VERSION_INFO } from './version';
export default {
VERSION_INFO,
};

3
src/resource/json.json Normal file
View File

@ -0,0 +1,3 @@
{
"foo": {}
}

1
src/resource/yaml.yml Normal file
View File

@ -0,0 +1 @@
foo: {}

View File

@ -1,5 +1,4 @@
import { AsyncHook, createHook } from 'async_hooks'; import { AsyncHook, createHook } from 'async_hooks';
import { isNil } from 'lodash';
// this will pull Mocha internals out of the stacks // this will pull Mocha internals out of the stacks
/* eslint-disable-next-line @typescript-eslint/no-var-requires */ /* eslint-disable-next-line @typescript-eslint/no-var-requires */
@ -9,6 +8,11 @@ const filterStack = stackTraceFilter();
type AsyncMochaTest = (this: Mocha.Context | void) => Promise<void>; type AsyncMochaTest = (this: Mocha.Context | void) => Promise<void>;
type AsyncMochaSuite = (this: Mocha.Suite) => Promise<void>; type AsyncMochaSuite = (this: Mocha.Suite) => Promise<void>;
function isNil<T>(val: T | null | undefined): val is null | undefined {
/* eslint-disable-next-line no-null/no-null */
return val === null || val === undefined;
}
export interface TrackedResource { export interface TrackedResource {
source: string; source: string;
triggerAsyncId: number; triggerAsyncId: number;

9
vendor/rollup-resources/index.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
declare module "*.json" {
export const data: unknown;
export default data;
}
declare module "*.yml" {
export const data: unknown;
export default data;
}