Skip to content

Commit 0662d54

Browse files
authored
Merge pull request #74 from antosan/migrate-to-typescript
Migrate to TypeScript
2 parents 21651ec + 760edb9 commit 0662d54

48 files changed

Lines changed: 836 additions & 236 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: [
3+
'next/core-web-vitals',
4+
'plugin:@typescript-eslint/recommended',
5+
'prettier',
6+
],
7+
rules: {
8+
'@typescript-eslint/consistent-type-imports': 'error', // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/consistent-type-imports.md
9+
'react/no-unescaped-entities': 'off', // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
10+
},
11+
};

.eslintrc.json

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ yarn.lock
3838
/test-results/
3939
/playwright-report/
4040
/playwright/.cache/
41+
42+
# typescript
43+
*.tsbuildinfo
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// @ts-check
2-
const { test, expect } = require('@playwright/test');
1+
import { test, expect } from '@playwright/test';
32

43
test.beforeEach(async ({ page }) => {
54
await page.goto('http://localhost:3000');

next-env.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
// @ts-check
12
/** @type {import('next').NextConfig} */
23
const nextConfig = {
34
reactStrictMode: true,
4-
pageExtensions: ['page.jsx', 'api.js'],
5+
pageExtensions: ['page.tsx', 'api.ts'],
56
eslint: {
67
dirs: ['src', 'e2e'],
78
},

0 commit comments

Comments
 (0)