From c447cc3e9d1a48733adb84720b28a0e1cbb66a01 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 22 Nov 2021 13:52:28 -0500 Subject: [PATCH] Auto-generated commit --- .github/workflows/test.yml | 3 +- .github/workflows/test_coverage.yml | 14 +- .github/workflows/test_install.yml | 6 +- is-prng-like/docs/types/tsconfig.json | 39 ++++ is-prng-like/docs/types/tslint.json | 252 ++++++++++++++++++++++++++ 5 files changed, 310 insertions(+), 4 deletions(-) create mode 100644 is-prng-like/docs/types/tsconfig.json create mode 100644 is-prng-like/docs/types/tslint.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd15304a..7f0967ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,8 @@ jobs: id: tests run: | npm test || npm test || npm test - - uses: act10ns/slack@v1 + - name: Send status to Slack channel in case of failure + uses: act10ns/slack@v1 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index f5697d4b..35cffea9 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -51,14 +51,26 @@ jobs: timeout-minutes: 15 - name: Upload coverage to Codecov id: upload - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v2 with: directory: reports/coverage flags: unittests fail_ci_if_error: true + - name: Extract coverage value and assign to output + id: extract-coverage + run: | + coverage=`cat reports/coverage/lcov-report/index.html | grep "fraction" | grep -oP '\d+/\d+' | printf %s "$(cat)" | jq -R -s -c 'split("\n")'` + echo "::set-output name=coverage::$coverage" - uses: act10ns/slack@v1 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() + - name: Send Webhook with status to stdlib backend + uses: distributhor/workflow-webhook@v2 + env: + webhook_url: ${{ secrets.STDLIB_COVERAGE_URL }} + webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} + data: '{ "coverage": ${{ steps.extract-coverage.outputs.coverage }}, "run_id": "${{ github.run_id }}" }' + if: ${{ false }} diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 0bb1900d..bbe93c1c 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -27,6 +27,7 @@ on: workflow_run: workflows: ["Publish Package"] types: [completed] + workflow_dispatch: # Workflow jobs: jobs: @@ -34,7 +35,7 @@ jobs: runs-on: ubuntu-latest env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -45,7 +46,8 @@ jobs: run: | npm install --only=prod || npm install --only=prod || npm install --only=prod timeout-minutes: 15 - - uses: act10ns/slack@v1 + - name: Send notification to Slack in case of failure + uses: act10ns/slack@v1 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/is-prng-like/docs/types/tsconfig.json b/is-prng-like/docs/types/tsconfig.json new file mode 100644 index 00000000..a541d610 --- /dev/null +++ b/is-prng-like/docs/types/tsconfig.json @@ -0,0 +1,39 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": false, + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "alwaysStrict": true, + "baseUrl": ".", + "charset": "utf8", + "forceConsistentCasingInFileNames": true, + "keyofStringsOnly": false, + "lib": [ + "es6" + ], + "locale": "en", + "module": "commonjs", + "moduleResolution": "node", + "newLine": "lf", + "noEmit": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": false, + "noImplicitThis": true, + "noStrictGenericChecks": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "paths": {}, + "pretty": true, + "strictBindCallApply": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "suppressExcessPropertyErrors": false, + "suppressImplicitAnyIndexErrors": false, + "typeRoots": [ "." ], + "types": [] + }, + "exclude": [ + "node_modules" + ] +} diff --git a/is-prng-like/docs/types/tslint.json b/is-prng-like/docs/types/tslint.json new file mode 100644 index 00000000..a0c360d8 --- /dev/null +++ b/is-prng-like/docs/types/tslint.json @@ -0,0 +1,252 @@ +{ + "extends": "dtslint/dtslint.json", + "rules": { + "expect": true, + "export-just-namespace": true, + "no-any-union": true, + "no-bad-reference": true, + "no-const-enum": true, + "no-dead-reference": true, + "no-declare-current-package": true, + "no-import-default-of-export-equals": true, + "no-outside-dependencies": true, + "no-padding": true, + "no-redundant-undefined": true, + "no-relative-import-in-test": false, + "no-self-import": true, + "no-single-declare-module": true, + "no-single-element-tuple-type": true, + "no-unnecessary-generics": true, + "no-useless-files": true, + "prefer-declare-function": true, + "strict-export-declare-modifiers": true, + "trim-file": true, + "unified-signatures": true, + "void-return": true, + + "adjacent-overload-signatures": true, + "ban-ts-ignore": false, + "ban-types": false, + "member-access": [ true, "no-public" ], + "member-ordering": [ true, "fields-first" ], + "no-any": false, + "no-empty-interface": true, + "no-import-side-effect": true, + "no-inferrable-types": true, + "no-internal-module": true, + "no-magic-numbers": false, + "no-namespace": true, + "no-non-null-assertion": true, + "no-parameter-reassignment": false, + "no-reference": true, + "no-unnecessary-type-assertion": true, + "no-var-requires": true, + "only-arrow-functions": false, + "prefer-for-of": false, + "promise-function-async": false, + "typedef": true, + "typedef-whitespace": [ true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + }, + { + "call-signature": "onespace", + "index-signature": "onespace", + "parameter": "onespace", + "property-declaration": "onespace", + "variable-declaration": "onespace" + } + ], + "unified-signatures": true, + + "await-promise": true, + "ban-comma-operator": true, + "ban": [ true, + { + "name": [ "*", "forEach" ], + "message": "Use a regular `for` loop instead." + } + ], + "curly": true, + "forin": true, + "function-constructor": true, + "import-blacklist": [ true, "lodash" ], + "label-position": true, + "no-arg": true, + "no-bitwise": false, + "no-conditional-assignment": true, + "no-console": true, + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-duplicate-switch-case": true, + "no-duplicate-variable": [ true, "check-parameters" ], + "no-dynamic-delete": false, + "no-empty": true, + "no-eval": true, + "no-floating-promises": true, + "no-for-in-array": true, + "no-implicit-dependencies": false, + "no-inferred-empty-object-type": true, + "no-invalid-template-strings": true, + "no-invalid-this": true, + "no-misused-new": true, + "no-null-keyword": false, + "no-object-literal-type-assertion": true, + "no-return-await": true, + "no-shadowed-variable": false, + "no-sparse-arrays": true, + "no-string-literal": false, + "no-string-throw": true, + "no-submodule-imports": false, + "no-switch-case-fall-through": true, + "no-this-assignment": [ true, + { + "allowed-names": [ "^self$" ], + "allow-destructuring": true + } + ], + "no-unbound-method": [ true, "ignore-static" ], + "no-unnecessary-class": true, + "no-unsafe-any": true, + "no-unsafe-finally": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "no-void-expression": true, + "prefer-conditional-expression": false, + "prefer-object-spread": false, + "radix": true, + "restrict-plus-operands": true, + "strict-boolean-expressions": false, + "strict-type-predicates": true, + "switch-default": true, + "triple-equals": true, + "unnecessary-constructor": true, + "use-default-type-parameter": true, + "use-isnan": true, + + "cyclomatic-complexity": false, + "deprecation": true, + "eofline": true, + "indent": [ true, "tabs", 4 ], + "linebreak-style": [ true, "LF" ], + "max-classes-per-file": [ true, 1 ], + "max-file-line-count": [ true, 1000 ], + "max-line-length": [ true, + { + "limit": 80, + "ignore-pattern": "^import |\\/\\/ |\\/?\\* " + } + ], + "no-default-export": false, + "no-default-import": false, + "no-duplicate-imports": true, + "no-mergeable-namespace": true, + "no-require-imports": false, + "object-literal-sort-keys": false, + "prefer-const": true, + "prefer-readonly": true, + "trailing-comma": [ false, + { + "esSpecCompliant": true + } + ], + + "align": false, + "array-type": [ true, "generic" ], + "arrow-parens": true, + "arrow-return-shorthand": true, + "binary-expression-operand-order": true, + "callable-types": true, + "class-name": true, + "comment-format": [ true, "check-space" ], + "comment-type": false, + "completed-docs": true, + "encoding": true, + "file-header": false, + "file-name-casing": [ true, "snake-case" ], + "import-spacing": true, + "increment-decrement": true, + "interface-name": [ true, "never-prefix" ], + "interface-over-type-literal": true, + "jsdoc-format": false, + "match-default-export-name": false, + "newline-before-return": false, + "newline-per-chained-call": false, + "new-parens": true, + "no-angle-bracket-type-assertion": true, + "no-boolean-literal-compare": false, + "no-consecutive-blank-lines": [ true, 2 ], + "no-irregular-whitespace": true, + "no-parameter-properties": true, + "no-redundant-jsdoc": true, + "no-reference-import": true, + "no-trailing-whitespace": true, + "no-unnecessary-callback-wrapper": true, + "no-unnecessary-initializer": true, + "no-unnecessary-qualifier": true, + "number-literal-format": false, + "object-literal-key-quotes": [ true, "always" ], + "object-literal-shorthand": [ true, "never" ], + "one-line": [ true, + "check-catch", + "check-finally", + "check-else", + "check-open-brace", + "check-whitespace" + ], + "one-variable-per-declaration": true, + "ordered-imports": [ true, + { + "grouped-imports": false, + "import-sources-order": "any", + "named-imports-order": "any", + "module-source-path": "full" + } + ], + "prefer-function-over-method": [ true, "allow-public", "allow-protected" ], + "prefer-method-signature": true, + "prefer-switch": [ true, + { + "min-cases": 5 + } + ], + "prefer-template": false, + "prefer-while": true, + "quotemark": [ true, "single", "avoid-escape", "avoid-template" ], + "return-undefined": false, + "semicolon": [ true, "always" ], + "space-before-function-paren": [ true, + { + "anonymous": "always", + "named": "never", + "asyncArrow": "always", + "method": "never", + "constructor": "never" + } + ], + "space-within-parens": [ true, 1 ], + "switch-final-break": [ true, "always" ], + "type-literal-delimiter": [ true, + { + "singleLine": "always" + } + ], + "unnecessary-bind": true, + "variable-name": [ true, "ban-keywords", "check-format" ], + "whitespace": [ true, + "check-branch", + "check-decl", + "check-operator", + "check-rest-spread", + "check-separator", + "check-type", + "check-preblock" + ] + } +}