Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo sync #32448

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/generate-code-scanning-query-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ jobs:
with:
token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW }}

- name: Lint the code (eslint)
if: ${{ github.event_name == 'pull_request' }}
env:
PATH: '$PATH:${{ github.workspace }}/node_modules/.bin'
run: |
eslint --no-ignore src/code-scanning/scripts/generate-code-scanning-query-list.ts

- name: Lint the code (tsc)
if: ${{ github.event_name == 'pull_request' }}
env:
PATH: '$PATH:${{ github.workspace }}/node_modules/.bin'
run: |
tsc --noEmit --project src/code-scanning/scripts/tsconfig.json

- name: Build code scanning query list
run: |
for lang in "cpp" "csharp" "go" "java" "javascript" "python" "ruby" "swift"; do
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ jobs:

- uses: ./.github/actions/node-npm-setup

- uses: ./.github/actions/install-cocofix
with:
token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW }}

- name: Run linter
run: npm run lint

Expand Down
101 changes: 48 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@
"src/bookmarklets/*",
"src/open-source/scripts/add-pr-links.js",
"src/open-source/scripts/pr-link-source.js",
"rest-api-description/"
"rest-api-description/",
"src/code-scanning/scripts/generate-code-scanning-query-list.ts"
]
},
"jest": {
Expand Down Expand Up @@ -273,7 +274,7 @@
"highlightjs-curl": "^1.3.0",
"hot-shots": "^10.0.0",
"html-entities": "^2.4.0",
"http-proxy-middleware": "2.0.6",
"http-proxy-middleware": "3.0.0",
"imurmurhash": "^0.1.4",
"is-svg": "5.0.0",
"javascript-stringify": "^2.1.0",
Expand Down Expand Up @@ -313,7 +314,7 @@
"strip-html-comments": "^1.0.0",
"styled-components": "^5.3.5",
"swr": "^2.2.4",
"tsx": "4.7.1",
"tsx": "4.7.2",
"unified": "^11.0.3",
"unist-util-visit": "^5.0.0",
"url-template": "^3.0.0",
Expand All @@ -322,13 +323,13 @@
"devDependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^6.0.0",
"@axe-core/playwright": "^4.8.5",
"@axe-core/playwright": "^4.9.0",
"@github/markdownlint-github": "^0.4.1",
"@graphql-inspector/core": "^5.0.0",
"@graphql-tools/load": "^8.0.0",
"@jest/globals": "29.7.0",
"@octokit/rest": "^20.0.2",
"@playwright/test": "1.42.1",
"@playwright/test": "1.43.0",
"@types/imurmurhash": "^0.1.4",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.14.202",
Expand Down Expand Up @@ -369,7 +370,7 @@
"micromark-extension-gfm-table": "^2.0.0",
"mkdirp": "^3.0.0",
"mockdate": "^3.0.5",
"nock": "^13.5.0",
"nock": "^13.5.4",
"nodemon": "3.1.0",
"npm-merge-driver-install": "^3.0.0",
"nth-check": "2.1.1",
Expand All @@ -378,8 +379,8 @@
"robots-parser": "^3.0.0",
"sass": "^1.52.3",
"start-server-and-test": "^2.0.3",
"ts-jest": "29.1.1",
"typescript": "^5.4.2",
"ts-jest": "29.1.2",
"typescript": "^5.4.4",
"unist-util-remove": "^4.0.0",
"unist-util-visit-parents": "6.0.1",
"website-scraper": "^5.3.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async function main(options: Options, language: string) {
}

function printQueries(options: Options, queries: QueryExtended[], includeAutofix: boolean) {
const markdown = []
const markdown: string[] = []
markdown.push('{% rowheaders %}')
markdown.push('') // blank line
const header = ['Query name', 'Related CWEs', 'Default', 'Extended']
Expand Down
5 changes: 5 additions & 0 deletions src/code-scanning/scripts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "../../../tsconfig.json",
"include": ["generate-code-scanning-query-list.ts"],
"exclude": ["node_modules"]
}
11 changes: 0 additions & 11 deletions src/frame/middleware/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,6 @@ if (process.env.ELASTICSEARCH_URL) {
createProxyMiddleware({
target: 'https://docs.github.com',
changeOrigin: true,
// By default, http-proxy-middleware will `this.logger.info(...)`
// to say the following:
//
// [HPM] Proxy created: / -> https://docs.github.com
//
// This can be misleading and confusing for anybody starting the
// server. Besides, in a sense we aren't particularly interested
// in this proxy from a developer point of view. If you don't
// have your own ELASTICSEARCH_URL locally, then search functionality
// isn't what you're developing/debugging.
logLevel: 'warn',
}),
)
}
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
}
},
"exclude": [
"node_modules"
"node_modules",
"src/code-scanning/scripts/generate-code-scanning-query-list.ts"
],
"include": [
"*.d.ts",
Expand Down
Loading