Skip to content

Commit 210cfb5

Browse files
committed
Use prettier.config.js
1 parent 8f3d180 commit 210cfb5

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

.prettierrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "data-rentgen",
33
"version": "0.4.5",
44
"private": true,
5-
"type": "module",
65
"description": "Frontend for Data.Rentgen",
76
"license": "Apache-2.0",
87
"dependencies": {
@@ -33,8 +32,8 @@
3332
"lint-check": "eslint src/**/*.tsx src/**/*.ts",
3433
"type-check": "tsc",
3534
"preview": "vite preview",
36-
"prettier-format": "prettier --config .prettierrc 'src/**/*.tsx' 'src/**/*.ts' --write",
37-
"prettier-check": "prettier --config .prettierrc 'src/**/*.tsx' 'src/**/*.ts' --check",
35+
"prettier-format": "prettier 'src/**/*.{ts,tsx,js,json}' --write --list-different",
36+
"prettier-check": "prettier 'src/**/*.{ts,tsx,js,json}' --check --list-different",
3837
"pre-commit-install": "husky"
3938
},
4039
"devDependencies": {

prettier.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = {
2+
useTabs: false,
3+
tabWidth: 4,
4+
singleQuote: false,
5+
trailingComma: 'all',
6+
semi: true,
7+
printWidth: 80,
8+
arrowParens: 'always',
9+
bracketSpacing: true,
10+
endOfLine: 'lf',
11+
overrides: [
12+
{
13+
files: ['*.ts'],
14+
options: {
15+
parser: 'typescript',
16+
},
17+
},
18+
{
19+
files: ['*.tsx'],
20+
options: {
21+
parser: 'typescript',
22+
jsxBracketSameLine: false,
23+
jsxSingleQuote: false,
24+
},
25+
},
26+
{
27+
files: ['*.json'],
28+
options: {
29+
parser: 'json',
30+
},
31+
},
32+
],
33+
};

0 commit comments

Comments
 (0)