diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 000000000..cc369d5ed --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,73 @@ +--- +# https://github.com/super-linter/super-linter/blob/d0b304a6a58b560749c679157953fec8ba7206df/TEMPLATES/.eslintrc.yml +env: + browser: true + es6: true + jest: true + node: true +extends: + - "eslint:recommended" +ignorePatterns: + - "!.*" + - "**/node_modules/.*" +plugins: + - n + - prettier +overrides: + # JSON files + - files: + - "*.json" + extends: + - plugin:jsonc/recommended-with-json + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSON + # JSONC files + - files: + - "*.jsonc" + extends: + - plugin:jsonc/recommended-with-jsonc + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSONC + # JSON5 files + - files: + - "*.json5" + extends: + - plugin:jsonc/recommended-with-json5 + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSON5 + # Javascript files + - files: + - "**/*.js" + - "**/*.mjs" + - "**/*.cjs" + - "**/*.jsx" + #extends: + # - "plugin:react/recommended" + parserOptions: + sourceType: module + ecmaVersion: latest + ecmaFeatures: + jsx: true + modules: true + # TypeScript files + - files: + - "**/*.ts" + - "**/*.cts" + - "**/*.mts" + - "**/*.tsx" + extends: + - "plugin:@typescript-eslint/recommended" + - plugin:n/recommended + #- plugin:react/recommended + - prettier + rules: + n/no-missing-import: off + parser: "@typescript-eslint/parser" + plugins: + - "@typescript-eslint" + parserOptions: + ecmaVersion: latest + sourceType: module diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index 2e3981fe0..bcbd629ac 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -32,13 +32,12 @@ jobs: - name: Install dependencies run: bash "${GITHUB_WORKSPACE}/scripts/pr_test/pr_super_lint/npm_ci.sh" - name: Lint files - uses: super-linter/super-linter/slim@85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d # v7.2.1 + uses: super-linter/super-linter/slim@4e8a7c2bf106c4c766c816b35ec612638dc9b6b2 # v7.3.0 env: VALIDATE_ALL_CODEBASE: true VALIDATE_SQLFLUFF: false VALIDATE_CHECKOV: false # TODO: checkovが依存するopenaiのバージョンがアップデートされたら削除 VALIDATE_JSCPD: false - TYPESCRIPT_DEFAULT_STYLE: prettier VALIDATE_TYPESCRIPT_STANDARD: false LINTER_RULES_PATH: . FILTER_REGEX_EXCLUDE: ".*assets/.*.txt" @@ -46,6 +45,7 @@ jobs: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} WORKON_HOME: "" PYTHONPATH: ${{ env.PYTHONPATH }} + VALIDATE_GIT_COMMITLINT: false pr-dotenv-linter: runs-on: ubuntu-latest steps: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0af78494a..7b2ef7c0b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ --- repos: - repo: https://github.com/zricethezav/gitleaks - rev: v8.21.2 + rev: v8.24.0 hooks: - id: gitleaks diff --git a/.textlintrc b/.textlintrc index 8be628ed4..a586356f4 100644 --- a/.textlintrc +++ b/.textlintrc @@ -24,7 +24,8 @@ "https://platform.openai.com/api-keys", "https://fly.io/dashboard/", "https://fly.io/docs/getting-started/launch-demo/#1-install-flyctl", - "https://fly.io/docs/getting-started/launch-demo/#2-sign-up-or-sign-in" + "https://fly.io/docs/getting-started/launch-demo/#2-sign-up-or-sign-in", + "https://ngrok.com/" ] }, "no-mixed-zenkaku-and-hankaku-alphabet": true, diff --git a/package-lock.json b/package-lock.json index d7fdb5000..2d7f5fdf0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,9 +4,11 @@ "requires": true, "packages": { "": { - "devDependencies": { + "dependencies": { "@actions/github": "6.0.0", - "@octokit/plugin-rest-endpoint-methods": "13.3.1", + "@octokit/plugin-rest-endpoint-methods": "13.3.1" + }, + "devDependencies": { "@proofdict/textlint-rule-proofdict": "3.1.2", "@textlint-ja/textlint-rule-no-insert-dropping-sa": "2.0.1", "markdownlint-cli": "0.44.0", @@ -35,7 +37,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", - "dev": true, "license": "MIT", "dependencies": { "@actions/http-client": "^2.2.0", @@ -48,7 +49,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 18" @@ -58,7 +58,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz", "integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/auth-token": "^4.0.0", @@ -77,7 +76,6 @@ "version": "9.0.6", "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz", "integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/types": "^13.1.0", @@ -91,7 +89,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz", "integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/request": "^8.4.1", @@ -106,14 +103,12 @@ "version": "20.0.0", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==", - "dev": true, "license": "MIT" }, "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz", "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/types": "^12.6.0" @@ -129,7 +124,6 @@ "version": "12.6.0", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/openapi-types": "^20.0.0" @@ -139,7 +133,6 @@ "version": "10.4.1", "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz", "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/types": "^12.6.0" @@ -155,7 +148,6 @@ "version": "12.6.0", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/openapi-types": "^20.0.0" @@ -165,7 +157,6 @@ "version": "8.4.1", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz", "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/endpoint": "^9.0.6", @@ -181,7 +172,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz", "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/types": "^13.1.0", @@ -196,21 +186,18 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", - "dev": true, "license": "Apache-2.0" }, "node_modules/@actions/github/node_modules/universal-user-agent": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", - "dev": true, "license": "ISC" }, "node_modules/@actions/http-client": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", - "dev": true, "license": "MIT", "dependencies": { "tunnel": "^0.0.6", @@ -713,7 +700,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "dev": true, "license": "MIT", "engines": { "node": ">=14" @@ -894,7 +880,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", - "dev": true, "license": "MIT", "peer": true, "engines": { @@ -905,7 +890,6 @@ "version": "6.1.4", "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz", "integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==", - "dev": true, "license": "MIT", "peer": true, "dependencies": { @@ -925,7 +909,6 @@ "version": "10.1.3", "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz", "integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==", - "dev": true, "license": "MIT", "peer": true, "dependencies": { @@ -940,7 +923,6 @@ "version": "8.2.1", "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.1.tgz", "integrity": "sha512-n57hXtOoHrhwTWdvhVkdJHdhTv0JstjDbDRhJfwIRNfFqmSo1DaK/mD2syoNUoLCyqSjBpGAKOG0BuwF392slw==", - "dev": true, "license": "MIT", "peer": true, "dependencies": { @@ -956,14 +938,12 @@ "version": "23.0.1", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz", "integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==", - "dev": true, "license": "MIT" }, "node_modules/@octokit/plugin-rest-endpoint-methods": { "version": "13.3.1", "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz", "integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/types": "^13.8.0" @@ -979,7 +959,6 @@ "version": "9.2.2", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz", "integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==", - "dev": true, "license": "MIT", "peer": true, "dependencies": { @@ -997,7 +976,6 @@ "version": "6.1.7", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz", "integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==", - "dev": true, "license": "MIT", "peer": true, "dependencies": { @@ -1011,7 +989,6 @@ "version": "13.8.0", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz", "integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==", - "dev": true, "license": "MIT", "dependencies": { "@octokit/openapi-types": "^23.0.1" @@ -1769,7 +1746,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==", - "dev": true, "license": "Apache-2.0", "peer": true }, @@ -2248,7 +2224,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", - "dev": true, "license": "ISC" }, "node_modules/dequal": { @@ -2610,7 +2585,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", - "dev": true, "funding": [ { "type": "github", @@ -6522,7 +6496,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -9616,7 +9589,6 @@ "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.6.11 <=0.7.0 || >=0.7.3" @@ -9766,7 +9738,6 @@ "version": "5.28.5", "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", - "dev": true, "license": "MIT", "dependencies": { "@fastify/busboy": "^2.0.0" @@ -9899,7 +9870,6 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==", - "dev": true, "license": "ISC", "peer": true }, @@ -10248,7 +10218,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, "license": "ISC" }, "node_modules/write-file-atomic": { diff --git a/package.json b/package.json index d4795b6c2..4095d0eea 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,6 @@ "lint:secret": "docker run --rm --platform=linux/amd64 -v $(pwd):/path -w /path zricethezav/gitleaks protect --verbose --redact" }, "devDependencies": { - "@actions/github": "6.0.0", - "@octokit/plugin-rest-endpoint-methods": "13.3.1", "@proofdict/textlint-rule-proofdict": "3.1.2", "@textlint-ja/textlint-rule-no-insert-dropping-sa": "2.0.1", "markdownlint-cli": "0.44.0", @@ -32,5 +30,9 @@ "engines": { "node": ">=20", "npm": "^10.8.2 || ^9.6.5" + }, + "dependencies": { + "@actions/github": "6.0.0", + "@octokit/plugin-rest-endpoint-methods": "13.3.1" } } diff --git a/pyproject.toml b/pyproject.toml index 0413faa03..d5480454f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ text = "MIT" Repository = "https://github.com/koluku/sudden-death" [tool.uv] -required-version = "0.6.5" +required-version = "0.6.6" [[tool.uv.index]] name = "pypi" url = "https://pypi.org/simple"