Skip to content

Commit 057f7f9

Browse files
committed
feat: update prettier config
1 parent bc16e97 commit 057f7f9

File tree

6 files changed

+932
-895
lines changed

6 files changed

+932
-895
lines changed

.eslintrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// "extends": ["next", "next/core-web-vitals"]
3+
"extends": ["next"],
4+
"rules": {
5+
"react/display-name": "off"
6+
}
7+
}

.eslintrc.js

-3
This file was deleted.

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode"]
3+
}

.vscode/settings.json

+10-23
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
11
{
2-
// Lints with Standard JS
3-
"standard.enable": true,
4-
// Format files with Standard whenever you save the file
5-
"standard.autoFixOnSave": true,
6-
// Files to validate with Standard JS
7-
"standard.validate": [
8-
"javascript",
9-
"javascriptreact",
10-
"typescript",
11-
"typescriptreact"
12-
],
13-
"editor.tabSize": 2,
14-
"typescript.format.insertSpaceBeforeFunctionParenthesis": true,
15-
"typescript.format.placeOpenBraceOnNewLineForControlBlocks": false,
16-
"typescript.format.placeOpenBraceOnNewLineForFunctions": false,
17-
"editor.detectIndentation": false,
18-
"eslint.packageManager": "yarn",
19-
"eslint.codeAction.showDocumentation": {
20-
"enable": true
21-
},
22-
"eslint.format.enable": true,
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
233
"editor.formatOnSave": true,
244
"editor.codeActionsOnSave": {
25-
"source.fixAll": true
5+
"source.fixAll": true,
6+
"source.organizeImports": true
7+
},
8+
"[typescriptreact]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
},
11+
"[typescript]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
2613
}
27-
}
14+
}

package.json

+27-10
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@
88
"build": "yarn link-types && next build",
99
"start": "next start",
1010
"type-check": "tsc",
11+
"prettier": "prettier --write 'src/**/*.{ts,tsx}'",
1112
"test": "jest"
1213
},
14+
"lint-staged": {
15+
"*.{ts,tsx}": [
16+
"prettier --write"
17+
],
18+
"*.{md,css}": "prettier --write"
19+
},
1320
"dependencies": {
1421
"@ant-design/icons": "^4.2.2",
1522
"@apollo/client": "^3.1.2",
@@ -70,20 +77,14 @@
7077
"@types/react": "^16.9.36",
7178
"@types/react-ga": "^2.3.0",
7279
"@types/react-icons": "^3.0.0",
73-
"@typescript-eslint/eslint-plugin": "^4.2.0",
74-
"@typescript-eslint/parser": "^4.2.0",
7580
"babel-jest": "^26.3.0",
7681
"cross-env": "^7.0.2",
77-
"eslint": "^7.10.0",
78-
"eslint-config-standard": "^14.1.1",
79-
"eslint-config-standard-with-typescript": "^19.0.1",
80-
"eslint-plugin-import": "^2.22.0",
81-
"eslint-plugin-promise": "^4.2.1",
82-
"eslint-plugin-standard": "^4.0.1",
82+
"eslint": "^8.20.0",
83+
"eslint-config-next": "^12.2.3",
8384
"express": "^4.17.1",
8485
"http-proxy-middleware": "^1.0.5",
8586
"jest": "^26.4.2",
86-
"standard": "^14.3.4",
87+
"prettier": "^2.7.1",
8788
"typescript": "3.8.3"
8889
},
8990
"graphql": "../backend/generated/schema.graphql",
@@ -92,5 +93,21 @@
9293
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/tests/__mocks__/fileMock.js",
9394
"\\.(css|less)$": "<rootDir>/tests/__mocks__/styleMock.js"
9495
}
95-
}
96+
},
97+
"next-unused": {
98+
"debug": true,
99+
"include": [
100+
"src"
101+
],
102+
"exclude": [],
103+
"entrypoints": [
104+
"src/pages"
105+
]
106+
},
107+
"browserslist": [
108+
">0.3%",
109+
"not ie 11",
110+
"not dead",
111+
"not op_mini all"
112+
]
96113
}

0 commit comments

Comments
 (0)