Skip to content

Commit

Permalink
only skip the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kyaruwo committed Jan 16, 2024
1 parent 1eaab0d commit 5d412a1
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const config = workspace.getConfiguration();
/** @type {{ [key: string]: LangConfig | LangConfig[] }} */
const langConfig =
config.get('tailwind-raw-reorder.classRegex') || {};
/** @type {{ string: boolean } | undefined} */
const IgnoreConfigNotFound =
config.get('tailwind-raw-reorder.IgnoreConfigNotFound');

/**
* @param {ExtensionContext} context
Expand All @@ -40,10 +43,12 @@ export function activate(context) {
filepath: editorFilePath
});

if (!tailwindConfig && !config.get('tailwind-raw-reorder.IgnoreConfigNotFound')) {
window.showErrorMessage(
'Tailwind Raw Reorder: Tailwind config not found'
);
if (!tailwindConfig) {
if (!IgnoreConfigNotFound) {
window.showErrorMessage(
'Tailwind Raw Reorder: Tailwind config not found'
);
}
return;
}

Expand Down Expand Up @@ -122,10 +127,12 @@ export function activate(context) {
filepath: editorFilePath
});

if (!tailwindConfig && !config.get('tailwind-raw-reorder.IgnoreConfigNotFound')) {
window.showErrorMessage(
'Tailwind Raw Reorder: Tailwind config not found'
);
if (!tailwindConfig) {
if (!IgnoreConfigNotFound) {
window.showErrorMessage(
'Tailwind Raw Reorder: Tailwind config not found'
);
};
return;
}

Expand Down

0 comments on commit 5d412a1

Please sign in to comment.