@@ -186,7 +186,7 @@ With your dev container configuration added and a basic understanding of what ev
|
||||
1. Run the application by pressing `F5`.
|
||||
1. If a "toast" notification message is displayed at the bottom right corner of {% data variables.product.prodname_vscode_shortname %}, asking whether you want to switch to standard mode, click **Yes**.
|
||||
|
||||

|
||||

|
||||
|
||||
1. When the project files have been imported, click the **Debug Console** tab to see the program output.
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ versions:
|
||||
{% data reusables.user-settings.saved_replies %}
|
||||
1. Under "Add a saved reply", add a title for your saved reply.
|
||||
2. In the "Write" field, add the content you'd like to use for the saved reply. For information on using Markdown, see "[AUTOTITLE](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)."
|
||||

|
||||

|
||||
1. To review your reply, click **Preview**.
|
||||

|
||||

|
||||
1. Click **Add saved reply**.
|
||||
|
||||
## Further reading
|
||||
|
||||
@@ -80,7 +80,7 @@ Click **Submit new issue** to create your issue. You can edit any of the above f
|
||||
|
||||
After your issue is created, continue the conversation by adding comments to the issue. You can @mention collaborators or teams to draw their attention to a comment. To link related issues in the same repository, you can type `#` followed by part of the issue title and then clicking the issue that you want to link. For more information, see "[AUTOTITLE](/get-started/writing-on-github)."
|
||||
|
||||

|
||||

