diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8a06895 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + # Maintain dependencies for npm dependencies + - package-ecosystem: "npm" + directory: "/" + target-branch: develop + schedule: + interval: "weekly" + day: sunday + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + target-branch: develop + directory: "/" + schedule: + interval: "weekly" + day: sunday diff --git a/.github/workflows/pull-request-check.yml b/.github/workflows/pull-request-check.yml new file mode 100644 index 0000000..2972d24 --- /dev/null +++ b/.github/workflows/pull-request-check.yml @@ -0,0 +1,76 @@ +name: Check pull request + +on: + pull_request: + branches: [master, develop] + +env: + NODE_VERSION: 18 + RETENTION_DAYS: 30 + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{env.NODE_VERSION}} + - run: npm ci + - run: npm run lint + - uses: actions/upload-artifact@v4 + if: always() + with: + name: lint-report + path: lint-report/ + retention-days: ${{env.RETENTION_DAYS}} + + performance: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{env.NODE_VERSION}} + - run: npm ci + - run: npm run performance + - uses: actions/upload-artifact@v4 + if: always() + with: + name: performance-report + path: performance-report/ + retention-days: ${{env.RETENTION_DAYS}} + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{env.NODE_VERSION}} + - run: npm ci + - run: npm run test + - uses: actions/upload-artifact@v4 + if: always() + with: + name: test-report + path: test-report/ + retention-days: ${{env.RETENTION_DAYS}} + + build: + needs: [lint, performance, test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{env.NODE_VERSION}} + - run: npm ci + - run: npm run build + - uses: actions/upload-artifact@v4 + if: always() + with: + name: build-report + path: build-report/ + retention-days: ${{env.RETENTION_DAYS}} + diff --git a/package-lock.json b/package-lock.json index 7352d4e..42b1014 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,6 +44,7 @@ "jasmine-core": "~5.1.0", "jest": "^29.7.0", "lint-staged": "^15.2.2", + "oxlint": "^0.3.1", "prettier": "^3.2.5", "prettier-plugin-organize-attributes": "^1.0.0", "stylelint": "^16.3.1", @@ -5281,6 +5282,110 @@ "node": ">= 10" } }, + "node_modules/@oxlint/darwin-arm64": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@oxlint/darwin-arm64/-/darwin-arm64-0.3.1.tgz", + "integrity": "sha512-Us0pinFVI72zMaz48BlApBzASRZAyIU0YCl3frbZ6PiMLu4oen/mvAloZMZ0X9rFCQQDBVCf2k8kkdIfUBrd1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint/darwin-x64": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@oxlint/darwin-x64/-/darwin-x64-0.3.1.tgz", + "integrity": "sha512-Na+9F7+UYrIhlTX8wblG/dl1G5BNWtpv2Lyp5Hj7ynaghkUXdCP+riT9xpmGYjUXCiMU1fbY08RQQLupgL7URA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint/linux-arm64-gnu": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-gnu/-/linux-arm64-gnu-0.3.1.tgz", + "integrity": "sha512-0bsZ0RkuHbzAjj7Am5ePkGmPZjtVhFkbYXw5HkJIBAscWTAR2m3+QxjzBQhEyEbLvkJSig7PFGDwLIwW7+MptQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint/linux-arm64-musl": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-musl/-/linux-arm64-musl-0.3.1.tgz", + "integrity": "sha512-d7thD4X15XqQqNCLOVVAq9SJF2unalLGn3oEu760AeonExvFJCJf274GIE2ODKGuLX8V/1rKGt6Kv3rpbRFQcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint/linux-x64-gnu": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-gnu/-/linux-x64-gnu-0.3.1.tgz", + "integrity": "sha512-5stWYdso6PaDrbENlrxdjUeyQlOjzCgScBFL+91fdFBCXZFu9diDIsHf88/efO3HQej5xZopUF0kr51GBTXVVQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint/linux-x64-musl": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-musl/-/linux-x64-musl-0.3.1.tgz", + "integrity": "sha512-4Z0/iPUnhWFrc3kV7ADiSzx8Bq8hPQonhvtsEvgXS/2LXaS8hCXSSpTybVC+Wa9AhEF0J2/KMyFM2VhxjKJqDg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint/win32-arm64": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@oxlint/win32-arm64/-/win32-arm64-0.3.1.tgz", + "integrity": "sha512-wT5y+7ob9kd1TpVLSfhq5EIZEwE6N1OYV+KzL/ywEgLg/sB6tXjUoC03/MEkF10Xj+v7HKLBonnXIX3S//Pfqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxlint/win32-x64": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@oxlint/win32-x64/-/win32-x64-0.3.1.tgz", + "integrity": "sha512-dJWU8YqYPARYTjpjQ4tuzqtpumuCCwSggxkja9N7whqGBCH1IswEyt5JQIbynI+vERxugz3iJtWk59kSHojHgg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -15484,6 +15589,31 @@ "node": ">=0.10.0" } }, + "node_modules/oxlint": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-0.3.1.tgz", + "integrity": "sha512-+bj07l2R2V0xNogo+Wr9+IsdlkBa2i7brOioOyzV6I8kwMBEEuJmt7oOmZYs/HZVAOQI19x7aBGKqw71itaNSA==", + "dev": true, + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": ">=14.*" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/darwin-arm64": "0.3.1", + "@oxlint/darwin-x64": "0.3.1", + "@oxlint/linux-arm64-gnu": "0.3.1", + "@oxlint/linux-arm64-musl": "0.3.1", + "@oxlint/linux-x64-gnu": "0.3.1", + "@oxlint/linux-x64-musl": "0.3.1", + "@oxlint/win32-arm64": "0.3.1", + "@oxlint/win32-x64": "0.3.1" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", diff --git a/package.json b/package.json index c4353df..194bf7e 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "format": "prettier --ignore-unknown **/*", "format:write": "prettier --write --ignore-unknown **/*", "stylelint": "stylelint **/*.{css,scss}", + "performance": "npx oxlint -D correctness -D perf --deny-warnings", "stylelint:fix": "stylelint **/*.{css,scss} --fix" }, "private": true, @@ -53,6 +54,7 @@ "jasmine-core": "~5.1.0", "jest": "^29.7.0", "lint-staged": "^15.2.2", + "oxlint": "^0.3.1", "prettier": "^3.2.5", "prettier-plugin-organize-attributes": "^1.0.0", "stylelint": "^16.3.1",