Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit cff6e62

Browse files
committed
Adicionando as configurações de prettier com eslint
1 parent bb7047b commit cff6e62

File tree

6 files changed

+201
-5
lines changed

6 files changed

+201
-5
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
// extends do eslint para typescript
2828
extends: [
2929
'plugin:@typescript-eslint/recommended',
30-
//'plugin:prettier/recommended',
30+
'plugin:prettier/recommended',
3131
],
3232
// Eslint ignora
3333
ignorePatterns: ['.eslintrc.js'],

.prettierignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# arquivos do eslint
2+
.eslintrc
3+
.eslintrc.json
4+
.eslintrc.js
5+
.eslintrc.cjs
6+
.eslintrc.config.js
7+
.eslintrc.config.cjs
8+
.eslintcache
9+
.eslintignore
10+
11+
# arquivos do prettier
12+
.prettierrc
13+
.prettierrc.json
14+
.prettierrc.js
15+
.prettierrc.cjs
16+
.prettier.config.js
17+
.prettier.config.cjs
18+
.prettierignore
19+
20+
# typescript compilado
21+
dist/
22+
build/
23+
.next/
24+
out/
25+
26+
# dependencias
27+
node_modules/
28+
29+
# jest
30+
jest.config.js
31+
jest.config.ts
32+
.jestrc
33+
jest.config.json
34+
.jestrc.js
35+
.jestrc.ts
36+
37+
# commitlint & commitizen
38+
commitlint.config.js
39+
commitizen.config.js
40+
.commitlintrc
41+
42+
# cache
43+
.cache
44+
.cache/
45+
cache/
46+
.cache-loader
47+
48+
# npm & yarn
49+
package-lock.json
50+
yarn.lock
51+
52+
# public files (react)
53+
public/
54+
55+
# nextjs
56+
next-env.d.ts
57+
next-env.example.d.ts
58+
next.config.mjs
59+
next.config.js
60+
61+
# vite
62+
vite.config.mjs
63+
vite.config.js
64+
vite.config.ts
65+
66+
# lintstaged
67+
.lintstagedrc.js
68+
69+
# tailwind & postcss
70+
tailwind.config.js
71+
tailwind.config.cjs
72+
postcss.config.js
73+
postcss.config.cjs

.prettierrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"semi": true,
5+
"printWidth": 120,
6+
"tabWidth": 2,
7+
"arrowParens": "avoid",
8+
"useTabs": false,
9+
"quoteProps": "as-needed",
10+
"bracketSpacing": true,
11+
"bracketSameLine": false,
12+
"proseWrap": "preserve"
13+
}

package-lock.json

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"build": "babel src --extensions \".js,.ts\" --out-dir dist --copy-files --no-copy-ignored --no-comments --source-maps inline",
66
"dev": "tsnd --respawn --transpile-only --ignore-watch node_modules --no-notify -r tsconfig-paths/register src/server.ts",
77
"start": "node dist/server.js",
8-
"lint": "eslint --ext .ts src"
8+
"lint": "eslint --ext .ts src --fix",
9+
"format": "prettier --write src/**/*.{ts,js}"
910
},
1011
"dependencies": {
1112
"express": "^4.18.2"
@@ -22,6 +23,9 @@
2223
"@typescript-eslint/parser": "^5.50.0",
2324
"babel-plugin-module-resolver": "^5.0.0",
2425
"eslint": "^8.33.0",
26+
"eslint-config-prettier": "^8.6.0",
27+
"eslint-plugin-prettier": "^4.2.1",
28+
"prettier": "^2.8.3",
2529
"ts-node-dev": "^2.0.0",
2630
"tsconfig-paths": "^4.1.2",
2731
"typescript": "^4.9.5"

src/server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import express from "express"
1+
import express from 'express';
22

3-
const app = express()
3+
const app = express();
44

5-
app.listen(4000)
5+
app.listen(4000);

0 commit comments

Comments
 (0)