stylelint for less - The "syntax" option is no longer available
See original GitHub issuestylelint --fix “src/**/*.less” --syntax less Error: The “syntax” option is no longer available. You should install an appropriate syntax, e.g. postcss-scss, and use the “customSyntax” option
"lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
How to use customSyntax to fixed it? Thanks
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Migrating to 14.0.0 - Stylelint
syntax option and automatic inferral of syntax. Stylelint no longer includes the syntaxes that: parse CSS-like languages like SCSS, Sass, Less and SugarSS ......
Read more >Options - Stylelint
Specify a custom syntax to use on your code. There are many styling languages, ranging from CSS language extensions like SCSS to entirely...
Read more >Getting started | Stylelint
If a shared config isn't available for your preferred language or library, then you can install the appropriate custom syntax yourself and use...
Read more >Configuration | Stylelint
You can use the --config or configFile option to short-circuit the search. ... No rules are turned on by default and there are...
Read more >Changelog | Stylelint
Fixed: no-duplicate-selectors false positives with Less syntax (#6111). ... Added: customSyntax option as a property in the configuration object (#5538).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See the migration guide.
You should install
postcss-less
:And then either use the
--custom-syntax
flag:or use the
customSyntax
configuration object property:You can also raise an issue in the 3rd party
stylelint-config-recommended-less
shared config to see if they’ll be willing to bundle the postcss-less syntax in the config.For anyone that encounters this later, the solution is
npm i --save-dev postcss@8
https://github.com/stylelint-scss/stylelint-config-standard-scss/issues/5#issuecomment-961709882