Skip to content

Commit

Permalink
feat: add .editorconfig and .prettierrc.js
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki0410-dev committed May 1, 2024
1 parent 0cb6f84 commit 8072e18
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
max_line_length = 80
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*-lock.json
26 changes: 26 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//@ts-check
/**
* Prettier Configuration
* @type {import('prettier').Config}
*/
const config = {
overrides: [
// Revert JSONC parsing:
// https://github.com/prettier/prettier/issues/15553
{
files: ["**/*.json", "**/*.jsonc"],
options: {
parser: "json",
},
},
{
// Special rules for Markdown files
files: ["*.md"],
options: {
printWidth: Infinity,
},
},
],
};

module.exports = config;

0 comments on commit 8072e18

Please sign in to comment.