Closed mgzenitech closed 1 month ago
Trying now to add ignore lines :)
Based on info @ https://dotenv-linter.github.io/#/usage/check?id=skip-checks
dotenv-linter has to wrap the line with comments before and after:
# dotenv-linter:off UnorderedKey FOO=BAR # dotenv-linter:on UnorderedKey
Right now I can only disable it for either whole file or any line below this one:
{ "comment": "`# dotenv-linter:off ${$$.ruleId}`", "location": "previousLine", "title": "`Ignore ${$$.ruleId} rule for entire file`", "type": "ignore" }
Maybe we could have something like:
"location": "currentLine", "comment": "`# dotenv-linter:off ${$$.ruleId}\n${currentLine}\n# dotenv-linter:on ${$$.ruleId}`"
? If the currentLine would be exposed as variable we could just prepend and append those lines directly. What do you think?
currentLine
Or even better way would be to have new location: wrapCurrentLine or something similar
wrapCurrentLine
"location": "wrapCurrentLine", "comment": [ "`# dotenv-linter:off ${$$.ruleId}`", "`# dotenv-linter:on ${$$.ruleId}`" ]
I added rewriteLine location and released 0.3.3. Please check documentation.
rewriteLine
0.3.3
Trying now to add ignore lines :)
Based on info @ https://dotenv-linter.github.io/#/usage/check?id=skip-checks
dotenv-linter has to wrap the line with comments before and after:
Right now I can only disable it for either whole file or any line below this one:
Maybe we could have something like:
? If the
currentLine
would be exposed as variable we could just prepend and append those lines directly. What do you think?Or even better way would be to have new location:
wrapCurrentLine
or something similar