【发布时间】:2020-11-04 07:20:05
【问题描述】:
我很难追踪到这个问题,所以我发帖是为了帮助其他搜索类似错误的人。
我决定使用 eslint 和 Node.js 在 Atom 中的 Ubuntu 18.04 上建立一个新项目。
ESlint 本身在我的扩展 eslint:recommended 的配置下安装并运行得很好,但是当我安装 eslint-config-airbnb-base 并将我的配置更改为扩展 airbnb-base 时,我开始在 Atom 中遇到错误,它不会解析我的文件。
Error while running ESLint: createRequire is not a function.
删除airbnb并依赖eslint-plugin-import给出了类似的错误:
Error while running ESLint: Failed to load plugin 'import' declared in '.eslintrc.yaml': createRequire is not a function.
但是,在命令行上运行 eslint 效果很好。
【问题讨论】:
标签: node.js eslint atom-editor eslint-config-airbnb