Closed Zangetsu101 closed 2 years ago
Hey, thank you for the report! It led me to discover that I recently introduced a bug causing select
and replace
not to work together as expected. Can you try the latest version?
There is also is an issue with your example. You should keep the name tsconfig.json
the same and not change it to .tsconfig.json
in the replace
, otherwise the select
won't find it. This should work:
schemas = require('schemastore').json.schemas {
select = {
'.eslintrc',
'lerna.json',
'package.json',
'prettierrc.json',
'tsconfig.json',
'tslint.json'
},
replace = {
['tsconfig.json'] = {
description = 'Custom JSON schema for typescript configuration files',
fileMatch = {'tsconfig*.json'},
name = 'tsconfig.json',
url = 'https://json.schemastore.org/tsconfig.json'
}
}
}
.tsconfig.json
was my bad. Thanks for pointing that out.
And it is working as expected after updating to the latest version.
Anyway just wondering shouldn't the fileMatch
be tsconfig*.json
out of the box?
The tsconfig.json doesn't seem to match tsconfig.*.json files. I tried adding this:
Any ideas?