-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to App Router, add TypeScript, update styles
- Loading branch information
1 parent
aec888f
commit b0a6bfb
Showing
201 changed files
with
10,817 additions
and
14,580 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
const { resolve } = require('node:path'); | ||
|
||
const project = resolve(__dirname, 'tsconfig.json'); | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
require.resolve('@vercel/style-guide/eslint/node'), | ||
require.resolve('@vercel/style-guide/eslint/typescript'), | ||
require.resolve('@vercel/style-guide/eslint/browser'), | ||
require.resolve('@vercel/style-guide/eslint/react'), | ||
require.resolve('@vercel/style-guide/eslint/next'), | ||
], | ||
parserOptions: { | ||
project, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
typescript: { | ||
project, | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
ignoreRestSiblings: true, | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_', | ||
}, | ||
], | ||
'@typescript-eslint/no-empty-interface': [ | ||
'error', | ||
{ | ||
allowSingleExtends: true, | ||
}, | ||
], | ||
'@typescript-eslint/no-shadow': [ | ||
'error', | ||
{ | ||
ignoreOnInitialization: true, | ||
}, | ||
], | ||
'import/newline-after-import': 'error', | ||
'react/jsx-uses-react': 'error', | ||
'react/react-in-jsx-scope': 'error', | ||
'unicorn/filename-case': [ | ||
'error', | ||
{ | ||
cases: { | ||
kebabCase: true, // personal style | ||
pascalCase: true, | ||
}, | ||
}, | ||
], | ||
|
||
// Deactivated | ||
'@typescript-eslint/dot-notation': 'off', // paths are used with a dot notation | ||
'@typescript-eslint/no-misused-promises': 'off', // onClick with async fails | ||
'@typescript-eslint/no-non-null-assertion': 'off', // sometimes compiler is unable to detect | ||
'@typescript-eslint/no-unnecessary-condition': 'off', // remove when no static data is used | ||
'@typescript-eslint/require-await': 'off', // Server Actions require async flag always | ||
'@typescript-eslint/prefer-nullish-coalescing': 'off', // personal style | ||
'import/no-default-export': 'off', // Next.js components must be exported as default | ||
'import/no-extraneous-dependencies': 'off', // conflict with sort-imports plugin | ||
'import/order': 'off', // using custom sort plugin | ||
'no-nested-ternary': 'off', // personal style | ||
'no-redeclare': 'off', // conflict with TypeScript function overloads | ||
'react/jsx-fragments': 'off', // personal style | ||
'react/prop-types': 'off', // TypeScript is used for type checking | ||
|
||
'@next/next/no-img-element': 'off', // Temporary disabled | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const config = {}; | ||
|
||
export default config; |
Oops, something went wrong.