-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: provide plugin config type definitions (#383)
- Loading branch information
1 parent
5b70335
commit b07b7cf
Showing
4 changed files
with
51 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Config } from 'prettier'; | ||
|
||
export interface PluginConfig { | ||
svelteSortOrder?: SortOrder; | ||
svelteStrictMode?: boolean; | ||
svelteBracketNewLine?: boolean; | ||
svelteAllowShorthand?: boolean; | ||
svelteIndentScriptAndStyle?: boolean; | ||
} | ||
|
||
export type PrettierConfig = PluginConfig & Config; | ||
|
||
type SortOrder = | ||
| 'options-scripts-markup-styles' | ||
| 'options-scripts-styles-markup' | ||
| 'options-markup-styles-scripts' | ||
| 'options-markup-scripts-styles' | ||
| 'options-styles-markup-scripts' | ||
| 'options-styles-scripts-markup' | ||
| 'scripts-options-markup-styles' | ||
| 'scripts-options-styles-markup' | ||
| 'markup-options-styles-scripts' | ||
| 'markup-options-scripts-styles' | ||
| 'styles-options-markup-scripts' | ||
| 'styles-options-scripts-markup' | ||
| 'scripts-markup-options-styles' | ||
| 'scripts-styles-options-markup' | ||
| 'markup-styles-options-scripts' | ||
| 'markup-scripts-options-styles' | ||
| 'styles-markup-options-scripts' | ||
| 'styles-scripts-options-markup' | ||
| 'scripts-markup-styles-options' | ||
| 'scripts-styles-markup-options' | ||
| 'markup-styles-scripts-options' | ||
| 'markup-scripts-styles-options' | ||
| 'styles-markup-scripts-options' | ||
| 'styles-scripts-markup-options' | ||
| 'none'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
"strict": true, | ||
"esModuleInterop": true | ||
}, | ||
"include": ["src/**/*"] | ||
"include": ["src/**/*", "index.d.ts"] | ||
} |