无法解析绒毛级配置
在运行lint阶段时,我会收到以下错误 -
这是我的lint阶段配置文件 -
module.exports = {
'src/**/*.ts': ['eslint --fix', () => 'tsc --noEmit'],
'**/*.{ts,js,json,yaml}': 'prettier --write',
'**/*': 'inflint -c inflint.config.ts',
};
When running lint-staged I get the following error -
This is my lint-staged config file -
module.exports = {
'src/**/*.ts': ['eslint --fix', () => 'tsc --noEmit'],
'**/*.{ts,js,json,yaml}': 'prettier --write',
'**/*': 'inflint -c inflint.config.ts',
};
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用debug标志运行,然后查看相应的配置被挑选的位置,因为看不到package。
在我的情况下,已将早期的node_modules备份到
node_modules.bk
,它的备份在第三方package.json
中选择。
它工作正常。NPX绒毛级 - D
Run with the debug flag and see where the corresponding config is being picked up as don't see it taken from package.json
In my case, had taken a backup of earlier node_modules to
node_modules.bk
and it's picking thelint-staged
config in third-partypackage.json
as it might be ignoring onlynode_modules
, after deletingnode_modules.bk
it worked fine.npx lint-staged -d