-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh: Add first version the shared prettier configuration
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- Loading branch information
Showing
4 changed files
with
96 additions
and
12 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,8 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Ferdinand Thiessen <opensource@fthiessen.de> | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
import config from './prettier.config.js' | ||
|
||
export default config |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Ferdinand Thiessen <opensource@fthiessen.de> | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
/** | ||
* @type {import("prettier").Config} | ||
*/ | ||
export default { | ||
// We always use tabs with 4 spaces tab width | ||
useTabs: true, | ||
tabWidth: 4, | ||
// Allow brackets to be on the same line, required for Vue | ||
bracketSameLine: true, | ||
// Never enforce semicolons if not required | ||
semi: false, | ||
// Always use single quote over double quote (' instead of ") | ||
singleQuote: true, | ||
// Enforce parenthesis for arrow functions | ||
arrowParens: 'always', | ||
// Always enfore a trailing comma | ||
trailingComma: 'all', | ||
// This is not a hard limit! We need 90 to keep changes from ESLint migration small | ||
printWidth: 90, | ||
|
||
overrides: [ | ||
// For package.json we need other indention as Node decided to only support spaces, so otherwise it would be reformatted on every npm install | ||
{ | ||
files: ['package.json', 'package-lock.json'], | ||
options: { | ||
tabWidth: 2, | ||
useTabs: false, | ||
}, | ||
}, | ||
], | ||
} |