-
-
Notifications
You must be signed in to change notification settings - Fork 35
bug: ReferenceError: require is not defined in ES module scope, you can use import instead #141
Copy link
Copy link
Closed
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil ESLint Version
1.0.0
Current Behavior
Hey, I've been trying to run eslint with this plugin and I've been unable to do because of the line containing the require in the bundle:
const jsdom = require("jsdom");This happens both on an old project and on a new project that i just scaffolded with the latest version of stencil and of this plugin. The project can be seen here: https://github.com/neslinesli93/test-stencil-eslint
Just run the following commands to reproduce the issue:
yarn
yarn lintThe error is:
yarn run v1.22.22
$ eslint src
Oops! Something went wrong! :(
ESLint: 9.22.0
ReferenceError: require is not defined in ES module scope, you can use import instead
at file:///home/neslinesli93/STUFF/test-stencil-eslint/node_modules/@stencil/eslint-plugin/dist/index.js:1047:15
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.Expected Behavior
The linter runs just fine
Steps to Reproduce
- Clone https://github.com/neslinesli93/test-stencil-eslint
- Run
yarnandyarn lint
Code Reproduction URL
https://github.com/neslinesli93/test-stencil-eslint
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels