-
-
Notifications
You must be signed in to change notification settings - Fork 986
Closed
Labels
status: ready to implementis ready to be worked on by someoneis ready to be worked on by someone
Description
Current implementation, although using require, only provides relative or absolute file path.
Lines 348 to 354 in 16ae9e4
| if (cli.flags.customFormatter) { | |
| const customFormatter = path.isAbsolute(cli.flags.customFormatter) | |
| ? cli.flags.customFormatter | |
| : path.join(process.cwd(), cli.flags.customFormatter); | |
| formatter = require(customFormatter); | |
| } |
So it is not possible to import a formatter as dependency correctly.
Not Correct stylelint "src/**/*.css" --custom-formatter node_modules/dependency/index.js
Correct stylelint "src/**/*.css" --custom-formatter dependency
Topic was already mentioned here in the past. #2449
PR: #5193
Metadata
Metadata
Assignees
Labels
status: ready to implementis ready to be worked on by someoneis ready to be worked on by someone