From 7b8f48edbfc26ac85569db5bb365d66f599b2261 Mon Sep 17 00:00:00 2001 From: lumix Date: Tue, 13 May 2025 17:57:41 +0800 Subject: [PATCH] fix: no secret info in yaml (#112) * chore: add vscode settings.json * fix: add github secret for web coverage --- .github/workflows/web_coverage.yaml | 2 +- .gitignore | 1 + .vscode/settings.json | 91 +++++++++++++++++++++++++++++ package.json | 4 +- 4 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/web_coverage.yaml b/.github/workflows/web_coverage.yaml index 24064473..bee3ecc2 100644 --- a/.github/workflows/web_coverage.yaml +++ b/.github/workflows/web_coverage.yaml @@ -58,7 +58,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: - token: cf9245e0-e136-4e21-b0ee-35755fa0c493 + token: ${{ secrets.WEB_CODE_COV }} files: coverage/jest/lcov.info, coverage/cypress/lcov.info flags: appflowy_web name: codecov-umbrella diff --git a/.gitignore b/.gitignore index 81302f89..fe891130 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ dist-ssr # Editor directories and files .vscode/* +!.vscode/settings.json !.vscode/extensions.json .idea .DS_Store diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7d669850 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,91 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib", + "editor.rulers": [ + 120 + ], + "javascript.preferences.importModuleSpecifier": "relative", + "typescript.preferences.importModuleSpecifier": "relative", + // Disable the default formatter, use eslint instead + "search.followSymlinks": false, + "search.exclude": { + "**/node_modules": true, + "**/bower_components": true, + "**/*.code-search": true, + "**/lib": true + }, + // Auto fix + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + "eslint.workingDirectories": [ + { + "mode": "auto" + } + ], + // Enable the ESlint flat config support + "eslint.useFlatConfig": true, + // Silent the stylistic rules in you IDE, but still auto fix them + "eslint.rules.customizations": [ + { + "rule": "style/*", + "severity": "off" + }, + { + "rule": "format/*", + "severity": "off" + }, + { + "rule": "*-indent", + "severity": "off" + }, + { + "rule": "*-spacing", + "severity": "off" + }, + { + "rule": "*-spaces", + "severity": "off" + }, + { + "rule": "*-order", + "severity": "off" + }, + { + "rule": "*-dangle", + "severity": "off" + }, + { + "rule": "*-newline", + "severity": "off" + }, + { + "rule": "*quotes", + "severity": "off" + }, + { + "rule": "*semi", + "severity": "off" + } + ], + // Enable eslint for all supported languages + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml", + "toml", + "less", + "css" + ], + "editor.quickSuggestions": { + "strings": "on" + } +} \ No newline at end of file diff --git a/package.json b/package.json index 931dd8f6..cd7975d7 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "dev": "vite", "dev:coverage": "cross-env COVERAGE=true vite", "build": "vite build", - "lint": "tsc --noEmit --project tsconfig.web.json && eslint --ext .js,.ts,.tsx . --ignore-path .eslintignore.web", + "type-check": "tsc --noEmit --project tsconfig.web.json", + "type-check:watch": "tsc --build --watch", + "lint": "pnpm type-check && eslint --ext .js,.ts,.tsx . --ignore-path .eslintignore.web", "start": "vite preview --port 3000", "css:variables": "node scripts/generateTailwindColors.cjs", "analyze": "cross-env ANALYZE_MODE=true vite build",