cspell-config-lib
Advanced tools
Comparing version
@@ -41,3 +41,3 @@ import { parse, stringify } from 'comment-json'; | ||
try { | ||
const cspell = parse(file.content); | ||
const cspell = parseJson(file.content); | ||
if (!isCSpellSettings(cspell)) { | ||
@@ -59,2 +59,10 @@ throw new ParseError(file.url); | ||
} | ||
function parseJson(content) { | ||
try { | ||
return JSON.parse(content); | ||
} | ||
catch { | ||
return parse(content); | ||
} | ||
} | ||
export function parseCSpellConfigFileJson(file) { | ||
@@ -61,0 +69,0 @@ return CSpellConfigFileJson.parse(file); |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "9.1.0", | ||
"version": "9.1.1", | ||
"description": "CSpell Config library", | ||
@@ -55,7 +55,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@cspell/cspell-types": "9.1.0", | ||
"@cspell/cspell-types": "9.1.1", | ||
"comment-json": "^4.2.5", | ||
"yaml": "^2.8.0" | ||
}, | ||
"gitHead": "a7ed42a31debbc86faa4a4ac2c686bdffe5b26b6" | ||
"gitHead": "40c6e1a331f38a0c008aacf2cb527270752c35ad" | ||
} |
75886
0.18%1902
0.42%1
Infinity%+ Added
- Removed
Updated