1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Import statements: #src/ → @/ and remove file extensions (#56560)

This commit is contained in:
Kevin Heis
2025-07-09 13:50:50 -07:00
committed by GitHub
parent e8cc2f7a2f
commit fb6844eef0
364 changed files with 891 additions and 920 deletions

View File

@@ -2,7 +2,8 @@ import fs from 'fs'
import path from 'path' import path from 'path'
import frontmatter from 'gray-matter' import frontmatter from 'gray-matter'
import { ROOT } from '#src/frame/lib/constants.js' // Replace imports with hardcoded values
const ROOT = process.env.ROOT || '.'
// Hard-coded language keys to avoid TypeScript import in config file // Hard-coded language keys to avoid TypeScript import in config file
const languageKeys = ['en', 'es', 'ja', 'pt', 'zh', 'ru', 'fr', 'ko', 'de'] const languageKeys = ['en', 'es', 'ja', 'pt', 'zh', 'ru', 'fr', 'ko', 'de']

View File

@@ -1,5 +1,5 @@
import patterns from '@/frame/lib/patterns.js' import patterns from '@/frame/lib/patterns'
import { deprecated } from '@/versions/lib/enterprise-server-releases.js' import { deprecated } from '@/versions/lib/enterprise-server-releases'
import type { ExtendedRequest } from '@/types' import type { ExtendedRequest } from '@/types'
type IsArchivedInfo = { type IsArchivedInfo = {

View File

@@ -1,7 +1,7 @@
import path from 'path' import path from 'path'
import { supported, latest } from '@/versions/lib/enterprise-server-releases.js' import { supported, latest } from '@/versions/lib/enterprise-server-releases'
import patterns from '@/frame/lib/patterns.js' import patterns from '@/frame/lib/patterns'
import nonEnterpriseDefaultVersion from '@/versions/lib/non-enterprise-default-version.js' import nonEnterpriseDefaultVersion from '@/versions/lib/non-enterprise-default-version'
import { allVersions } from '@/versions/lib/all-versions' import { allVersions } from '@/versions/lib/all-versions'
const latestNewVersion = `enterprise-server@${latest}` const latestNewVersion = `enterprise-server@${latest}`
const oldVersions = ['dotcom'].concat(supported) const oldVersions = ['dotcom'].concat(supported)

View File

@@ -1,13 +1,10 @@
import got from 'got' import got from 'got'
import type { Response, NextFunction } from 'express' import type { Response, NextFunction } from 'express'
import patterns from '@/frame/lib/patterns.js' import patterns from '@/frame/lib/patterns'
import { isArchivedVersion } from '@/archives/lib/is-archived-version' import { isArchivedVersion } from '@/archives/lib/is-archived-version'
import { import { setFastlySurrogateKey, SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
setFastlySurrogateKey, import { archivedCacheControl, defaultCacheControl } from '@/frame/middleware/cache-control'
SURROGATE_ENUMS,
} from '@/frame/middleware/set-fastly-surrogate-key.js'
import { archivedCacheControl, defaultCacheControl } from '@/frame/middleware/cache-control.js'
import type { ExtendedRequest } from '@/types' import type { ExtendedRequest } from '@/types'
// This module handles requests for the CSS and JS assets for // This module handles requests for the CSS and JS assets for

View File

@@ -1,25 +1,22 @@
import type { Response, NextFunction } from 'express' import type { Response, NextFunction } from 'express'
import got from 'got' import got from 'got'
import statsd from '@/observability/lib/statsd.js' import statsd from '@/observability/lib/statsd'
import { import {
firstVersionDeprecatedOnNewSite, firstVersionDeprecatedOnNewSite,
lastVersionWithoutArchivedRedirectsFile, lastVersionWithoutArchivedRedirectsFile,
deprecatedWithFunctionalRedirects, deprecatedWithFunctionalRedirects,
firstReleaseStoredInBlobStorage, firstReleaseStoredInBlobStorage,
} from '@/versions/lib/enterprise-server-releases.js' } from '@/versions/lib/enterprise-server-releases'
import patterns from '@/frame/lib/patterns.js' import patterns from '@/frame/lib/patterns'
import versionSatisfiesRange from '@/versions/lib/version-satisfies-range.js' import versionSatisfiesRange from '@/versions/lib/version-satisfies-range'
import { isArchivedVersion } from '@/archives/lib/is-archived-version' import { isArchivedVersion } from '@/archives/lib/is-archived-version'
import { import { setFastlySurrogateKey, SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
setFastlySurrogateKey, import { readCompressedJsonFileFallbackLazily } from '@/frame/lib/read-json-file'
SURROGATE_ENUMS, import { archivedCacheControl, languageCacheControl } from '@/frame/middleware/cache-control'
} from '@/frame/middleware/set-fastly-surrogate-key.js'
import { readCompressedJsonFileFallbackLazily } from '@/frame/lib/read-json-file.js'
import { archivedCacheControl, languageCacheControl } from '@/frame/middleware/cache-control.js'
import { pathLanguagePrefixed, languagePrefixPathRegex } from '@/languages/lib/languages' import { pathLanguagePrefixed, languagePrefixPathRegex } from '@/languages/lib/languages'
import getRedirect, { splitPathByLanguage } from '@/redirects/lib/get-redirect.js' import getRedirect, { splitPathByLanguage } from '@/redirects/lib/get-redirect'
import getRemoteJSON from '@/frame/lib/get-remote-json.js' import getRemoteJSON from '@/frame/lib/get-remote-json'
import { ExtendedRequest } from '@/types' import { ExtendedRequest } from '@/types'
const OLD_PUBLIC_AZURE_BLOB_URL = 'https://githubdocs.azureedge.net' const OLD_PUBLIC_AZURE_BLOB_URL = 'https://githubdocs.azureedge.net'
@@ -75,7 +72,7 @@ const cacheAggressively = (res: Response) => {
// 3. ~4000ms // 3. ~4000ms
// //
// ...if the limit we set is 3. // ...if the limit we set is 3.
// Our own timeout, in #src/frame/middleware/timeout.js defaults to 10 seconds. // Our own timeout, in @/frame/middleware/timeout.js defaults to 10 seconds.
// So there's no point in trying more attempts than 3 because it would // So there's no point in trying more attempts than 3 because it would
// just timeout on the 10s. (i.e. 1000 + 2000 + 4000 + 8000 > 10,000) // just timeout on the 10s. (i.e. 1000 + 2000 + 4000 + 8000 > 10,000)
const retryConfiguration = { limit: 3 } const retryConfiguration = { limit: 3 }

View File

@@ -19,11 +19,11 @@
import { program } from 'commander' import { program } from 'commander'
import semver, { SemVer } from 'semver' import semver, { SemVer } from 'semver'
import getRemoteJSON from '@/frame/lib/get-remote-json.js' import getRemoteJSON from '@/frame/lib/get-remote-json'
import { import {
deprecated, deprecated,
lastVersionWithoutArchivedRedirectsFile, lastVersionWithoutArchivedRedirectsFile,
} from '@/versions/lib/enterprise-server-releases.js' } from '@/versions/lib/enterprise-server-releases'
program program
.description( .description(

View File

@@ -1,8 +1,8 @@
import { describe, expect, test, vi } from 'vitest' import { describe, expect, test, vi } from 'vitest'
import enterpriseServerReleases from '@/versions/lib/enterprise-server-releases.js' import enterpriseServerReleases from '@/versions/lib/enterprise-server-releases'
import { get, getDOM } from '@/tests/helpers/e2etest-ts' import { get, getDOM } from '@/tests/helpers/e2etest-ts'
import { SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key.js' import { SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
describe('enterprise deprecation', () => { describe('enterprise deprecation', () => {
vi.setConfig({ testTimeout: 60 * 1000 }) vi.setConfig({ testTimeout: 60 * 1000 })

View File

@@ -1,8 +1,8 @@
import type { Response } from 'express' import type { Response } from 'express'
import { Context } from '@/types.js' import { Context } from '@/types'
import { ExtendedRequestWithPageInfo } from '../types' import { ExtendedRequestWithPageInfo } from '../types'
import contextualize from '@/frame/middleware/context/context.js' import contextualize from '@/frame/middleware/context/context'
export async function getArticleBody(req: ExtendedRequestWithPageInfo) { export async function getArticleBody(req: ExtendedRequestWithPageInfo) {
// req.pageinfo is set from pageValidationMiddleware and pathValidationMiddleware // req.pageinfo is set from pageValidationMiddleware and pathValidationMiddleware

View File

@@ -2,12 +2,12 @@ import type { Response } from 'express'
import type { ExtendedRequestWithPageInfo } from '../types' import type { ExtendedRequestWithPageInfo } from '../types'
import type { ExtendedRequest, Page, Context, Permalink } from '@/types' import type { ExtendedRequest, Page, Context, Permalink } from '@/types'
import shortVersions from '@/versions/middleware/short-versions.js' import shortVersions from '@/versions/middleware/short-versions'
import contextualize from '@/frame/middleware/context/context' import contextualize from '@/frame/middleware/context/context'
import features from '@/versions/middleware/features.js' import features from '@/versions/middleware/features'
import breadcrumbs from '@/frame/middleware/context/breadcrumbs.js' import breadcrumbs from '@/frame/middleware/context/breadcrumbs'
import currentProductTree from '@/frame/middleware/context/current-product-tree.js' import currentProductTree from '@/frame/middleware/context/current-product-tree'
import { readCompressedJsonFile } from '@/frame/lib/read-json-file.js' import { readCompressedJsonFile } from '@/frame/lib/read-json-file'
// If you have pre-computed page info into a JSON file on disk, this is // If you have pre-computed page info into a JSON file on disk, this is
// where it would be expected to be found. // where it would be expected to be found.

View File

@@ -1,8 +1,8 @@
import type { RequestHandler, Response } from 'express' import type { RequestHandler, Response } from 'express'
import express from 'express' import express from 'express'
import { defaultCacheControl } from '@/frame/middleware/cache-control.js' import { defaultCacheControl } from '@/frame/middleware/cache-control'
import catchMiddlewareError from '@/observability/middleware/catch-middleware-error.js' import catchMiddlewareError from '@/observability/middleware/catch-middleware-error'
import { ExtendedRequestWithPageInfo } from '../types' import { ExtendedRequestWithPageInfo } from '../types'
import { pageValidationMiddleware, pathValidationMiddleware } from './validation' import { pageValidationMiddleware, pathValidationMiddleware } from './validation'
import { getArticleBody } from './article-body' import { getArticleBody } from './article-body'
@@ -11,8 +11,8 @@ import {
makeLanguageSurrogateKey, makeLanguageSurrogateKey,
setFastlySurrogateKey, setFastlySurrogateKey,
SURROGATE_ENUMS, SURROGATE_ENUMS,
} from '@/frame/middleware/set-fastly-surrogate-key.js' } from '@/frame/middleware/set-fastly-surrogate-key'
import statsd from '@/observability/lib/statsd.js' import statsd from '@/observability/lib/statsd'
const router = express.Router() const router = express.Router()

View File

@@ -2,12 +2,12 @@ import express from 'express'
import type { Response, RequestHandler } from 'express' import type { Response, RequestHandler } from 'express'
import type { ExtendedRequest } from '@/types' import type { ExtendedRequest } from '@/types'
import { defaultCacheControl } from '@/frame/middleware/cache-control.js' import { defaultCacheControl } from '@/frame/middleware/cache-control'
import { getProductStringFromPath, getVersionStringFromPath } from '@/frame/lib/path-utils.js' import { getProductStringFromPath, getVersionStringFromPath } from '@/frame/lib/path-utils'
import { getLanguageCodeFromPath } from '@/languages/middleware/detect-language.js' import { getLanguageCodeFromPath } from '@/languages/middleware/detect-language'
import { pagelistValidationMiddleware } from './validation' import { pagelistValidationMiddleware } from './validation'
import catchMiddlewareError from '@/observability/middleware/catch-middleware-error.js' import catchMiddlewareError from '@/observability/middleware/catch-middleware-error'
import statsd from '@/observability/lib/statsd.js' import statsd from '@/observability/lib/statsd'
const router = express.Router() const router = express.Router()

View File

@@ -1,11 +1,11 @@
import { ExtendedRequestWithPageInfo } from '../types' import { ExtendedRequestWithPageInfo } from '../types'
import type { NextFunction, Response } from 'express' import type { NextFunction, Response } from 'express'
import { ExtendedRequest, Page } from '@/types.js' import { ExtendedRequest, Page } from '@/types'
import { isArchivedVersionByPath } from '@/archives/lib/is-archived-version' import { isArchivedVersionByPath } from '@/archives/lib/is-archived-version'
import getRedirect from '@/redirects/lib/get-redirect.js' import getRedirect from '@/redirects/lib/get-redirect'
import { getVersionStringFromPath, getLangFromPath } from '@/frame/lib/path-utils.js' import { getVersionStringFromPath, getLangFromPath } from '@/frame/lib/path-utils'
import nonEnterpriseDefaultVersion from '@/versions/lib/non-enterprise-default-version.js' import nonEnterpriseDefaultVersion from '@/versions/lib/non-enterprise-default-version'
// validates the path for pagelist endpoint // validates the path for pagelist endpoint
// specifically, defaults to `/en/free-pro-team@latest` when those values are missing // specifically, defaults to `/en/free-pro-team@latest` when those values are missing

View File

@@ -31,7 +31,7 @@ import chalk from 'chalk'
import { program, Option } from 'commander' import { program, Option } from 'commander'
import { languageKeys } from '@/languages/lib/languages' import { languageKeys } from '@/languages/lib/languages'
import { loadPages, loadUnversionedTree } from '@/frame/lib/page-data.js' import { loadPages, loadUnversionedTree } from '@/frame/lib/page-data'
import { CACHE_FILE_PATH, getPageInfo } from '../middleware/article-pageinfo' import { CACHE_FILE_PATH, getPageInfo } from '../middleware/article-pageinfo'
program program

View File

@@ -1,8 +1,8 @@
import { beforeAll, describe, expect, test } from 'vitest' import { beforeAll, describe, expect, test } from 'vitest'
import { get } from '@/tests/helpers/e2etest.js' import { get } from '@/tests/helpers/e2etest'
import { SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key.js' import { SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
import { latest } from '@/versions/lib/enterprise-server-releases.js' import { latest } from '@/versions/lib/enterprise-server-releases'
const makeURL = (pathname: string): string => const makeURL = (pathname: string): string =>
`/api/article/meta?${new URLSearchParams({ pathname })}` `/api/article/meta?${new URLSearchParams({ pathname })}`

View File

@@ -1,9 +1,9 @@
import { beforeAll, describe, expect, test } from 'vitest' import { beforeAll, describe, expect, test } from 'vitest'
import { get } from '@/tests/helpers/e2etest.js' import { get } from '@/tests/helpers/e2etest'
import { allVersionKeys } from '@/versions/lib/all-versions' import { allVersionKeys } from '@/versions/lib/all-versions'
import nonEnterpriseDefaultVersion from '@/versions/lib/non-enterprise-default-version.js' import nonEnterpriseDefaultVersion from '@/versions/lib/non-enterprise-default-version'
describe.each(allVersionKeys)('pagelist api for %s', async (versionKey) => { describe.each(allVersionKeys)('pagelist api for %s', async (versionKey) => {
beforeAll(() => { beforeAll(() => {

View File

@@ -4,11 +4,8 @@ import type { Response, NextFunction } from 'express'
import sharp from 'sharp' import sharp from 'sharp'
import type { ExtendedRequest } from '@/types' import type { ExtendedRequest } from '@/types'
import { assetCacheControl, defaultCacheControl } from '@/frame/middleware/cache-control.js' import { assetCacheControl, defaultCacheControl } from '@/frame/middleware/cache-control'
import { import { setFastlySurrogateKey, SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
setFastlySurrogateKey,
SURROGATE_ENUMS,
} from '@/frame/middleware/set-fastly-surrogate-key.js'
/** /**
* This is the indicator that is a virtual part of the URL. * This is the indicator that is a virtual part of the URL.

View File

@@ -1,10 +1,7 @@
import type { Response, NextFunction } from 'express' import type { Response, NextFunction } from 'express'
import type { ExtendedRequest } from '@/types' import type { ExtendedRequest } from '@/types'
import { import { setFastlySurrogateKey, SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
setFastlySurrogateKey,
SURROGATE_ENUMS,
} from '@/frame/middleware/set-fastly-surrogate-key.js'
export default function setStaticAssetCaching( export default function setStaticAssetCaching(
req: ExtendedRequest, req: ExtendedRequest,

View File

@@ -3,8 +3,8 @@ import { describe, expect, test, vi } from 'vitest'
import sharp from 'sharp' import sharp from 'sharp'
import { fileTypeFromBuffer } from 'file-type' import { fileTypeFromBuffer } from 'file-type'
import { SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key.js' import { SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
import { get, head } from '@/tests/helpers/e2etest.js' import { get, head } from '@/tests/helpers/e2etest'
describe('dynamic assets', () => { describe('dynamic assets', () => {
vi.setConfig({ testTimeout: 3 * 60 * 1000 }) vi.setConfig({ testTimeout: 3 * 60 * 1000 })

View File

@@ -4,10 +4,10 @@ import path from 'path'
import { afterAll, beforeAll, describe, expect, test, vi } from 'vitest' import { afterAll, beforeAll, describe, expect, test, vi } from 'vitest'
import nock from 'nock' import nock from 'nock'
import { get } from '@/tests/helpers/e2etest.js' import { get } from '@/tests/helpers/e2etest'
import { checkCachingHeaders } from '@/tests/helpers/caching-headers.js' import { checkCachingHeaders } from '@/tests/helpers/caching-headers'
import { setDefaultFastlySurrogateKey } from '@/frame/middleware/set-fastly-surrogate-key.js' import { setDefaultFastlySurrogateKey } from '@/frame/middleware/set-fastly-surrogate-key'
import archivedEnterpriseVersionsAssets from '@/archives/middleware/archived-enterprise-versions-assets.js' import archivedEnterpriseVersionsAssets from '@/archives/middleware/archived-enterprise-versions-assets'
function getNextStaticAsset(directory: string) { function getNextStaticAsset(directory: string) {
const root = path.join('.next', 'static', directory) const root = path.join('.next', 'static', directory)

View File

@@ -1,6 +1,6 @@
import path from 'path' import path from 'path'
import { readCompressedJsonFileFallback } from '@/frame/lib/read-json-file.js' import { readCompressedJsonFileFallback } from '@/frame/lib/read-json-file'
import { getOpenApiVersion } from '@/versions/lib/all-versions' import { getOpenApiVersion } from '@/versions/lib/all-versions'
import type { import type {
AuditLogEventT, AuditLogEventT,

View File

@@ -12,13 +12,9 @@ import { readFile, writeFile } from 'fs/promises'
import { mkdirp } from 'mkdirp' import { mkdirp } from 'mkdirp'
import path from 'path' import path from 'path'
import { filterByAllowlistValues, filterAndUpdateGhesDataByAllowlistValues } from '../lib/index.js' import { filterByAllowlistValues, filterAndUpdateGhesDataByAllowlistValues } from '../lib/index'
import { getContents, getCommitSha } from '@/workflows/git-utils.js' import { getContents, getCommitSha } from '@/workflows/git-utils'
import { import { latest, latestStable, releaseCandidate } from '@/versions/lib/enterprise-server-releases'
latest,
latestStable,
releaseCandidate,
} from '@/versions/lib/enterprise-server-releases.js'
import type { AuditLogEventT, VersionedAuditLogData } from '../types' import type { AuditLogEventT, VersionedAuditLogData } from '../types'
if (!process.env.GITHUB_TOKEN) { if (!process.env.GITHUB_TOKEN) {

View File

@@ -1,6 +1,6 @@
import { describe, expect, test, vi } from 'vitest' import { describe, expect, test, vi } from 'vitest'
import { getDOM } from '@/tests/helpers/e2etest.js' import { getDOM } from '@/tests/helpers/e2etest'
import { allVersions } from '@/versions/lib/all-versions' import { allVersions } from '@/versions/lib/all-versions'
import { getCategorizedAuditLogEvents } from '../lib' import { getCategorizedAuditLogEvents } from '../lib'

View File

@@ -8,7 +8,7 @@ import { mkdirp } from 'mkdirp'
import { difference, isEqual } from 'lodash-es' import { difference, isEqual } from 'lodash-es'
import { allVersions } from '@/versions/lib/all-versions' import { allVersions } from '@/versions/lib/all-versions'
import getApplicableVersions from '@/versions/lib/get-applicable-versions.js' import getApplicableVersions from '@/versions/lib/get-applicable-versions'
import type { MarkdownFrontmatter } from '@/types' import type { MarkdownFrontmatter } from '@/types'
// Type definitions - extending existing type to add missing fields and make most fields optional // Type definitions - extending existing type to add missing fields and make most fields optional

View File

@@ -1,8 +1,8 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { supported } from '@/versions/lib/enterprise-server-releases.js' import { supported } from '@/versions/lib/enterprise-server-releases'
import { allVersionKeys, allVersions } from '@/versions/lib/all-versions' import { allVersionKeys, allVersions } from '@/versions/lib/all-versions'
import { convertVersionsToFrontmatter } from '../lib/update-markdown.js' import { convertVersionsToFrontmatter } from '../lib/update-markdown'
describe('frontmatter versions are generated correctly from automated data', () => { describe('frontmatter versions are generated correctly from automated data', () => {
test('non-continuous enterprise server versions', async () => { test('non-continuous enterprise server versions', async () => {

View File

@@ -3,8 +3,8 @@ import { readFileSync } from 'fs'
import cheerio from 'cheerio' import cheerio from 'cheerio'
import { describe, expect, test, vi } from 'vitest' import { describe, expect, test, vi } from 'vitest'
import { loadPages } from '@/frame/lib/page-data.js' import { loadPages } from '@/frame/lib/page-data'
import { get } from '@/tests/helpers/e2etest.js' import { get } from '@/tests/helpers/e2etest'
// Type definitions for page objects // Type definitions for page objects
type Page = { type Page = {

View File

@@ -6,9 +6,9 @@ import path from 'path'
import { afterAll, beforeAll, describe, expect, test } from 'vitest' import { afterAll, beforeAll, describe, expect, test } from 'vitest'
import { mkdirp } from 'mkdirp' import { mkdirp } from 'mkdirp'
import matter from 'gray-matter' import matter from 'gray-matter'
import type { FrontmatterVersions } from '@/types.js' import type { FrontmatterVersions } from '@/types'
import { updateContentDirectory } from '../lib/update-markdown.js' import { updateContentDirectory } from '../lib/update-markdown'
// Type definitions // Type definitions
type ContentItem = { type ContentItem = {

View File

@@ -53,7 +53,7 @@ import chalk from 'chalk'
import { program } from 'commander' import { program } from 'commander'
// We don't want to introduce a global dependency on @github/cocofix, so we install it by hand // We don't want to introduce a global dependency on @github/cocofix, so we install it by hand
// as described above and suppress the import warning. // as described above and suppress the import warning.
import { getSupportedQueries } from '@github/cocofix/dist/querySuites.js' /* eslint-disable-line import/no-extraneous-dependencies, import/no-unresolved */ import { getSupportedQueries } from '@github/cocofix/dist/querySuites' /* eslint-disable-line import/no-extraneous-dependencies, import/no-unresolved */
import type { Language } from 'codeql-ts' import type { Language } from 'codeql-ts'
program program

View File

@@ -7,8 +7,8 @@ import { visitParents } from 'unist-util-visit-parents'
import { visit, SKIP } from 'unist-util-visit' import { visit, SKIP } from 'unist-util-visit'
import { remove } from 'unist-util-remove' import { remove } from 'unist-util-remove'
import { languageKeys } from '#src/languages/lib/languages.ts' import { languageKeys } from '@/languages/lib/languages'
import { MARKDOWN_OPTIONS } from '../../content-linter/lib/helpers/unified-formatter-options.js' import { MARKDOWN_OPTIONS } from '../../content-linter/lib/helpers/unified-formatter-options'
const { targetDirectory, removeKeywords } = JSON.parse( 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'),

View File

@@ -7,8 +7,8 @@ import path from 'path'
import matter from 'gray-matter' import matter from 'gray-matter'
import { rimraf } from 'rimraf' import { rimraf } from 'rimraf'
import { updateContentDirectory } from '../../automated-pipelines/lib/update-markdown.js' import { updateContentDirectory } from '../../automated-pipelines/lib/update-markdown'
import { convertContentToDocs } from './convert-markdown-for-docs.js' import { convertContentToDocs } from './convert-markdown-for-docs'
const { targetDirectory, sourceDirectory, frontmatterDefaults, markdownPrefix } = JSON.parse( 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'),

View File

@@ -1,8 +1,8 @@
import yaml from 'js-yaml' import yaml from 'js-yaml'
import fs from 'fs/promises' import fs from 'fs/promises'
import dataSchemas from '#src/data-directory/lib/data-schemas/index.ts' import dataSchemas from '@/data-directory/lib/data-schemas/index'
import ajv from '#src/tests/lib/validate-json-schema.ts' import ajv from '@/tests/lib/validate-json-schema'
// AJV already has a built-in way to extract out properties // AJV already has a built-in way to extract out properties
// with a specific keyword using a custom validator function. // with a specific keyword using a custom validator function.

View File

@@ -1,7 +1,7 @@
// get-rules.d.ts // get-rules.d.ts
// This is a declaration file for get-rules.js // This is a declaration file for get-rules.js
import type { Rule, RuleConfig } from '../../types.ts' import type { Rule, RuleConfig } from '../../types'
export const customRules: Rule[] export const customRules: Rule[]
export const allRules: Rule[] export const allRules: Rule[]

View File

@@ -1,7 +1,7 @@
import rules from '../../../../node_modules/markdownlint/lib/rules.js' import rules from '../../../../node_modules/markdownlint/lib/rules'
import { gitHubDocsMarkdownlint } from '../linting-rules/index.js' import { gitHubDocsMarkdownlint } from '../linting-rules/index'
import { baseConfig } from '../../style/base.js' import { baseConfig } from '../../style/base'
import { customConfig } from '../../style/github-docs.js' import { customConfig } from '../../style/github-docs'
export const customRules = gitHubDocsMarkdownlint.rules export const customRules = gitHubDocsMarkdownlint.rules
export const allRules = [...rules, ...gitHubDocsMarkdownlint.rules] export const allRules = [...rules, ...gitHubDocsMarkdownlint.rules]

View File

@@ -1,6 +1,6 @@
import { Tokenizer, TokenKind } from 'liquidjs' import { Tokenizer, TokenKind } from 'liquidjs'
import { deprecated } from '#src/versions/lib/enterprise-server-releases.js' import { deprecated } from '@/versions/lib/enterprise-server-releases'
const liquidTokenCache = new Map() const liquidTokenCache = new Map()

View File

@@ -1,6 +1,6 @@
import markdownlint from 'markdownlint' import markdownlint from 'markdownlint'
import { defaultConfig } from './default-markdownlint-options.js' import { defaultConfig } from './default-markdownlint-options'
export async function runRule(module, { strings, files, ruleConfig, markdownlintOptions = {} }) { export async function runRule(module, { strings, files, ruleConfig, markdownlintOptions = {} }) {
if ((!strings && !files) || (strings && files)) if ((!strings && !files) || (strings && files))

View File

@@ -1,6 +1,6 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getRange } from '../helpers/utils.js' import { getRange } from '../helpers/utils'
import frontmatter from '#src/frame/lib/read-frontmatter.js' import frontmatter from '@/frame/lib/read-frontmatter'
export const britishEnglishQuotes = { export const britishEnglishQuotes = {
names: ['GHD048', 'british-english-quotes'], names: ['GHD048', 'british-english-quotes'],

View File

@@ -1,6 +1,6 @@
import { addError, filterTokens } from 'markdownlint-rule-helpers' import { addError, filterTokens } from 'markdownlint-rule-helpers'
import { getFrontmatter } from '../helpers/utils.js' import { getFrontmatter } from '../helpers/utils'
export const codeAnnotations = { export const codeAnnotations = {
names: ['GHD007', 'code-annotations'], names: ['GHD007', 'code-annotations'],

View File

@@ -1,7 +1,7 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import yaml from 'js-yaml' import yaml from 'js-yaml'
import { getRange, getFrontmatter } from '../helpers/utils.js' import { getRange, getFrontmatter } from '../helpers/utils'
const ERROR_MESSAGE = const ERROR_MESSAGE =
'An early access reference appears to be used in a non-early access doc. Remove early access references or disable this rule.' 'An early access reference appears to be used in a non-early access doc. Remove early access references or disable this rule.'

View File

@@ -1,6 +1,6 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getFrontmatter } from '../helpers/utils.js' import { getFrontmatter } from '../helpers/utils'
export const frontmatterHiddenDocs = { export const frontmatterHiddenDocs = {
names: ['GHD010', 'frontmatter-hidden-docs'], names: ['GHD010', 'frontmatter-hidden-docs'],

View File

@@ -1,10 +1,10 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { intersection } from 'lodash-es' import { intersection } from 'lodash-es'
import { getFrontmatter } from '../helpers/utils.js' import { getFrontmatter } from '../helpers/utils'
import { formatAjvErrors } from '../helpers/schema-utils.js' import { formatAjvErrors } from '../helpers/schema-utils'
import { frontmatter, deprecatedProperties } from '#src/frame/lib/frontmatter.js' import { frontmatter, deprecatedProperties } from '@/frame/lib/frontmatter'
import readFrontmatter from '#src/frame/lib/read-frontmatter.js' import readFrontmatter from '@/frame/lib/read-frontmatter'
export const frontmatterSchema = { export const frontmatterSchema = {
names: ['GHD012', 'frontmatter-schema'], names: ['GHD012', 'frontmatter-schema'],

View File

@@ -1,7 +1,7 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import path from 'path' import path from 'path'
import { getFrontmatter } from '../helpers/utils.js' import { getFrontmatter } from '../helpers/utils'
export const frontmatterVideoTranscripts = { export const frontmatterVideoTranscripts = {
names: ['GHD011', 'frontmatter-video-transcripts'], names: ['GHD011', 'frontmatter-video-transcripts'],

View File

@@ -1,6 +1,6 @@
import { addError, ellipsify } from 'markdownlint-rule-helpers' import { addError, ellipsify } from 'markdownlint-rule-helpers'
import { getRange } from '../helpers/utils.js' import { getRange } from '../helpers/utils'
/* /*
This rule currently only checks for one hardcoded string but This rule currently only checks for one hardcoded string but
can be generalized in the future to check for strings that can be generalized in the future to check for strings that

View File

@@ -1,7 +1,7 @@
import { addError, ellipsify } from 'markdownlint-rule-helpers' import { addError, ellipsify } from 'markdownlint-rule-helpers'
import { getRange } from '../helpers/utils.js' import { getRange } from '../helpers/utils'
import frontmatter from '#src/frame/lib/read-frontmatter.js' import frontmatter from '@/frame/lib/read-frontmatter'
/* /*
This rule currently only checks for one hardcoded string but This rule currently only checks for one hardcoded string but

View File

@@ -4,7 +4,7 @@ import {
getRange, getRange,
isStringQuoted, isStringQuoted,
isStringPunctuated, isStringPunctuated,
} from '../helpers/utils.js' } from '../helpers/utils'
export const imageAltTextEndPunctuation = { export const imageAltTextEndPunctuation = {
names: ['GHD032', 'image-alt-text-end-punctuation'], names: ['GHD032', 'image-alt-text-end-punctuation'],

View File

@@ -1,6 +1,6 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { forEachInlineChild, getRange } from '../helpers/utils.js' import { forEachInlineChild, getRange } from '../helpers/utils'
const excludeStartWords = ['image', 'graphic'] const excludeStartWords = ['image', 'graphic']

View File

@@ -1,8 +1,8 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { liquid } from '#src/content-render/index.js' import { liquid } from '@/content-render/index'
import { allVersions } from '#src/versions/lib/all-versions.ts' import { allVersions } from '@/versions/lib/all-versions'
import { forEachInlineChild, getRange } from '../helpers/utils.js' import { forEachInlineChild, getRange } from '../helpers/utils'
export const incorrectAltTextLength = { export const incorrectAltTextLength = {
names: ['GHD033', 'incorrect-alt-text-length'], names: ['GHD033', 'incorrect-alt-text-length'],

View File

@@ -1,4 +1,4 @@
import { addFixErrorDetail, forEachInlineChild } from '../helpers/utils.js' import { addFixErrorDetail, forEachInlineChild } from '../helpers/utils'
export const imageFileKebabCase = { export const imageFileKebabCase = {
names: ['GHD004', 'image-file-kebab-case'], names: ['GHD004', 'image-file-kebab-case'],

View File

@@ -1,6 +1,6 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { forEachInlineChild } from '../helpers/utils.js' import { forEachInlineChild } from '../helpers/utils'
export const imageNoGif = { export const imageNoGif = {
names: ['GHD036', 'image-no-gif'], names: ['GHD036', 'image-no-gif'],

View File

@@ -1,45 +1,42 @@
import searchReplace from 'markdownlint-rule-search-replace' import searchReplace from 'markdownlint-rule-search-replace'
import markdownlintGitHub from '@github/markdownlint-github' import markdownlintGitHub from '@github/markdownlint-github'
import { codeFenceLineLength } from './code-fence-line-length.js' import { codeFenceLineLength } from './code-fence-line-length'
import { imageAltTextEndPunctuation } from './image-alt-text-end-punctuation.js' import { imageAltTextEndPunctuation } from './image-alt-text-end-punctuation'
import { imageFileKebabCase } from './image-file-kebab-case.js' import { imageFileKebabCase } from './image-file-kebab-case'
import { incorrectAltTextLength } from './image-alt-text-length.js' import { incorrectAltTextLength } from './image-alt-text-length'
import { internalLinksNoLang } from './internal-links-no-lang.js' import { internalLinksNoLang } from './internal-links-no-lang'
import { internalLinksSlash } from './internal-links-slash.js' import { internalLinksSlash } from './internal-links-slash'
import { imageAltTextExcludeStartWords } from './image-alt-text-exclude-start-words.js' import { imageAltTextExcludeStartWords } from './image-alt-text-exclude-start-words'
import { listFirstWordCapitalization } from './list-first-word-capitalization.js' import { listFirstWordCapitalization } from './list-first-word-capitalization'
import { linkPunctuation } from './link-punctuation.js' import { linkPunctuation } from './link-punctuation'
import { import { earlyAccessReferences, frontmatterEarlyAccessReferences } from './early-access-references'
earlyAccessReferences, import { frontmatterHiddenDocs } from './frontmatter-hidden-docs'
frontmatterEarlyAccessReferences, import { frontmatterVideoTranscripts } from './frontmatter-video-transcripts'
} from './early-access-references.js' import { yamlScheduledJobs } from './yaml-scheduled-jobs'
import { frontmatterHiddenDocs } from './frontmatter-hidden-docs.js' import { internalLinksOldVersion } from './internal-links-old-version'
import { frontmatterVideoTranscripts } from './frontmatter-video-transcripts.js' import { hardcodedDataVariable } from './hardcoded-data-variable'
import { yamlScheduledJobs } from './yaml-scheduled-jobs.js' import { githubOwnedActionReferences } from './github-owned-action-references'
import { internalLinksOldVersion } from './internal-links-old-version.js' import { liquidQuotedConditionalArg } from './liquid-quoted-conditional-arg'
import { hardcodedDataVariable } from './hardcoded-data-variable.js' import { liquidDataReferencesDefined, liquidDataTagFormat } from './liquid-data-tags'
import { githubOwnedActionReferences } from './github-owned-action-references.js' import { frontmatterSchema } from './frontmatter-schema'
import { liquidQuotedConditionalArg } from './liquid-quoted-conditional-arg.js' import { codeAnnotations } from './code-annotations'
import { liquidDataReferencesDefined, liquidDataTagFormat } from './liquid-data-tags.js' import { codeAnnotationCommentSpacing } from './code-annotation-comment-spacing'
import { frontmatterSchema } from './frontmatter-schema.js' import { frontmatterLiquidSyntax, liquidSyntax } from './liquid-syntax'
import { codeAnnotations } from './code-annotations.js' import { liquidIfTags, liquidIfVersionTags } from './liquid-versioning'
import { codeAnnotationCommentSpacing } from './code-annotation-comment-spacing.js' import { raiReusableUsage } from './rai-reusable-usage'
import { frontmatterLiquidSyntax, liquidSyntax } from './liquid-syntax.js' import { imageNoGif } from './image-no-gif'
import { liquidIfTags, liquidIfVersionTags } from './liquid-versioning.js' import { expiredContent, expiringSoon } from './expired-content'
import { raiReusableUsage } from './rai-reusable-usage.js' import { tableLiquidVersioning } from './table-liquid-versioning'
import { imageNoGif } from './image-no-gif.js' import { tableColumnIntegrity } from './table-column-integrity'
import { expiredContent, expiringSoon } from './expired-content.js' import { thirdPartyActionPinning } from './third-party-action-pinning'
import { tableLiquidVersioning } from './table-liquid-versioning.js' import { liquidTagWhitespace } from './liquid-tag-whitespace'
import { tableColumnIntegrity } from './table-column-integrity.js' import { linkQuotation } from './link-quotation'
import { thirdPartyActionPinning } from './third-party-action-pinning.js' import { octiconAriaLabels } from './octicon-aria-labels'
import { liquidTagWhitespace } from './liquid-tag-whitespace.js' import { liquidIfversionVersions } from './liquid-ifversion-versions'
import { linkQuotation } from './link-quotation.js' import { britishEnglishQuotes } from './british-english-quotes'
import { octiconAriaLabels } from './octicon-aria-labels.js' import { multipleEmphasisPatterns } from './multiple-emphasis-patterns'
import { liquidIfversionVersions } from './liquid-ifversion-versions.js' import { noteWarningFormatting } from './note-warning-formatting'
import { britishEnglishQuotes } from './british-english-quotes.js'
import { multipleEmphasisPatterns } from './multiple-emphasis-patterns.js'
import { noteWarningFormatting } from './note-warning-formatting.js'
const noDefaultAltText = markdownlintGitHub.find((elem) => const noDefaultAltText = markdownlintGitHub.find((elem) =>
elem.names.includes('no-default-alt-text'), elem.names.includes('no-default-alt-text'),

View File

@@ -1,7 +1,7 @@
import { filterTokens } from 'markdownlint-rule-helpers' import { filterTokens } from 'markdownlint-rule-helpers'
import { addFixErrorDetail, getRange } from '../helpers/utils.js' import { addFixErrorDetail, getRange } from '../helpers/utils'
import { allLanguageKeys } from '#src/languages/lib/languages.ts' import { allLanguageKeys } from '@/languages/lib/languages'
export const internalLinksNoLang = { export const internalLinksNoLang = {
names: ['GHD002', 'internal-links-no-lang'], names: ['GHD002', 'internal-links-no-lang'],

View File

@@ -1,6 +1,6 @@
import { addError, filterTokens } from 'markdownlint-rule-helpers' import { addError, filterTokens } from 'markdownlint-rule-helpers'
import { getRange } from '../helpers/utils.js' import { getRange } from '../helpers/utils'
export const internalLinksOldVersion = { export const internalLinksOldVersion = {
names: ['GHD006', 'internal-links-old-version'], names: ['GHD006', 'internal-links-old-version'],

View File

@@ -1,6 +1,6 @@
import { filterTokens } from 'markdownlint-rule-helpers' import { filterTokens } from 'markdownlint-rule-helpers'
import { addFixErrorDetail, getRange } from '../helpers/utils.js' import { addFixErrorDetail, getRange } from '../helpers/utils'
export const internalLinksSlash = { export const internalLinksSlash = {
names: ['GHD003', 'internal-links-slash'], names: ['GHD003', 'internal-links-slash'],

View File

@@ -1,6 +1,6 @@
import { addError, filterTokens } from 'markdownlint-rule-helpers' import { addError, filterTokens } from 'markdownlint-rule-helpers'
import { doesStringEndWithPeriod, getRange, isStringQuoted } from '../helpers/utils.js' import { doesStringEndWithPeriod, getRange, isStringQuoted } from '../helpers/utils'
export const linkPunctuation = { export const linkPunctuation = {
names: ['GHD001', 'link-punctuation'], names: ['GHD001', 'link-punctuation'],

View File

@@ -1,5 +1,5 @@
import { addError, filterTokens } from 'markdownlint-rule-helpers' import { addError, filterTokens } from 'markdownlint-rule-helpers'
import { getRange, quotePrecedesLinkOpen } from '../helpers/utils.js' import { getRange, quotePrecedesLinkOpen } from '../helpers/utils'
import { escapeRegExp } from 'lodash-es' import { escapeRegExp } from 'lodash-es'
export const linkQuotation = { export const linkQuotation = {

View File

@@ -1,13 +1,13 @@
import { TokenKind } from 'liquidjs' import { TokenKind } from 'liquidjs'
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getDataByLanguage } from '#src/data-directory/lib/get-data.js' import { getDataByLanguage } from '@/data-directory/lib/get-data'
import { import {
getLiquidTokens, getLiquidTokens,
getPositionData, getPositionData,
OUTPUT_OPEN, OUTPUT_OPEN,
OUTPUT_CLOSE, OUTPUT_CLOSE,
} from '../helpers/liquid-utils.js' } from '../helpers/liquid-utils'
/* /*
Checks for instances where a Liquid data or indented_data_reference Checks for instances where a Liquid data or indented_data_reference

View File

@@ -5,18 +5,18 @@ import {
getPositionData, getPositionData,
getContentDeleteData, getContentDeleteData,
getSimplifiedSemverRange, getSimplifiedSemverRange,
} from '../helpers/liquid-utils.js' } from '../helpers/liquid-utils'
import { getFrontmatter, getFrontmatterLines } from '../helpers/utils.js' import { getFrontmatter, getFrontmatterLines } from '../helpers/utils'
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js' import getApplicableVersions from '@/versions/lib/get-applicable-versions'
import { allVersions } from '#src/versions/lib/all-versions.ts' import { allVersions } from '@/versions/lib/all-versions'
import { difference } from 'lodash-es' import { difference } from 'lodash-es'
import { convertVersionsToFrontmatter } from '#src/automated-pipelines/lib/update-markdown.js' import { convertVersionsToFrontmatter } from '@/automated-pipelines/lib/update-markdown'
import { import {
isAllVersions, isAllVersions,
getFeatureVersionsObject, getFeatureVersionsObject,
isInAllGhes, isInAllGhes,
} from '#src/ghes-releases/scripts/version-utils.js' } from '@/ghes-releases/scripts/version-utils'
import { deprecated, oldestSupported } from '#src/versions/lib/enterprise-server-releases.js' import { deprecated, oldestSupported } from '@/versions/lib/enterprise-server-releases'
export const liquidIfversionVersions = { export const liquidIfversionVersions = {
names: ['GHD022', 'liquid-ifversion-versions'], names: ['GHD022', 'liquid-ifversion-versions'],

View File

@@ -1,8 +1,8 @@
import { TokenKind } from 'liquidjs' import { TokenKind } from 'liquidjs'
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getLiquidTokens, conditionalTags, getPositionData } from '../helpers/liquid-utils.js' import { getLiquidTokens, conditionalTags, getPositionData } from '../helpers/liquid-utils'
import { isStringQuoted } from '../helpers/utils.js' import { isStringQuoted } from '../helpers/utils'
/* /*
Checks for instances where a Liquid conditional tag's argument is Checks for instances where a Liquid conditional tag's argument is

View File

@@ -1,8 +1,8 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getFrontmatter } from '../helpers/utils.js' import { getFrontmatter } from '../helpers/utils'
import { liquid } from '#src/content-render/index.js' import { liquid } from '@/content-render/index'
import { isLiquidError } from '#src/languages/lib/render-with-fallback.js' import { isLiquidError } from '@/languages/lib/render-with-fallback'
/* /*
Attempts to parse all liquid in the frontmatter of a file Attempts to parse all liquid in the frontmatter of a file

View File

@@ -1,7 +1,7 @@
import { TokenKind } from 'liquidjs' import { TokenKind } from 'liquidjs'
import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils.js' import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils'
import { addFixErrorDetail } from '../helpers/utils.js' import { addFixErrorDetail } from '../helpers/utils'
/* /*
Liquid tags should start and end with one whitespace. For example: Liquid tags should start and end with one whitespace. For example:

View File

@@ -2,18 +2,13 @@ import semver from 'semver'
import { TokenKind } from 'liquidjs' import { TokenKind } from 'liquidjs'
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getRange, addFixErrorDetail } from '../helpers/utils.js' import { getRange, addFixErrorDetail } from '../helpers/utils'
import { allVersions, allVersionShortnames } from '#src/versions/lib/all-versions.ts' import { allVersions, allVersionShortnames } from '@/versions/lib/all-versions'
import { import { supported, next, nextNext, deprecated } from '@/versions/lib/enterprise-server-releases'
supported, import allowedVersionOperators from '@/content-render/liquid/ifversion-supported-operators'
next, import { getDeepDataByLanguage } from '@/data-directory/lib/get-data'
nextNext, import getApplicableVersions from '@/versions/lib/get-applicable-versions'
deprecated, import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils'
} from '#src/versions/lib/enterprise-server-releases.js'
import allowedVersionOperators from '#src/content-render/liquid/ifversion-supported-operators.js'
import { getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js'
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils.js'
const allShortnames = Object.keys(allVersionShortnames) const allShortnames = Object.keys(allVersionShortnames)
const getAllPossibleVersionNames = memoize(() => { const getAllPossibleVersionNames = memoize(() => {

View File

@@ -1,4 +1,4 @@
import { addFixErrorDetail, getRange, filterTokensByOrder } from '../helpers/utils.js' import { addFixErrorDetail, getRange, filterTokensByOrder } from '../helpers/utils'
export const listFirstWordCapitalization = { export const listFirstWordCapitalization = {
names: ['GHD034', 'list-first-word-capitalization'], names: ['GHD034', 'list-first-word-capitalization'],

View File

@@ -1,6 +1,6 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getRange } from '../helpers/utils.js' import { getRange } from '../helpers/utils'
import frontmatter from '#src/frame/lib/read-frontmatter.js' import frontmatter from '@/frame/lib/read-frontmatter'
export const multipleEmphasisPatterns = { export const multipleEmphasisPatterns = {
names: ['GHD050', 'multiple-emphasis-patterns'], names: ['GHD050', 'multiple-emphasis-patterns'],

View File

@@ -1,6 +1,6 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getRange } from '../helpers/utils.js' import { getRange } from '../helpers/utils'
import frontmatter from '#src/frame/lib/read-frontmatter.js' import frontmatter from '@/frame/lib/read-frontmatter'
export const noteWarningFormatting = { export const noteWarningFormatting = {
names: ['GHD049', 'note-warning-formatting'], names: ['GHD049', 'note-warning-formatting'],

View File

@@ -1,6 +1,6 @@
import { TokenKind } from 'liquidjs' import { TokenKind } from 'liquidjs'
import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils.js' import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils'
import { addFixErrorDetail } from '../helpers/utils.js' import { addFixErrorDetail } from '../helpers/utils'
/* /*
Octicons should always have an aria-label attribute even if aria hidden. For example: Octicons should always have an aria-label attribute even if aria hidden. For example:

View File

@@ -2,8 +2,8 @@ import { addError } from 'markdownlint-rule-helpers'
import { TokenKind } from 'liquidjs' import { TokenKind } from 'liquidjs'
import path from 'path' import path from 'path'
import { getFrontmatter } from '../helpers/utils.js' import { getFrontmatter } from '../helpers/utils'
import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils.js' import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils'
export const raiReusableUsage = { export const raiReusableUsage = {
names: ['GHD035', 'rai-reusable-usage'], names: ['GHD035', 'rai-reusable-usage'],

View File

@@ -1,6 +1,6 @@
import { addError } from 'markdownlint-rule-helpers' import { addError } from 'markdownlint-rule-helpers'
import { getRange } from '../helpers/utils.js' import { getRange } from '../helpers/utils'
import frontmatter from '#src/frame/lib/read-frontmatter.js' import frontmatter from '@/frame/lib/read-frontmatter'
// Regex to detect table rows (must start with |, contain at least one more |, and end with optional whitespace) // Regex to detect table rows (must start with |, contain at least one more |, and end with optional whitespace)
const TABLE_ROW_REGEX = /^\s*\|.*\|\s*$/ const TABLE_ROW_REGEX = /^\s*\|.*\|\s*$/

View File

@@ -1,8 +1,8 @@
import yaml from 'js-yaml' import yaml from 'js-yaml'
import { addError, filterTokens } from 'markdownlint-rule-helpers' import { addError, filterTokens } from 'markdownlint-rule-helpers'
import { liquid } from '#src/content-render/index.js' import { liquid } from '@/content-render/index'
import { allVersions } from '#src/versions/lib/all-versions.ts' import { allVersions } from '@/versions/lib/all-versions'
// Detects third-party actions in the format `owner/repo@ref` // Detects third-party actions in the format `owner/repo@ref`
const actionRegex = /[\w-]+\/[\w-]+@[\w-]+/ const actionRegex = /[\w-]+\/[\w-]+@[\w-]+/

View File

@@ -1,8 +1,8 @@
import yaml from 'js-yaml' import yaml from 'js-yaml'
import { addError, filterTokens } from 'markdownlint-rule-helpers' import { addError, filterTokens } from 'markdownlint-rule-helpers'
import { liquid } from '#src/content-render/index.js' import { liquid } from '@/content-render/index'
import { allVersions } from '#src/versions/lib/all-versions.ts' import { allVersions } from '@/versions/lib/all-versions'
const scheduledYamlJobs = [] const scheduledYamlJobs = []

View File

@@ -19,12 +19,12 @@ import yaml from 'js-yaml'
import { program } from 'commander' import { program } from 'commander'
import { loadPages, loadUnversionedTree } from '@/frame/lib/page-data.js' import { loadPages, loadUnversionedTree } from '@/frame/lib/page-data'
import { TokenizationError } from 'liquidjs' import { TokenizationError } from 'liquidjs'
import readFrontmatter from '@/frame/lib/read-frontmatter.js' import readFrontmatter from '@/frame/lib/read-frontmatter'
import { getLiquidTokens } from '@/content-linter/lib/helpers/liquid-utils.js' import { getLiquidTokens } from '@/content-linter/lib/helpers/liquid-utils'
import walkFiles from '@/workflows/walk-files.js' import walkFiles from '@/workflows/walk-files'
program program
.description('Finds unused variables in frontmatter, content, and reusables') .description('Finds unused variables in frontmatter, content, and reusables')

View File

@@ -1,6 +1,6 @@
import { writeFileSync } from 'fs' import { writeFileSync } from 'fs'
import type { Rule, Config } from '../types.ts' import type { Rule, Config } from '../types'
import { allRules, allConfig } from '../lib/helpers/get-rules.js' import { allRules, allConfig } from '../lib/helpers/get-rules'
main() main()

View File

@@ -7,14 +7,14 @@ import { applyFixes } from 'markdownlint-rule-helpers'
import boxen from 'boxen' import boxen from 'boxen'
import ora from 'ora' import ora from 'ora'
import walkFiles from '#src/workflows/walk-files.ts' import walkFiles from '@/workflows/walk-files'
import { allConfig, allRules, customRules } from '../lib/helpers/get-rules.js' import { allConfig, allRules, customRules } from '../lib/helpers/get-rules'
import { customConfig, githubDocsFrontmatterConfig } from '../style/github-docs.js' import { customConfig, githubDocsFrontmatterConfig } from '../style/github-docs'
import { defaultConfig } from '../lib/default-markdownlint-options.js' import { defaultConfig } from '../lib/default-markdownlint-options'
import { prettyPrintResults } from './pretty-print-results.js' import { prettyPrintResults } from './pretty-print-results'
import { getLintableYml } from '#src/content-linter/lib/helpers/get-lintable-yml.js' import { getLintableYml } from '@/content-linter/lib/helpers/get-lintable-yml'
import { printAnnotationResults } from '../lib/helpers/print-annotations.js' import { printAnnotationResults } from '../lib/helpers/print-annotations'
import languages from '#src/languages/lib/languages.ts' import languages from '@/languages/lib/languages'
program program
.description('Run GitHub Docs Markdownlint rules.') .description('Run GitHub Docs Markdownlint rules.')

View File

@@ -2,10 +2,10 @@ import { program } from 'commander'
import fs from 'fs' import fs from 'fs'
import coreLib from '@actions/core' import coreLib from '@actions/core'
import github from '#src/workflows/github.ts' import github from '@/workflows/github'
import { getEnvInputs } from '#src/workflows/get-env-inputs.ts' import { getEnvInputs } from '@/workflows/get-env-inputs'
import { createReportIssue, linkReports } from '#src/workflows/issue-report.js' import { createReportIssue, linkReports } from '@/workflows/issue-report'
import { reportingConfig } from '#src/content-linter/style/github-docs.js' import { reportingConfig } from '@/content-linter/style/github-docs'
// GitHub issue body size limit is ~65k characters, so we'll use 60k as a safe limit // GitHub issue body size limit is ~65k characters, so we'll use 60k as a safe limit
const MAX_ISSUE_BODY_SIZE = 60000 const MAX_ISSUE_BODY_SIZE = 60000

View File

@@ -8,12 +8,12 @@ import GithubSlugger from 'github-slugger'
import { decode } from 'html-entities' import { decode } from 'html-entities'
import { beforeAll, describe, expect, test } from 'vitest' import { beforeAll, describe, expect, test } from 'vitest'
import matter from '@/frame/lib/read-frontmatter.js' import matter from '@/frame/lib/read-frontmatter'
import { renderContent } from '@/content-render/index.js' import { renderContent } from '@/content-render/index'
import getApplicableVersions from '@/versions/lib/get-applicable-versions.js' import getApplicableVersions from '@/versions/lib/get-applicable-versions'
import contextualize from '@/frame/middleware/context/context' import contextualize from '@/frame/middleware/context/context'
import shortVersions from '@/versions/middleware/short-versions.js' import shortVersions from '@/versions/middleware/short-versions'
import { ROOT } from '@/frame/lib/constants.js' import { ROOT } from '@/frame/lib/constants'
import type { Context, ExtendedRequest, MarkdownFrontmatter } from '@/types' import type { Context, ExtendedRequest, MarkdownFrontmatter } from '@/types'
const slugger = new GithubSlugger() const slugger = new GithubSlugger()

View File

@@ -4,7 +4,7 @@ import { readFile } from 'fs/promises'
import walk from 'walk-sync' import walk from 'walk-sync'
import { beforeAll, describe, expect, test } from 'vitest' import { beforeAll, describe, expect, test } from 'vitest'
import { liquid } from '#src/content-render/index.js' import { liquid } from '@/content-render/index'
const learningTrackRootPath = 'data/learning-tracks' const learningTrackRootPath = 'data/learning-tracks'
const yamlWalkOptions = { const yamlWalkOptions = {

View File

@@ -8,8 +8,8 @@ import walk from 'walk-sync'
import { zip } from 'lodash-es' import { zip } from 'lodash-es'
import { beforeAll, describe, expect, test } from 'vitest' import { beforeAll, describe, expect, test } from 'vitest'
import languages from '#src/languages/lib/languages.ts' import languages from '@/languages/lib/languages'
import { getDiffFiles } from '../lib/diff-files.js' import { getDiffFiles } from '../lib/diff-files'
const __dirname = path.dirname(fileURLToPath(import.meta.url)) const __dirname = path.dirname(fileURLToPath(import.meta.url))

View File

@@ -1,8 +1,8 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { loadPages, loadPageMap } from '#src/frame/lib/page-data.js' import { loadPages, loadPageMap } from '@/frame/lib/page-data'
import loadRedirects from '#src/redirects/lib/precompile.js' import loadRedirects from '@/redirects/lib/precompile'
import { checkURL } from '#src/tests/helpers/check-url.js' import { checkURL } from '@/tests/helpers/check-url'
const pageList = await loadPages(undefined, ['en']) const pageList = await loadPages(undefined, ['en'])
const pages = await loadPageMap(pageList) const pages = await loadPageMap(pageList)

View File

@@ -2,8 +2,8 @@ import path from 'path'
import { isEqual, uniqWith } from 'lodash-es' import { isEqual, uniqWith } from 'lodash-es'
import { describe, expect, test, vi } from 'vitest' import { describe, expect, test, vi } from 'vitest'
import patterns from '#src/frame/lib/patterns.js' import patterns from '@/frame/lib/patterns'
import { getDataByLanguage, getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js' import { getDataByLanguage, getDeepDataByLanguage } from '@/data-directory/lib/get-data'
// Given syntax like {% data foo.bar %} or {% indented_data_reference foo.bar spaces=3 %}, // Given syntax like {% data foo.bar %} or {% indented_data_reference foo.bar spaces=3 %},
// the following regex returns just the dotted path: foo.bar // the following regex returns just the dotted path: foo.bar

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { britishEnglishQuotes } from '../../lib/linting-rules/british-english-quotes.js' import { britishEnglishQuotes } from '../../lib/linting-rules/british-english-quotes'
describe(britishEnglishQuotes.names.join(' - '), () => { describe(britishEnglishQuotes.names.join(' - '), () => {
test('Correct American English punctuation passes', async () => { test('Correct American English punctuation passes', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { codeAnnotationCommentSpacing } from '../../lib/linting-rules/code-annotation-comment-spacing.js' import { codeAnnotationCommentSpacing } from '../../lib/linting-rules/code-annotation-comment-spacing'
describe(codeAnnotationCommentSpacing.names.join(' - '), () => { describe(codeAnnotationCommentSpacing.names.join(' - '), () => {
test('correctly formatted comments pass', async () => { test('correctly formatted comments pass', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { codeAnnotations } from '../../lib/linting-rules/code-annotations.js' import { codeAnnotations } from '../../lib/linting-rules/code-annotations'
describe(codeAnnotations.names.join(' - '), () => { describe(codeAnnotations.names.join(' - '), () => {
test('No layout property fails', async () => { test('No layout property fails', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { codeFenceLineLength } from '../../lib/linting-rules/code-fence-line-length.js' import { codeFenceLineLength } from '../../lib/linting-rules/code-fence-line-length'
describe(codeFenceLineLength.names.join(' - '), () => { describe(codeFenceLineLength.names.join(' - '), () => {
test('line length of max + 1 fails', async () => { test('line length of max + 1 fails', async () => {

View File

@@ -1,10 +1,10 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { import {
earlyAccessReferences, earlyAccessReferences,
frontmatterEarlyAccessReferences, frontmatterEarlyAccessReferences,
} from '../../lib/linting-rules/early-access-references.js' } from '../../lib/linting-rules/early-access-references'
const FIXTURE_FILEPATH_NON_EA = 'src/content-linter/tests/fixtures/not-secret.md' const FIXTURE_FILEPATH_NON_EA = 'src/content-linter/tests/fixtures/not-secret.md'
const FIXTURE_FILEPATH_EA = 'src/content-linter/tests/fixtures/early-access/secret.md' const FIXTURE_FILEPATH_EA = 'src/content-linter/tests/fixtures/early-access/secret.md'

View File

@@ -1,11 +1,11 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { import {
expiredContent, expiredContent,
expiringSoon, expiringSoon,
DAYS_TO_WARN_BEFORE_EXPIRED, DAYS_TO_WARN_BEFORE_EXPIRED,
} from '../../lib/linting-rules/expired-content.js' } from '../../lib/linting-rules/expired-content'
describe(expiredContent.names.join(' - '), () => { describe(expiredContent.names.join(' - '), () => {
test('Date in the past triggers error', async () => { test('Date in the past triggers error', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { frontmatterHiddenDocs } from '../../lib/linting-rules/frontmatter-hidden-docs.js' import { frontmatterHiddenDocs } from '../../lib/linting-rules/frontmatter-hidden-docs'
const ACTIONS_FIXTURE = 'src/content-linter/tests/fixtures/actions/hidden.md' const ACTIONS_FIXTURE = 'src/content-linter/tests/fixtures/actions/hidden.md'
const EARLY_ACCESS_FIXTURE = 'src/fixtures/fixtures/content/early-access/secrets/early-days.md' const EARLY_ACCESS_FIXTURE = 'src/fixtures/fixtures/content/early-access/secrets/early-days.md'

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { frontmatterSchema } from '../../lib/linting-rules/frontmatter-schema.js' import { frontmatterSchema } from '../../lib/linting-rules/frontmatter-schema'
// Configure the test figure to not split frontmatter and content // Configure the test figure to not split frontmatter and content
const fmOptions = { markdownlintOptions: { frontMatter: null } } const fmOptions = { markdownlintOptions: { frontMatter: null } }

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { frontmatterVideoTranscripts } from '../../lib/linting-rules/frontmatter-video-transcripts.js' import { frontmatterVideoTranscripts } from '../../lib/linting-rules/frontmatter-video-transcripts'
const GOOD_FIXTURE_LANDING = 'src/content-linter/tests/fixtures/actions/index.md' const GOOD_FIXTURE_LANDING = 'src/content-linter/tests/fixtures/actions/index.md'
const BAD_FIXTURE_LANDING = 'src/content-linter/tests/fixtures/early-access/index.md' const BAD_FIXTURE_LANDING = 'src/content-linter/tests/fixtures/early-access/index.md'

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { githubOwnedActionReferences } from '../../lib/linting-rules/github-owned-action-references.js' import { githubOwnedActionReferences } from '../../lib/linting-rules/github-owned-action-references'
describe(githubOwnedActionReferences.names.join(' - '), () => { describe(githubOwnedActionReferences.names.join(' - '), () => {
test('Using hardcoded GitHub-owned actions causes error', async () => { test('Using hardcoded GitHub-owned actions causes error', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { hardcodedDataVariable } from '../../lib/linting-rules/hardcoded-data-variable.js' import { hardcodedDataVariable } from '../../lib/linting-rules/hardcoded-data-variable'
describe(hardcodedDataVariable.names.join(' - '), () => { describe(hardcodedDataVariable.names.join(' - '), () => {
test('Using hardcoded personal access token string causes error', async () => { test('Using hardcoded personal access token string causes error', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { imageAltTextEndPunctuation } from '../../lib/linting-rules/image-alt-text-end-punctuation.js' import { imageAltTextEndPunctuation } from '../../lib/linting-rules/image-alt-text-end-punctuation'
describe(imageAltTextEndPunctuation.names.join(' - '), () => { describe(imageAltTextEndPunctuation.names.join(' - '), () => {
test('image alt text without end punctuation errors', async () => { test('image alt text without end punctuation errors', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { imageAltTextExcludeStartWords } from '../../lib/linting-rules/image-alt-text-exclude-start-words.js' import { imageAltTextExcludeStartWords } from '../../lib/linting-rules/image-alt-text-exclude-start-words'
describe(imageAltTextExcludeStartWords.names.join(' - '), () => { describe(imageAltTextExcludeStartWords.names.join(' - '), () => {
test('image alt text that starts with exclude words fails', async () => { test('image alt text that starts with exclude words fails', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { incorrectAltTextLength } from '../../lib/linting-rules/image-alt-text-length.js' import { incorrectAltTextLength } from '../../lib/linting-rules/image-alt-text-length'
describe(incorrectAltTextLength.names.join(' - '), () => { describe(incorrectAltTextLength.names.join(' - '), () => {
test('image with incorrect alt text length fails', async () => { test('image with incorrect alt text length fails', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { imageFileKebabCase } from '../../lib/linting-rules/image-file-kebab-case.js' import { imageFileKebabCase } from '../../lib/linting-rules/image-file-kebab-case'
describe(imageFileKebabCase.names.join(' - '), () => { describe(imageFileKebabCase.names.join(' - '), () => {
test('image file not using lowercase kebab case fails', async () => { test('image file not using lowercase kebab case fails', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { imageNoGif } from '../../lib/linting-rules/image-no-gif.js' import { imageNoGif } from '../../lib/linting-rules/image-no-gif'
describe(imageNoGif.names.join(' - '), () => { describe(imageNoGif.names.join(' - '), () => {
test('image with gifs', async () => { test('image with gifs', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { internalLinksNoLang } from '../../lib/linting-rules/internal-links-no-lang.js' import { internalLinksNoLang } from '../../lib/linting-rules/internal-links-no-lang'
describe(internalLinksNoLang.names.join(' - '), () => { describe(internalLinksNoLang.names.join(' - '), () => {
test('internal links with hardcoded language codes fail', async () => { test('internal links with hardcoded language codes fail', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { internalLinksOldVersion } from '../../lib/linting-rules/internal-links-old-version.js' import { internalLinksOldVersion } from '../../lib/linting-rules/internal-links-old-version'
describe(internalLinksOldVersion.names.join(' - '), () => { describe(internalLinksOldVersion.names.join(' - '), () => {
test('links with old hardcoded versioning fail', async () => { test('links with old hardcoded versioning fail', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { internalLinksSlash } from '../../lib/linting-rules/internal-links-slash.js' import { internalLinksSlash } from '../../lib/linting-rules/internal-links-slash'
describe(internalLinksSlash.names.join(' - '), () => { describe(internalLinksSlash.names.join(' - '), () => {
test('relative links that do not start with / fail', async () => { test('relative links that do not start with / fail', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { linkPunctuation } from '../../lib/linting-rules/link-punctuation.js' import { linkPunctuation } from '../../lib/linting-rules/link-punctuation'
describe(linkPunctuation.names.join(' - '), () => { describe(linkPunctuation.names.join(' - '), () => {
test('inline links without quotes or a period should not error', async () => { test('inline links without quotes or a period should not error', async () => {

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { linkQuotation } from '../../lib/linting-rules/link-quotation.js' import { linkQuotation } from '../../lib/linting-rules/link-quotation'
describe(linkQuotation.names.join(' - '), () => { describe(linkQuotation.names.join(' - '), () => {
test('links that are formatted correctly should not generate an error', async () => { test('links that are formatted correctly should not generate an error', async () => {

View File

@@ -2,11 +2,11 @@ import path from 'path'
import { afterAll, beforeAll, describe, expect, test } from 'vitest' import { afterAll, beforeAll, describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { import {
liquidDataReferencesDefined, liquidDataReferencesDefined,
liquidDataTagFormat, liquidDataTagFormat,
} from '../../lib/linting-rules/liquid-data-tags.js' } from '../../lib/linting-rules/liquid-data-tags'
describe(liquidDataReferencesDefined.names.join(' - '), () => { describe(liquidDataReferencesDefined.names.join(' - '), () => {
const envVarValueBefore = process.env.ROOT const envVarValueBefore = process.env.ROOT

View File

@@ -1,9 +1,9 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest' import { afterAll, beforeAll, describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { validateIfversionConditionalsVersions } from '../../lib/linting-rules/liquid-versioning.js' import { validateIfversionConditionalsVersions } from '../../lib/linting-rules/liquid-versioning'
import { liquidIfversionVersions } from '../../lib/linting-rules/liquid-ifversion-versions.js' import { liquidIfversionVersions } from '../../lib/linting-rules/liquid-ifversion-versions'
import { supported } from '#src/versions/lib/enterprise-server-releases.js' import { supported } from '@/versions/lib/enterprise-server-releases'
describe(liquidIfversionVersions.names.join(' - '), () => { describe(liquidIfversionVersions.names.join(' - '), () => {
const envVarValueBefore = process.env.ROOT const envVarValueBefore = process.env.ROOT

View File

@@ -1,7 +1,7 @@
import { describe, expect, test } from 'vitest' import { describe, expect, test } from 'vitest'
import { runRule } from '../../lib/init-test.js' import { runRule } from '../../lib/init-test'
import { liquidQuotedConditionalArg } from '../../lib/linting-rules/liquid-quoted-conditional-arg.js' import { liquidQuotedConditionalArg } from '../../lib/linting-rules/liquid-quoted-conditional-arg'
describe(liquidQuotedConditionalArg.names.join(' - '), () => { describe(liquidQuotedConditionalArg.names.join(' - '), () => {
test('if conditional with quote args fails', async () => { test('if conditional with quote args fails', async () => {

Some files were not shown because too many files have changed in this diff Show More