generated from idea2app/Next-Bootstrap-ts
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[migrate] upgrade to Next.js 15, ESLint 9, KoAJAX 3.1 & other latest …
…Upstream packages [add] Prettier CSS plugins Signed-off-by: TechQuery <[email protected]>
- Loading branch information
Showing
22 changed files
with
3,112 additions
and
2,907 deletions.
There are no files selected for viewing
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// @ts-check | ||
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import eslint from '@eslint/js'; | ||
import eslintConfigPrettier from 'eslint-config-prettier'; | ||
import reactPlugin from 'eslint-plugin-react'; | ||
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort'; | ||
import globals from 'globals'; | ||
import tsEslint from 'typescript-eslint'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url)), | ||
flatCompat = new FlatCompat(); | ||
|
||
export default tsEslint.config( | ||
// register all of the plugins up-front | ||
{ | ||
plugins: { | ||
'@typescript-eslint': tsEslint.plugin, | ||
// @ts-expect-error https://github.com/jsx-eslint/eslint-plugin-react/issues/3699 | ||
react: fixupPluginRules(reactPlugin), | ||
'simple-import-sort': simpleImportSortPlugin, | ||
}, | ||
}, | ||
{ | ||
// config with just ignores is the replacement for `.eslintignore` | ||
ignores: ['**/node_modules/**', '**/public/**', '**/.next/**'], | ||
}, | ||
|
||
// extends ... | ||
eslint.configs.recommended, | ||
...tsEslint.configs.recommended, | ||
...fixupConfigRules(flatCompat.extends('plugin:@next/next/core-web-vitals')), | ||
|
||
// base config | ||
{ | ||
languageOptions: { | ||
globals: { ...globals.es2020, ...globals.browser, ...globals.node }, | ||
parserOptions: { | ||
projectService: true, | ||
tsconfigRootDir, | ||
warnOnUnsupportedTypeScriptVersion: false, | ||
}, | ||
}, | ||
rules: { | ||
'no-empty-pattern': 'warn', | ||
'simple-import-sort/exports': 'error', | ||
'simple-import-sort/imports': 'error', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-empty-object-type': 'off', | ||
'@typescript-eslint/no-unsafe-declaration-merging': 'warn', | ||
'react/jsx-no-target-blank': 'warn', | ||
'react/jsx-sort-props': [ | ||
'error', | ||
{ | ||
reservedFirst: true, | ||
callbacksLast: true, | ||
noSortAlphabetically: true, | ||
}, | ||
], | ||
'@next/next/no-sync-scripts': 'warn', | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.js'], | ||
extends: [tsEslint.configs.disableTypeChecked], | ||
rules: { | ||
// turn off other type-aware rules | ||
'@typescript-eslint/internal/no-poorly-typed-ts-props': 'off', | ||
|
||
// turn off rules that don't apply to JS code | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
}, | ||
}, | ||
eslintConfigPrettier, | ||
); |
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 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
Oops, something went wrong.
dbc7724
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for oss-toolbox ready!
✅ Preview
https://oss-toolbox-lowzjk4zp-techquerys-projects.vercel.app
Built with commit dbc7724.
This pull request is being automatically deployed with vercel-action