File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,14 @@ import type { Options } from '@cspell/eslint-plugin'
22import cspellRecommended from '@cspell/eslint-plugin/recommended'
33import js from '@eslint/js'
44import react from '@eslint-react/eslint-plugin'
5+ import { logger } from '@rspress/shared/logger'
56import { Command } from 'commander'
67import { merge } from 'es-toolkit/compat'
78import { ESLint } from 'eslint'
89import * as mdx from 'eslint-plugin-mdx'
910import tseslint from 'typescript-eslint'
1011
12+ import type { NormalizedTermItem } from '../terms.js'
1113import type { GlobalCliOptions } from '../types.js'
1214
1315import { parseTerms } from './helpers.js'
@@ -23,7 +25,13 @@ export const lintCommand = new Command('lint')
2325
2426 const docsDir = config . root !
2527
26- const parsedTerms = await parseTerms ( )
28+ let parsedTerms : NormalizedTermItem [ ] = [ ]
29+
30+ try {
31+ parsedTerms = await parseTerms ( )
32+ } catch ( err ) {
33+ logger . error ( 'Failed to parse terms.yaml' , err )
34+ }
2735
2836 const eslint = new ESLint ( {
2937 cwd : docsDir ,
You can’t perform that action at this time.
0 commit comments