Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextjs 和 sveltejs 模板的 lint 现在不能正常 work #179

Open
frmachao opened this issue Sep 2, 2022 · 0 comments
Open

nextjs 和 sveltejs 模板的 lint 现在不能正常 work #179

frmachao opened this issue Sep 2, 2022 · 0 comments

Comments

@frmachao
Copy link
Contributor

frmachao commented Sep 2, 2022

Next.js :所有的 js 文件开头都会出现 Parsing error: Cannot find module 'next/babel’ 错误提示

image

参考 stackoverflow 上这篇回答 :在 .babelrc 和 .eslintrc 中配置后,错误信息消失;

// .babelrc 
{
  "presets": ["next/babel"],
  "plugins": []
}
// .eslintrc
{
  "extends": ["next/babel","next/core-web-vitals"]
}

但是执行 npm run lint 时会提示 Failed to load config "next/babel" to extend from.

// package.json
"lint": "next lint",

svelte

  1. 添加 eslint-plugin-svelte3 eslint 插件后,lint 不能正常检测 svelte 中的错误
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant