rename unknownConfigKey to invalidHelperKey

master
Brad Cornes 2020-06-15 18:53:53 +01:00
parent b052884ad4
commit 60cc17be77
4 changed files with 6 additions and 6 deletions

View File

@ -120,7 +120,7 @@
"markdownDescription": "", "markdownDescription": "",
"scope": "language-overridable" "scope": "language-overridable"
}, },
"tailwindCSS.lint.unknownConfigKey": { "tailwindCSS.lint.invalidHelperKey": {
"type": "string", "type": "string",
"enum": [ "enum": [
"ignore", "ignore",

View File

@ -248,12 +248,12 @@ function getUnknownVariantDiagnostics(
return diagnostics return diagnostics
} }
function getUnknownConfigKeyDiagnostics( function getInvalidHelperKeyDiagnostics(
state: State, state: State,
document: TextDocument, document: TextDocument,
settings: Settings settings: Settings
): Diagnostic[] { ): Diagnostic[] {
let severity = settings.lint.unknownConfigKey let severity = settings.lint.invalidHelperKey
if (severity === 'ignore') return [] if (severity === 'ignore') return []
let diagnostics: Diagnostic[] = [] let diagnostics: Diagnostic[] = []
@ -391,7 +391,7 @@ export async function provideDiagnostics(
...getUnsupportedApplyDiagnostics(state, document, settings), ...getUnsupportedApplyDiagnostics(state, document, settings),
...getUnknownScreenDiagnostics(state, document, settings), ...getUnknownScreenDiagnostics(state, document, settings),
...getUnknownVariantDiagnostics(state, document, settings), ...getUnknownVariantDiagnostics(state, document, settings),
...getUnknownConfigKeyDiagnostics(state, document, settings), ...getInvalidHelperKeyDiagnostics(state, document, settings),
...getUnsupportedTailwindDirectiveDiagnostics( ...getUnsupportedTailwindDirectiveDiagnostics(
state, state,
document, document,

View File

@ -43,7 +43,7 @@ const defaultSettings: Settings = {
unsupportedApply: 'error', unsupportedApply: 'error',
unknownScreen: 'error', unknownScreen: 'error',
unknownVariant: 'error', unknownVariant: 'error',
unknownConfigKey: 'error', invalidHelperKey: 'error',
unsupportedTailwindDirective: 'error', unsupportedTailwindDirective: 'error',
}, },
} }

View File

@ -37,7 +37,7 @@ export type Settings = {
unsupportedApply: DiagnosticSeveritySetting unsupportedApply: DiagnosticSeveritySetting
unknownScreen: DiagnosticSeveritySetting unknownScreen: DiagnosticSeveritySetting
unknownVariant: DiagnosticSeveritySetting unknownVariant: DiagnosticSeveritySetting
unknownConfigKey: DiagnosticSeveritySetting invalidHelperKey: DiagnosticSeveritySetting
unsupportedTailwindDirective: DiagnosticSeveritySetting unsupportedTailwindDirective: DiagnosticSeveritySetting
} }
} }