diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f679d2e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + groups: + all: + patterns: + - "*" + update-types: + - "minor" + - "patch" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c2c0563 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + + # ESLint and Prettier must be in `package.json` + - name: Install Node.js dependencies + run: npm ci + + - name: Run build + run: npm run build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..086a8c6 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,42 @@ +name: Lint + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + checks: write + contents: write + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + + # ESLint and Prettier must be in `package.json` + - name: Install Node.js dependencies + run: npm ci + + - name: Run linters + uses: wearerequired/lint-action@v2 + with: + auto_fix: true + eslint: true + eslint_auto_fix: true + eslint_args: "--max-warnings 0" + prettier: true + prettier_auto_fix: true diff --git a/.gitignore b/.gitignore index a6bb977..f3883fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +dist + # Logs logs *.log diff --git a/package.json b/package.json index c3b0c90..1f1cb4b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "format": "npx prettier . --check", "format:fix": "npx prettier . --write", "lint": "npx eslint .", - "lint:fix": "npx eslint . --fix" + "lint:fix": "npx eslint . --fix", + "build": "tsc --project tsconfig.build.json" }, "devDependencies": { "@eslint/js": "^9.12.0", diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..f9420a1 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + "declaration": true, + "declarationMap": true, + "sourceMap": true + } +}