我正在尝试在如下所示的Next.js project.The文件结构中实现eslint
.eslintignore
.eslintrc.js
.next
.prettierrc
.stylelintrc.js
components
forms
modals
modules
node_modules我的.eslintignore文件中有node_modules/*。当我尝试用eslint --fix /sources/**/*.js来处理这些东西时,我得到了下面的错误
You are linting "/sources/node_modules/ally.js", but all of the files matching the glob pattern "/sources/node_modules/ally.js" are ignored.有人能帮我解决这个问题吗?谢谢
发布于 2021-05-20 14:55:29
如果.eslintignore与node_modules位于同一目录中,则可以将其指定为node_modules。
# .eslintignore
node_modules
**/.next/**
**/_next/**
**/dist/**.eslintignore遵循.gitignore语法。有关更多详细信息,请参阅.gitignore specs。
https://stackoverflow.com/questions/67614877
复制相似问题