eddies / stylelint-junit-formatter

Output Checkstyle XML reports of stylelint results
MIT License
6 stars 8 forks source link

Incompatible with Stylelint 16.x #12

Open deanmarano opened 4 months ago

deanmarano commented 4 months ago

Upgrading from Stylelint 15 to 16 exposes the following error:

$ npm run lint:ci:css

> ember-5-9@0.0.0 lint:ci:css
> stylelint "**/*.css"  --custom-formatter=node_modules/stylelint-junit-formatter

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/ember-5-9/node_modules/stylelint-junit-formatter' is not supported resolving ES modules imported from /ember-5-9/node_modules/stylelint/lib/utils/dynamicImport.mjs
Did you mean to import /ember-5-9/node_modules/stylelint-junit-formatter/index.js?
    at new NodeError (node:internal/errors:387:5)
    at finalizeResolution (node:internal/modules/esm/resolve:425:17)
    at moduleResolve (node:internal/modules/esm/resolve:1006:10)
    at defaultResolve (node:internal/modules/esm/resolve:1214:11)
    at nextResolve (node:internal/modules/esm/loader:165:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:844:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:431:18)
    at ESMLoader.import (node:internal/modules/esm/loader:528:22)
    at importModuleDynamically (node:internal/modules/esm/translators:110:35)
    at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14) {
  code: 'ERR_UNSUPPORTED_DIR_IMPORT',
  url: 'file:///ember-5-9/node_modules/stylelint-junit-formatter'
}

Example Ember app for reproduction here.

npm install
npm run lint:ci:css

Will reproduce the issue.

Tracer1337 commented 2 months ago

It works with --custom-formatter=node_modules/stylelint-junit-formatter/index.js