Open aparlato opened 1 month ago
We appear to be emitting incorrect warnings for unused variables.
While most are accurate, the script isn't set up to understand an object can be a value so treats everything within it as a nested variable.
For example in:
source: { coolSource: { type: 'vector', tiles: [ 'https://url.mvt', ], maxzoom: 10, }, }
everything under cool-source is in fact the variable, but the script sees the path to source.coolSource.maxzoom as a separate variable as well.
cool-source
source.coolSource.maxzoom
There are additional inaccuracies I have yet to get to the bottom of, so this ticket will require further investigation.
It would be awesome if you fixed this! I'm currently working around it by creating a whole unused stylesheet that contains all the "variables" like this. That suppresses the errors but is rather hacky.
We appear to be emitting incorrect warnings for unused variables.
While most are accurate, the script isn't set up to understand an object can be a value so treats everything within it as a nested variable.
For example in:
everything under
cool-source
is in fact the variable, but the script sees the path tosource.coolSource.maxzoom
as a separate variable as well.There are additional inaccuracies I have yet to get to the bottom of, so this ticket will require further investigation.