Closed Garbee closed 8 years ago
I think I just figured out the main problem I've been having.
1) The config in the minimal repo is incorrect. I rushed it together trying to just remember from memory. Using the inlined config below it works in that respect.
bemLinter('bem', {
namespace: 'mdl',
ignoreSelectors: [
/\.material-icons/
]
})
What I did to get things working is I now have postcss called twice. Once to do the initial generation. Then right after that I call it again just to run the linter. Once that was done, it is working perfectly minus the ignore statement not seeming to work. Still trying to figure that one out. At least the primary errors are finally solved.
Just in case anyone else hits this type of problem, try running post again for linting after your primary compilation pipe (in gulp) is completed.
postcss seems to be doing some funky stuff having the linter at the end of a long compilation chain.
This all depends on the plugins you use ... but yes, I absolutely agree that the ideal way to run the linting is on the unprocessed original files.
I'm trying to get the tool setup for a project. However, I keep having complete failure where I don't seem to be causing it.
I've created a minimal repository to focus down on the problem. It only takes the output CSS and runs it directly through the linter.
bem
preset is defined.mdl
is configured as prefix./* postcss-bem-linter: define appbar */
is defined right before the component in question./* @end */
is defined after the component is completed.Actual output:
I may expect some errors, but certainly not
mdl-appbar
(the first error) being an invalid selector.Any ideas what I'm doing wrong here? Anything I can do to help narrow in on the problem?