Support typescript
5.7
#73221
pcaversaccio
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Fixing it for now via an explicit type annotation: /* eslint-disable @typescript-eslint/no-require-imports */
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const next = require("@next/eslint-plugin-next");
const react = require("eslint-plugin-react");
const reactHooks = require("eslint-plugin-react-hooks");
const eslintConfigPrettier = require("eslint-config-prettier");
/* eslint-enable @typescript-eslint/no-require-imports */
/** @type {import('typescript-eslint').TSESLint.FlatConfig.ConfigArray} */
module.exports = tseslint.config(
{
files: ["**/*.{js,ts,tsx}"],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
eslintConfigPrettier,
],
plugins: {
"@typescript-eslint": tseslint.plugin,
"@next/next": next,
react: react,
"react-hooks": reactHooks,
},
rules: {
...next.configs.recommended.rules,
...react.configs["jsx-runtime"].rules,
...reactHooks.configs.recommended.rules,
},
languageOptions: {
ecmaVersion: "latest",
parser: tseslint.parser,
parserOptions: {
project: true,
},
},
},
{
ignores: ["node_modules/**", ".next/**", "next-env.d.ts", "dist/**"],
},
); |
Beta Was this translation helpful? Give feedback.
0 replies
-
@pcaversaccio Can you provide us a :repro: so we can take a look? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Link to the code that reproduces this issue
https://github.com/microsoft/TypeScript/releases/tag/v5.7.2
To Reproduce
The full announcement: https://devblogs.microsoft.com/typescript/announcing-typescript-5-7.
Current vs. Expected behavior
npx next build
will fail with something like if upgraded totypescript
5.7.2
:You can repro using my code here: https://github.com/pcaversaccio/createx/tree/main/interface.
Provide environment information
Operating System: Platform: win32 Arch: x64 Version: Windows 11 Pro Available memory (MB): 16190 Available CPU cores: 8 Binaries: Node: 22.11.0 npm: 10.9.1 Yarn: 1.22.22 pnpm: 9.14.2 Relevant Packages: next: 15.0.3 // Latest available version is detected (15.0.3). eslint-config-next: 15.0.3 react: 18.3.1 react-dom: 18.3.1 typescript: 5.7.2 Next.js Config: output: export
Which area(s) are affected? (Select all that apply)
Linting
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions