Skip to content

Commit

Permalink
feat: 🎸 add option noPhpSyntaxCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
shufo committed Oct 9, 2022
1 parent 264da9e commit bd69b74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@
"default": false,
"markdownDescription": "Collapses multiple blank lines into a single blank line"
},
"bladeFormatter.format.noPhpSyntaxCheck": {
"type": "boolean",
"default": false,
"markdownDescription": "Disable PHP syntax check. Enabling this will prevent syntax error reporting even if you write invalid PHP syntax in the Directive."
},
"bladeFormatter.misc.dontShowNewVersionMessage": {
"type": "boolean",
"default": false,
Expand Down
1 change: 1 addition & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export function activate(context: ExtensionContext) {
sortTailwindcssClasses: extConfig.sortTailwindcssClasses,
sortHtmlAttributes: extConfig.sortHtmlAttributes ?? 'none',
noMultipleEmptyLines: extConfig.noMultipleEmptyLines,
noPhpSyntaxCheck: extConfig.noPhpSyntaxCheck,
...runtimeConfig, // override all settings by runtime config
...tailwindConfig,
};
Expand Down
2 changes: 2 additions & 0 deletions src/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface RuntimeConfig {
sortHtmlAttributes?: string;
tailwindcssConfigPath?: string;
noMultipleEmptyLines?: boolean;
noPhpSyntaxCheck?: boolean;
}

const configFileNames = [".bladeformatterrc.json", ".bladeformatterrc"];
Expand Down Expand Up @@ -58,6 +59,7 @@ export function readRuntimeConfig(filePath: string): RuntimeConfig | undefined {
sortHtmlAttributes: { type: 'string' },
tailwindcssConfigPath: { type: 'string' },
noMultipleEmptyLines: { type: 'boolean' },
noPhpSyntaxCheck: { type: 'boolean' },
},
additionalProperties: true,
};
Expand Down

0 comments on commit bd69b74

Please sign in to comment.