-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configs for prettier, adjust eslint rules
For prettier, there are some config changes between v2 and v3. The new default for tailing commas changed causing a lot of breaks. Use the v2 default of "es5" for now. A few eslint rules changed to warnings since there are a lot of them and we don't want to fix those now. Signed-off-by: Scott J Dickerson <[email protected]>
- Loading branch information
Showing
5 changed files
with
41 additions
and
3 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,13 @@ | ||
root=true | ||
|
||
[*] | ||
# standard prettier behaviors | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Configurable prettier behaviors | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 80 |
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,12 @@ | ||
# Library, IDE and build locations | ||
**/node_modules/ | ||
**/coverage/ | ||
**/dist/ | ||
.vscode/ | ||
.idea/ | ||
.eslintcache/ | ||
|
||
# | ||
# NOTE: Could ignore anything that eslint will look at since eslint also applies | ||
# prettier. | ||
# |
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,14 @@ | ||
/** @type {import("prettier").Config} */ | ||
const config = { | ||
trailingComma: "es5", // es5 was the default in prettier v2 | ||
semi: true, | ||
singleQuote: false, | ||
|
||
// Values used from .editorconfig: | ||
// - printWidth == max_line_length | ||
// - tabWidth == indent_size | ||
// - useTabs == indent_style | ||
// - endOfLine == end_of_line | ||
}; | ||
|
||
export default config; |
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