Skip to content

Commit 37c5588

Browse files
change-files forking done and tested (#4)
1 parent 4334499 commit 37c5588

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+101955
-1
lines changed

.codacy.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
exclude_paths:
3+
- "*.md"
4+
- "dist/**"

.eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/
2+
lib/
3+
node_modules/
4+
jest.config.js
5+
coverage/

.eslintrc.json

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"plugins": [
3+
"jest",
4+
"@typescript-eslint",
5+
"github"
6+
],
7+
"extends": [
8+
"plugin:github/recommended",
9+
"plugin:prettier/recommended"
10+
],
11+
"parser": "@typescript-eslint/parser",
12+
"parserOptions": {
13+
"ecmaVersion": 9,
14+
"sourceType": "module",
15+
"project": "./tsconfig.json"
16+
},
17+
"rules": {
18+
"i18n-text/no-en": "off",
19+
"eslint-comments/no-use": "off",
20+
"import/no-namespace": "off",
21+
"no-unused-vars": "off",
22+
"@typescript-eslint/no-unused-vars": "error",
23+
"@typescript-eslint/explicit-member-accessibility": [
24+
"error",
25+
{
26+
"accessibility": "no-public"
27+
}
28+
],
29+
"@typescript-eslint/no-require-imports": "error",
30+
"@typescript-eslint/array-type": "error",
31+
"@typescript-eslint/await-thenable": "error",
32+
"@typescript-eslint/ban-ts-comment": "off",
33+
"camelcase": "off",
34+
"@typescript-eslint/consistent-type-assertions": "error",
35+
"@typescript-eslint/explicit-function-return-type": [
36+
"error",
37+
{
38+
"allowExpressions": true
39+
}
40+
],
41+
"@typescript-eslint/func-call-spacing": [
42+
"error",
43+
"never"
44+
],
45+
"@typescript-eslint/no-array-constructor": "error",
46+
"@typescript-eslint/no-empty-interface": "error",
47+
"@typescript-eslint/no-explicit-any": "error",
48+
"@typescript-eslint/no-extraneous-class": "error",
49+
"@typescript-eslint/no-for-in-array": "error",
50+
"@typescript-eslint/no-inferrable-types": "error",
51+
"@typescript-eslint/no-misused-new": "error",
52+
"@typescript-eslint/no-namespace": "error",
53+
"@typescript-eslint/no-non-null-assertion": "warn",
54+
"@typescript-eslint/no-unnecessary-qualifier": "error",
55+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
56+
"@typescript-eslint/no-useless-constructor": "error",
57+
"@typescript-eslint/no-var-requires": "error",
58+
"@typescript-eslint/prefer-for-of": "warn",
59+
"@typescript-eslint/prefer-function-type": "warn",
60+
"@typescript-eslint/prefer-includes": "error",
61+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
62+
"@typescript-eslint/promise-function-async": "error",
63+
"@typescript-eslint/require-array-sort-compare": "error",
64+
"@typescript-eslint/restrict-plus-operands": "error",
65+
"no-shadow": "off",
66+
"@typescript-eslint/no-shadow": "error",
67+
"semi": "off",
68+
"filenames/match-regex": [
69+
"error",
70+
"^[a-zA-Z0-9\\-.]+$",
71+
true
72+
],
73+
"@typescript-eslint/semi": [
74+
"error",
75+
"never"
76+
],
77+
"@typescript-eslint/type-annotation-spacing": "error",
78+
"@typescript-eslint/unbound-method": "error"
79+
},
80+
"env": {
81+
"node": true,
82+
"es6": true,
83+
"jest/globals": true
84+
}
85+
}

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/** -diff linguist-generated=true

.github/dependabot.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
versioning-strategy: widen
9+
labels:
10+
- "merge when passing"
11+
- package-ecosystem: github-actions
12+
directory: "/"
13+
schedule:
14+
interval: daily
15+
open-pull-requests-limit: 10
16+
labels:
17+
- "merge when passing"
18+
- package-ecosystem: gitsubmodule
19+
directory: /
20+
schedule:
21+
interval: daily
22+
open-pull-requests-limit: 10
23+
labels:
24+
- "merge when passing"

.github/workflows/actions_release.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release GitHub Actions
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "Tag for the release"
8+
required: true
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
release:
15+
permissions:
16+
actions: read
17+
id-token: write
18+
contents: write
19+
uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1
20+
with:
21+
tag: "${{ github.event.inputs.tag }}"

.github/workflows/codacy-analysis.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This workflow checks out code, performs a Codacy security scan
2+
# and integrates the results with the
3+
# GitHub Advanced Security code scanning feature. For more information on
4+
# the Codacy security scan action usage and parameters, see
5+
# https://github.com/codacy/codacy-analysis-cli-action.
6+
# For more information on Codacy Analysis CLI in general, see
7+
# https://github.com/codacy/codacy-analysis-cli.
8+
9+
name: Codacy Security Scan
10+
11+
on:
12+
push:
13+
branches: [ main ]
14+
pull_request:
15+
# The branches below must be a subset of the branches above
16+
branches: [ main ]
17+
schedule:
18+
- cron: '15 16 * * 2'
19+
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write
24+
25+
jobs:
26+
codacy-security-scan:
27+
name: Codacy Security Scan
28+
runs-on: ubuntu-latest
29+
steps:
30+
# Checkout the repository to the GitHub Actions runner
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
35+
- name: Run Codacy Analysis CLI
36+
continue-on-error: true
37+
uses: codacy/[email protected]
38+
with:
39+
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
40+
# You can also omit the token and run the tools that support default configurations
41+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
42+
verbose: true
43+
output: results.sarif
44+
format: sarif
45+
# Adjust severity of non-security issues
46+
gh-code-scanning-compat: true
47+
# Force 0 exit code to allow SARIF file generation
48+
# This will hand over control about PR rejection to the GitHub side
49+
max-allowed-issues: 2147483647
50+
51+
# Upload the SARIF file generated in the previous step
52+
- name: Upload SARIF results file
53+
continue-on-error: true
54+
uses: github/codeql-action/upload-sarif@v3
55+
with:
56+
sarif_file: results.sarif

.github/workflows/codeql.yml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ "main" ]
20+
schedule:
21+
- cron: '44 20 * * 0'
22+
23+
permissions:
24+
actions: read
25+
contents: read
26+
security-events: write
27+
28+
jobs:
29+
analyze:
30+
name: Analyze
31+
runs-on: ubuntu-latest
32+
permissions:
33+
actions: read
34+
contents: read
35+
security-events: write
36+
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
language: [ 'javascript' ]
41+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
42+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
# Initializes the CodeQL tools for scanning.
49+
- name: Initialize CodeQL
50+
uses: github/codeql-action/init@v3
51+
with:
52+
languages: ${{ matrix.language }}
53+
# If you wish to specify custom queries, you can do so here or in a config file.
54+
# By default, queries listed here will override any specified in a config file.
55+
# Prefix the list here with "+" to use these queries and those in the config file.
56+
57+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
58+
# queries: security-extended,security-and-quality
59+
60+
61+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
62+
# If this step fails, then you should remove it and run the build manually (see below)
63+
- name: Autobuild
64+
uses: github/codeql-action/autobuild@v3
65+
66+
# ℹ️ Command-line programs to run using the OS shell.
67+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
68+
69+
# If the Autobuild fails above, remove it and uncomment the following three lines.
70+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
71+
72+
# - run: |
73+
# echo "Run, Build Application using script"
74+
# ./location_of_script_within_repo/buildscript.sh
75+
76+
- name: Perform CodeQL Analysis
77+
uses: github/codeql-action/analyze@v3
78+
with:
79+
category: "/language:${{matrix.language}}"

.github/workflows/greetings.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Greetings
2+
3+
on: [pull_request_target, issues]
4+
5+
permissions:
6+
pull-requests: write
7+
issues: write
8+
9+
jobs:
10+
greeting:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/first-interaction@v1
14+
continue-on-error: true
15+
with:
16+
repo-token: ${{ secrets.PAT_TOKEN }}
17+
issue-message: "Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience."
18+
pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes if applicable."

0 commit comments

Comments
 (0)