Skip to content

Commit cd3c75d

Browse files
chore: general dotfiles and deps cleanup
1 parent de39765 commit cd3c75d

File tree

6 files changed

+45
-32
lines changed

6 files changed

+45
-32
lines changed

.gitignore

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
*.log
2-
.DS_Store
3-
node_modules
1+
# Core
42
.cache
53
dist
4+
5+
# Dependencies
6+
node_modules
7+
8+
# Docusaurus
9+
build
10+
.docusaurus
11+
.cache-loader
12+
13+
# Misc
14+
.DS_Store
15+
*.log
16+
17+
# Editors
618
.vscode/settings.json

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.prettierrc.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
printWidth: 80,
3+
semi: true,
4+
singleQuote: true,
5+
trailingComma: 'es5',
6+
importOrder: [
7+
// React
8+
'^react$',
9+
// Other libraries
10+
'<THIRD_PARTY_MODULES>',
11+
// Internals
12+
'components/(.*)$',
13+
'utils/(.*)$',
14+
'_internals/(.*)$',
15+
'^[./]',
16+
// '^[./]',
17+
],
18+
importOrderSeparation: true,
19+
importOrderSortSpecifiers: true,
20+
};

package.json

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,20 @@
1515
"build": "tsdx build",
1616
"test": "tsdx test --passWithNoTests",
1717
"lint": "tsdx lint",
18-
"prepare": "tsdx build",
19-
"size": "size-limit",
20-
"storybook": "start-storybook -p 6006",
21-
"build-storybook": "build-storybook"
18+
"format": "prettier --write src/",
19+
"prepare": "yarn format && yarn build",
20+
"audit:size": "size-limit",
21+
"storybook:start": "start-storybook -p 6006",
22+
"storybook:build": "build-storybook"
2223
},
2324
"peerDependencies": {
2425
"react": ">=16"
2526
},
2627
"husky": {
2728
"hooks": {
28-
"pre-commit": "tsdx lint"
29+
"pre-commit": "yarn format"
2930
}
3031
},
31-
"prettier": {
32-
"printWidth": 80,
33-
"semi": true,
34-
"singleQuote": true,
35-
"trailingComma": "es5"
36-
},
3732
"name": "react-matchez",
3833
"author": "Matheus Albuquerque",
3934
"module": "dist/react-matchez.esm.js",
@@ -55,11 +50,13 @@
5550
"@storybook/addon-links": "^6.4.12",
5651
"@storybook/addons": "^6.4.12",
5752
"@storybook/react": "^6.4.12",
53+
"@trivago/prettier-plugin-sort-imports": "^3.1.1",
5854
"@types/lodash": "^4.14.178",
5955
"@types/react": "^17.0.38",
6056
"@types/react-dom": "^17.0.11",
6157
"babel-loader": "^8.2.3",
6258
"husky": "^7.0.4",
59+
"prettier": "2.5.1",
6360
"react": "^17.0.2",
6461
"react-dom": "^17.0.2",
6562
"react-is": "^17.0.2",
@@ -71,8 +68,6 @@
7168
"dependencies": {
7269
"lodash": "^4.17.21",
7370
"lodash-es": "^4.17.21",
74-
"react-docgen-typescript": "^2.2.2",
75-
"react-docgen-typescript-markdown-render": "^0.2.5",
7671
"ts-pattern": "^3.3.4"
7772
}
7873
}

website/.gitignore

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

website/.prettierrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
importOrder: [
66
// React
77
'^react$',
8+
// Other libraries
89
'<THIRD_PARTY_MODULES>',
910
// Docusaurus
1011
'^@docusaurus/(.*)$',

0 commit comments

Comments
 (0)