Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Commit 4da0738

Browse files
committed
feat: add typescript-eslint, typescript-version
1 parent fa0dcd1 commit 4da0738

File tree

5 files changed

+52
-16
lines changed

5 files changed

+52
-16
lines changed

package-lock.json

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

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,18 @@
3030
},
3131
"homepage": "https://github.com/yeonjuan/typescript-eslint-demo#readme",
3232
"dependencies": {
33-
"@typescript-eslint/eslint-plugin": "^4.4.0",
34-
"@typescript-eslint/parser": "^4.1.0",
33+
"@typescript-eslint/eslint-plugin": "4.4.0",
34+
"@typescript-eslint/parser": "4.4.0",
3535
"bootstrap": "^4.5.2",
3636
"codemirror": "^5.58.1",
3737
"core-js": "^3.6.5",
3838
"eslint": "^7.10.0",
3939
"esquery": "^1.3.1",
40+
"query-string": "^6.13.5",
4041
"react": "^16.13.1",
4142
"react-bootstrap": "^1.3.0",
4243
"react-dom": "^16.13.1",
43-
"typescript": "^4.0.3"
44+
"typescript": "4.0.3"
4445
},
4546
"devDependencies": {
4647
"@babel/core": "^7.11.6",

src/components/Header.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import React from "react";
22
import type { FC } from "react";
33
import "@/css/header.css";
4+
import pkgJson from "../../package.json";
45

56
export const Header: FC = () => (
67
<header>
78
<h2 style={{ color: "#666" }}>TypeScript ESlint Demo</h2>
9+
<ul className="versions">
10+
<li>
11+
TypeScript-ESLint v
12+
{pkgJson.dependencies["@typescript-eslint/eslint-plugin"]}
13+
</li>
14+
<li>TypeScript v{pkgJson.dependencies["typescript"]}</li>
15+
</ul>
816
</header>
917
);

src/css/header.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ header {
33
}
44

55
header h2 {
6+
display: inline;
67
margin: 0 0 10px;
78
padding: 0;
89
}
10+
11+
.versions {
12+
float: right;
13+
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"@/*": ["./src/*"]
1313
},
1414
"esModuleInterop": true,
15-
"forceConsistentCasingInFileNames": true
15+
"forceConsistentCasingInFileNames": true,
16+
"resolveJsonModule": true
1617
},
1718
"exclude": ["node_modules"]
1819
}

0 commit comments

Comments
 (0)