trailingCommas:all on prettier (#38888)
This commit is contained in:
@@ -10,7 +10,7 @@ import { remove } from 'unist-util-remove'
|
||||
import { languageKeys } from '../../../lib/languages.js'
|
||||
|
||||
const { targetDirectory, removeKeywords } = JSON.parse(
|
||||
await readFile(path.join('src/codeql-cli/lib/config.json'), 'utf-8')
|
||||
await readFile(path.join('src/codeql-cli/lib/config.json'), 'utf-8'),
|
||||
)
|
||||
const RELATIVE_LINK_PATH = targetDirectory.replace('content', '')
|
||||
const LAST_PRIMARY_HEADING = 'Options'
|
||||
@@ -141,7 +141,7 @@ export async function convertContentToDocs(content, frontmatterDefaults = {}) {
|
||||
if (node.type === 'text' && node.value.includes('{.interpreted-text')) {
|
||||
const paragraph = ancestors[ancestors.length - 1].children
|
||||
const docRoleTagChild = paragraph.findIndex(
|
||||
(child) => child.value && child.value.includes('{.interpreted-text')
|
||||
(child) => child.value && child.value.includes('{.interpreted-text'),
|
||||
)
|
||||
const link = paragraph[docRoleTagChild - 1]
|
||||
// If child node is already a link node, skip it
|
||||
@@ -153,7 +153,7 @@ export async function convertContentToDocs(content, frontmatterDefaults = {}) {
|
||||
// rule, we may need to modify this code to handle it.
|
||||
if (link.type !== 'inlineCode') {
|
||||
throw new Error(
|
||||
'Unexpected node type. The node before a text node with {.interpreted-text role="doc"} should be an inline code or link node.'
|
||||
'Unexpected node type. The node before a text node with {.interpreted-text role="doc"} should be an inline code or link node.',
|
||||
)
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ export async function convertContentToDocs(content, frontmatterDefaults = {}) {
|
||||
// rewrite the aka.ms link
|
||||
node.children[0].value = 'AUTOTITLE'
|
||||
node.url = url
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
// remove the program section from the AST
|
||||
|
||||
@@ -13,7 +13,7 @@ import { updateContentDirectory } from '../../automated-pipelines/lib/update-mar
|
||||
import { convertContentToDocs } from './convert-markdown-for-docs.js'
|
||||
|
||||
const { targetDirectory, sourceDirectory, frontmatterDefaults, markdownPrefix } = JSON.parse(
|
||||
await readFile(path.join('src/codeql-cli/lib/config.json'), 'utf-8')
|
||||
await readFile(path.join('src/codeql-cli/lib/config.json'), 'utf-8'),
|
||||
)
|
||||
const SOURCE_REPO = sourceDirectory.split('/')[0]
|
||||
const TEMP_DIRECTORY = path.join(SOURCE_REPO, 'tempCliDocs')
|
||||
@@ -59,7 +59,7 @@ async function setupEnvironment() {
|
||||
const isPandoc = execSync('pandoc --version', { encoding: 'utf8' })
|
||||
if (!isPandoc.startsWith('pandoc')) {
|
||||
throw new Error(
|
||||
'You must install pandoc to run this script. See https://pandoc.org/installing.html.'
|
||||
'You must install pandoc to run this script. See https://pandoc.org/installing.html.',
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user