Skip to content

Commit 99ea2b6

Browse files
committed
add prettier; rename config files
1 parent a69e8ad commit 99ea2b6

File tree

5 files changed

+59
-17
lines changed

5 files changed

+59
-17
lines changed

.eslintrc.js

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

.eslintrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": [
5+
"@typescript-eslint"
6+
],
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"prettier"
11+
],
12+
"env": {
13+
"es6": true,
14+
"jest": true,
15+
"node": true
16+
}
17+
}

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"tabWidth": 2
7+
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
"dev": "nodemon -e ts --exec 'ts-node' src/dev.ts",
1515
"dev-customer": "nodemon -e ts --exec 'ts-node' __customer__/dev-customer.ts",
1616
"test": "npx jest",
17-
"test-coverage": "npx jest --coverage"
17+
"test-coverage": "npx jest --coverage",
18+
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
19+
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write"
1820
},
1921
"jest": {
2022
"collectCoverageFrom": [
@@ -49,8 +51,11 @@
4951
"@typescript-eslint/eslint-plugin": "^4.18.0",
5052
"@typescript-eslint/parser": "^4.18.0",
5153
"eslint": "^7.22.0",
54+
"eslint-config-prettier": "^8.1.0",
55+
"eslint-plugin-prettier": "^3.3.1",
5256
"jest": "^26.6.3",
5357
"nodemon": "^2.0.7",
58+
"prettier": "^2.2.1",
5459
"ts-jest": "^26.5.2",
5560
"ts-node": "^9.1.1",
5661
"typescript": "^4.2.3"

yarn.lock

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,6 +1631,18 @@ escodegen@^1.14.1:
16311631
optionalDependencies:
16321632
source-map "~0.6.1"
16331633

1634+
eslint-config-prettier@^8.1.0:
1635+
version "8.1.0"
1636+
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz#4ef1eaf97afe5176e6a75ddfb57c335121abc5a6"
1637+
integrity sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==
1638+
1639+
eslint-plugin-prettier@^3.3.1:
1640+
version "3.3.1"
1641+
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7"
1642+
integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==
1643+
dependencies:
1644+
prettier-linter-helpers "^1.0.0"
1645+
16341646
eslint-scope@^5.0.0, eslint-scope@^5.1.1:
16351647
version "5.1.1"
16361648
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
@@ -1854,6 +1866,11 @@ fast-deep-equal@^3.1.1:
18541866
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
18551867
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
18561868

1869+
fast-diff@^1.1.2:
1870+
version "1.2.0"
1871+
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
1872+
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
1873+
18571874
fast-glob@^3.1.1:
18581875
version "3.2.5"
18591876
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661"
@@ -3633,6 +3650,18 @@ prepend-http@^2.0.0:
36333650
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
36343651
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
36353652

3653+
prettier-linter-helpers@^1.0.0:
3654+
version "1.0.0"
3655+
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
3656+
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
3657+
dependencies:
3658+
fast-diff "^1.1.2"
3659+
3660+
prettier@^2.2.1:
3661+
version "2.2.1"
3662+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
3663+
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
3664+
36363665
pretty-format@^26.0.0, pretty-format@^26.6.2:
36373666
version "26.6.2"
36383667
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93"

0 commit comments

Comments
 (0)