Skip to content

Commit

Permalink
chore(prettier): add .prettierignore to better exclude files
Browse files Browse the repository at this point in the history
This simplifies the corresponding npm run scripts in package.json.
  • Loading branch information
AlexTMjugador committed Oct 11, 2022
1 parent 7158054 commit a1b58bc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/dist/
*.md
*.yml
10 changes: 9 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid"
"arrowParens": "avoid",
"overrides": [
{
"files": ["*.json", "*.mcmeta"],
"options": {
"tabWidth": 2
}
}
]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"scripts": {
"build": "ncc build src/index.ts -o dist/main -m && ncc build src/cleanup_working_directory.ts -o dist/cleanup_working_directory -m",
"lint": "eslint .",
"format": "prettier --write \"src/**/*.ts\"",
"format-check": "prettier --check \"src/**/*.ts\""
"format": "prettier --write .",
"format-check": "prettier --check ."
},
"repository": {
"type": "git",
Expand Down

0 comments on commit a1b58bc

Please sign in to comment.