plugins/languages/lint: allow irregular linters

setting `linters.markdownlint-cli.cmd` would genenrate

before:
`linters.markdownlint-cli.cmd` resulting in an error.

after:
`linters["markdownlint-cli"]["cmd"]`
This commit is contained in:
svl 2024-06-12 09:45:10 +02:00
parent 34d75943ed
commit cc9023fb1d

View file

@ -247,7 +247,7 @@ in
propName: propValue:
optionalString (
propValue != null
) "__lint.linters.${linter}.${propName} = ${helpers.toLuaObject propValue}"
) ''__lint.linters["${linter}"]["${propName}"] = ${helpers.toLuaObject propValue}''
) linterConfig
) cfg.linters
)
@ -260,7 +260,7 @@ in
let
linterConfig' = if isString linterConfig then helpers.mkRaw linterConfig else linterConfig;
in
"__lint.linters.${customLinter} = ${helpers.toLuaObject linterConfig'}"
''__lint.linters["${customLinter}"] = ${helpers.toLuaObject linterConfig'}''
) cfg.customLinters
)
));