Skip to content

Commit c51d520

Browse files
committed
fix: eslint config
1 parent 110be46 commit c51d520

File tree

5 files changed

+27
-2
lines changed

5 files changed

+27
-2
lines changed

.eslintrc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"jest/globals": true
77
},
88
"parser": "@typescript-eslint/parser",
9-
"plugins": ["@typescript-eslint", "jest"],
9+
"parserOptions": {
10+
"project": "./tsconfig.json",
11+
"sourceType": "module"
12+
},
13+
"plugins": ["@typescript-eslint", "jest", "prettier"],
1014
"extends": [
1115
"eslint:recommended",
1216
"plugin:@typescript-eslint/recommended",

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"singleQuote": true,
3+
"tabWidth": 2,
34
"trailingComma": "all",
45
"overrides": [
56
{

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"eslint": "8.40.0",
6666
"eslint-config-prettier": "8.8.0",
6767
"eslint-plugin-jest": "27.2.1",
68+
"eslint-plugin-prettier": "^4.2.1",
6869
"husky": "^8.0.2",
6970
"jest": "29.5.0",
7071
"lint-staged": "^13.1.0",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { sayHello } from './hello.js';
22

3-
async function main() {
3+
function main() {
44
sayHello();
55
}
66

yarn.lock

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,6 +1905,13 @@ [email protected]:
19051905
dependencies:
19061906
"@typescript-eslint/utils" "^5.10.0"
19071907

1908+
eslint-plugin-prettier@^4.2.1:
1909+
version "4.2.1"
1910+
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
1911+
integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
1912+
dependencies:
1913+
prettier-linter-helpers "^1.0.0"
1914+
19081915
eslint-scope@^5.1.1:
19091916
version "5.1.1"
19101917
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
@@ -2129,6 +2136,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
21292136
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
21302137
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
21312138

2139+
fast-diff@^1.1.2:
2140+
version "1.3.0"
2141+
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0"
2142+
integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==
2143+
21322144
fast-glob@^3.2.5, fast-glob@^3.2.9:
21332145
version "3.2.11"
21342146
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9"
@@ -3580,6 +3592,13 @@ prelude-ls@^1.2.1:
35803592
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
35813593
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
35823594

3595+
prettier-linter-helpers@^1.0.0:
3596+
version "1.0.0"
3597+
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
3598+
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
3599+
dependencies:
3600+
fast-diff "^1.1.2"
3601+
35833602
35843603
version "2.8.8"
35853604
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"

0 commit comments

Comments
 (0)