Update js to ts references (#58029)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
2
.github/instructions/code.instructions.md
vendored
2
.github/instructions/code.instructions.md
vendored
@@ -15,7 +15,7 @@ For code reviews, follow guidelines, tests, and validate instructions. For creat
|
||||
- Be careful fetching full HTML pages off the internet. Prefer to use gh cli whenever possible for github.com. Limit the number of tokens when grabbing HTML.
|
||||
- Avoid pull requests with over 300 lines of code changed. When significantly larger, offer to split up into smaller pull requests if possible.
|
||||
- All new code should be written in TypeScript and not JavaScript.
|
||||
- We use absolute imports, relative to the `src` directory, using the `@` symbol. For example, `getRedirect` which lives in `src/redirects/lib/get-redirect.js` can be imported with `import getRedirect from '@/redirects/lib/get-redirect'`. The same rule applies for TypeScript (`.ts`) imports, e.g. `import type { GeneralSearchHit } from '@/search/types'`
|
||||
- We use absolute imports, relative to the `src` directory, using the `@` symbol. For example, `getRedirect` which lives in `src/redirects/lib/get-redirect.ts` can be imported with `import getRedirect from '@/redirects/lib/get-redirect'`. The same rule applies for TypeScript (`.ts`) imports, e.g. `import type { GeneralSearchHit } from '@/search/types'`
|
||||
|
||||
## Tests
|
||||
|
||||
|
||||
2
.github/instructions/content.instructions.md
vendored
2
.github/instructions/content.instructions.md
vendored
@@ -14,7 +14,7 @@ Before committing content changes, always:
|
||||
1. **Use the content linter** to validate content: `npm run lint-content -- --paths <file-paths>`
|
||||
2. **Check for proper variable usage** in your content
|
||||
3. **Verify [AUTOTITLE] links** point to existing articles
|
||||
4. **Run tests** on changed content: `npm run test -- src/content-render/tests/render-changed-and-deleted-files.js`
|
||||
4. **Run tests** on changed content: `npm run test -- src/content-render/tests/render-changed-and-deleted-files.ts`
|
||||
|
||||
## Bullet lists
|
||||
|
||||
|
||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -9,9 +9,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**/*.js'
|
||||
- '**/*.ts'
|
||||
- '**/*.jsx'
|
||||
- '**/*.tsx'
|
||||
- '.github/workflows/codeql.yml'
|
||||
# This is so that when CodeQL runs on a pull request, it can compare
|
||||
|
||||
@@ -9,7 +9,7 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- src/languages/scripts/count-translation-corruptions.ts
|
||||
- src/languages/lib/correct-translation-content.js
|
||||
- src/languages/lib/correct-translation-content.ts
|
||||
- .github/workflows/count-translation-corruptions.yml
|
||||
- .github/actions/node-npm-setup/action.yml
|
||||
- .github/actions/clone-translations/action.yml
|
||||
|
||||
4
.github/workflows/enterprise-dates.yml
vendored
4
.github/workflows/enterprise-dates.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
|
||||
- uses: ./.github/actions/node-npm-setup
|
||||
|
||||
- name: Run src/ghes-releases/scripts/update-enterprise-dates.js
|
||||
- name: Run src/ghes-releases/scripts/update-enterprise-dates.ts
|
||||
run: npm run update-enterprise-dates
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
with:
|
||||
# need to use a token with repo and workflow scopes for this step
|
||||
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
|
||||
commit-message: '🤖 ran src/ghes-releases/scripts/update-enterprise-dates.js'
|
||||
commit-message: '🤖 ran src/ghes-releases/scripts/update-enterprise-dates.ts'
|
||||
title: 🤖 src/ghes-releases/lib/enterprise-dates.json update
|
||||
body:
|
||||
"Hello! The GitHub Enterprise Server release dates have changed.\n\n
|
||||
|
||||
2
.github/workflows/move-content.yml
vendored
2
.github/workflows/move-content.yml
vendored
@@ -7,7 +7,7 @@ name: Move content script test
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- src/content-render/scripts/move-content.js
|
||||
- src/content-render/scripts/move-content.ts
|
||||
- src/content-render/scripts/test-move-content.ts
|
||||
- 'src/frame/lib/**/*.js'
|
||||
- .github/workflows/move-content.yml
|
||||
|
||||
4
.github/workflows/orphaned-files-check.yml
vendored
4
.github/workflows/orphaned-files-check.yml
vendored
@@ -14,10 +14,10 @@ on:
|
||||
- .github/workflows/orphaned-files-check.yml
|
||||
# In case any of the dependencies affect the script
|
||||
- 'package*.json'
|
||||
- src/assets/scripts/find-orphaned-assets.js
|
||||
- src/assets/scripts/find-orphaned-assets.ts
|
||||
- src/content-render/scripts/reusables-cli/find/unused.ts
|
||||
- src/workflows/walk-files.ts
|
||||
- src/languages/lib/languages.js
|
||||
- src/languages/lib/languages.ts
|
||||
- .github/actions/clone-translations/action.yml
|
||||
- .github/actions/node-npm-setup/action.yml
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ on:
|
||||
- reopened
|
||||
- synchronize
|
||||
paths:
|
||||
- '**.js'
|
||||
- '**.ts'
|
||||
- '**.tsx'
|
||||
- '**.scss'
|
||||
|
||||
Reference in New Issue
Block a user