Closed ElPrudi closed 11 months ago
@ElPrudi Sorry for the delay.
I think that's because we're not using @rollup/plugin-commonjs
, I'll fix it ASAP.
The current workaround is still using commonjs in ESM:
import { createRequire } from 'node:module'
const require = createRequire(import.meta.url)
require('eslint-plugin-sonar')
Hmm... I don't quite understand, I tried to use @rollup/plugin-commonjs
, but the output remains same, I'll fix this in another way. And this could be an issue of rollup itself.
I'm currently switching from the legacy format
.eslintrc.js
toeslint.config.js
and I'm importing this plugin as an esm module. Due to how TypeScript is built, being a commonjs file, you can't use explicit named exports.Your file uses:
But should rather be this:
or this: