Hey there New day new …
Hey there! New day, new question: is there a way to customize what nx workspace-lint and nx lint do? I have added stylelint to my project and I’d like to include it in the “set of things” that NX lints
Responses:
For now I’ve just preprended my lint scripts to execute another “lint:css” script, but it ain’t so nice :wink:
I was thinking the same this week… would be nice if linting would also happen on style based files. We never had a much rules for writing css declarations, but a colleague applied a rule of alphabetically ordering declarations in a MR and I really like it. Really easy to reason about and editors also have plugins/features to sort lines alphabetically
Didn’t do any research just yet, i’ll keep an eye out on this thread now :slightly_smiling_face:
Stylelint is a nice solution for this; it works really well. It’s also quite straightforward to add it to a project.
I’ll create a ticket on Nx’s github to see if they’re open to let us customize what lint does
The lint command calls a builder defined in workspace.json. It is free to change. You would have to implement your own builder.