|
||||
|
||||
## Next steps
|
||||
|
||||
|
||||
5
data/features/dependabot-updates-pnpm-support.yml
Normal file
5
data/features/dependabot-updates-pnpm-support.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
# Reference: Issue #10063 - Dependabot: pnpm supported for version updates (not security updates)
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>3.9'
|
||||
@@ -22,7 +22,8 @@ npm | `npm` | v6, v7, v8 | {% octicon "check" aria-l
|
||||
{% ifversion dependabot-PEP621-support %}[pip](#pip-and-pip-compile){% else %}pip{% endif %} | `pip` | v21.1.2 | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
|
||||
pipenv | `pip` | <= 2021-05-29 | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
|
||||
{% ifversion dependabot-PEP621-support %}[pip-compile](#pip-and-pip-compile){% else %}pip-compile{% endif %} | `pip` | 6.1.0 | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
|
||||
poetry | `pip` | v1 | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |{% ifversion fpt or ghec or ghes > 3.4 %}
|
||||
{% ifversion dependabot-updates-pnpm-support %}[pnpm](#pnpm) | `npm` | v7, v8 | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
|
||||
{% endif %}poetry | `pip` | v1 | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |{% ifversion fpt or ghec or ghes > 3.4 %}
|
||||
[pub](#pub) | `pub` | v2 | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} |{% endif %}
|
||||
Terraform | `terraform` | >= 0.13, <= 1.3.x | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | Not applicable |
|
||||
{% ifversion dependabot-yarn-v3-update %}[yarn](#yarn) | `npm` | v1, v2, v3 | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}|{% else %}yarn | `npm` | v1 | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | |
|
||||
@@ -71,6 +72,11 @@ In order for {% data variables.product.prodname_dependabot %} to fetch Docker me
|
||||
In addition to supporting updates to `requirements.txt` files, {% data variables.product.prodname_dependabot %} supports updates to `pyproject.toml` files if they follow the PEP 621 standard.
|
||||
{% endif %}
|
||||
|
||||
{% ifversion dependabot-updates-pnpm-support %}
|
||||
#### pnpm
|
||||
pnpm is supported for {% data variables.product.prodname_dependabot_version_updates %} only. {% data variables.product.prodname_dependabot_security_updates %} are not currently supported.
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec or ghes > 3.4 %}
|
||||
#### pub
|
||||
{% ifversion ghes = 3.5 %}`pub` support is currently in beta. Any known limitations are subject to change. Note that {% data variables.product.prodname_dependabot %}:
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import { addError, forEachInlineChild } from 'markdownlint-rule-helpers'
|
||||
|
||||
export const imageAltTextEndPunctuation = {
|
||||
names: ['MD112', 'image-alt-text-end-punctuation'],
|
||||
description: 'Images alternate text should end with a punctuation.',
|
||||
severity: 'error',
|
||||
tags: ['accessibility', 'images'],
|
||||
function: function MD112(params, onError) {
|
||||
forEachInlineChild(params, 'image', function forToken(token) {
|
||||
const quoteRegex = /[.?!]['"]$/
|
||||
const endRegex = /[.?!]$/
|
||||
const imageAltText = token.content.trim()
|
||||
if (
|
||||
(!imageAltText.endsWith('"') && !imageAltText.slice(-1).match(endRegex)) ||
|
||||
(imageAltText.endsWith('"') && !imageAltText.slice(-2).match(quoteRegex))
|
||||
) {
|
||||
addError(
|
||||
onError,
|
||||
token.lineNumber,
|
||||
`On line ${token.lineNumber}, the image alt text '${imageAltText}' must have punctuation at the end of the sentence.`,
|
||||
undefined,
|
||||
undefined,
|
||||
{
|
||||
lineNumber: token.lineNumber,
|
||||
editColumn: token.line.indexOf(']') + 1,
|
||||
deleteCount: 0,
|
||||
insertText: '.',
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
import { addError, forEachInlineChild } from 'markdownlint-rule-helpers'
|
||||
|
||||
export const imageAltTextPeriod = {
|
||||
names: ['MD112', 'image-alt-text-period'],
|
||||
description: 'Images alternate text should have a period',
|
||||
tags: ['accessibility', 'images'],
|
||||
function: function MD112(params, onError) {
|
||||
forEachInlineChild(params, 'image', function forToken(token) {
|
||||
const imageAltText = token.content.trim()
|
||||
if (!imageAltText.endsWith('.') && !imageAltText.endsWith('."')) {
|
||||
const period = imageAltText.endsWith('"') ? '."' : '.'
|
||||
addError(
|
||||
onError,
|
||||
token.lineNumber,
|
||||
`On line ${token.lineNumber}, the image alt text: "${imageAltText}" must have a period at the end of it.`,
|
||||
undefined,
|
||||
undefined,
|
||||
{
|
||||
lineNumber: token.lineNumber,
|
||||
editColumn: token.line.indexOf(']') + 1,
|
||||
deleteCount: 0,
|
||||
insertText: period,
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import { readFile, writeFile } from 'fs/promises'
|
||||
import walkFiles from '../../../script/helpers/walk-files.js'
|
||||
|
||||
import { incorrectAltTextLength } from '../lib/linting-rules/image-alt-text-length.js'
|
||||
import { imageAltTextPeriod } from '../lib/linting-rules/image-alt-text-period.js'
|
||||
import { imageAltTextEndPunctuation } from '../lib/linting-rules/image-alt-text-end-punctuation.js'
|
||||
import { imageFileKebab } from '../lib/linting-rules/image-file-kebab.js'
|
||||
|
||||
program
|
||||
@@ -35,7 +35,7 @@ async function main() {
|
||||
const files = walkFiles(path, ['.md'], { includeBasePath: true })
|
||||
const options = {
|
||||
files,
|
||||
customRules: [incorrectAltTextLength, imageAltTextPeriod, imageFileKebab],
|
||||
customRules: [incorrectAltTextLength, imageAltTextEndPunctuation, imageFileKebab],
|
||||
config,
|
||||
}
|
||||
|
||||
|
||||
15
src/content-linter/tests/fixtures/image-alt-text-end-punctuation.md
vendored
Normal file
15
src/content-linter/tests/fixtures/image-alt-text-end-punctuation.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# hi
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
GitHub Documentation's logo looks like this:  over here.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
@@ -0,0 +1,20 @@
|
||||
import { jest } from '@jest/globals'
|
||||
import markdownlint from 'markdownlint'
|
||||
|
||||
import { imageAltTextEndPunctuation } from '../../lib/linting-rules/image-alt-text-end-punctuation.js'
|
||||
import { testOptions } from '../../lib/default-markdownlint-options.js'
|
||||
|
||||
const fixtureFile = 'src/content-linter/tests/fixtures/image-alt-text-end-punctuation.md'
|
||||
|
||||
describe('image alt text length rule', () => {
|
||||
jest.setTimeout(60 * 1000)
|
||||
const options = testOptions('MD112', imageAltTextEndPunctuation, fixtureFile)
|
||||
|
||||
const result = markdownlint.sync(options)
|
||||
test('image alt text must have an end punctuation', () => {
|
||||
const errors = result[fixtureFile]
|
||||
expect(Object.keys(result).length).toBe(1)
|
||||
expect(errors.length).toBe(2)
|
||||
expect(errors.map((error) => error.lineNumber)).toEqual([3, 15])
|
||||
})
|
||||
})
|
||||
@@ -3,7 +3,8 @@ import markdownlint from 'markdownlint'
|
||||
|
||||
import { incorrectAltTextLength } from '../../lib/linting-rules/image-alt-text-length.js'
|
||||
import { testOptions } from '../../lib/default-markdownlint-options.js'
|
||||
const fixtureFile = 'src/content-linter/tests/unit/image-alt-text-length.md'
|
||||
|
||||
const fixtureFile = 'src/content-linter/tests/fixtures/image-alt-text-length.md'
|
||||
|
||||
describe('image alt text length rule', () => {
|
||||
jest.setTimeout(60 * 1000)
|
||||
|
||||
Reference in New Issue
Block a user