New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support additional languages #278
Comments
I don't want to lint Markdown. It's much harder to do it reliably. And the it's hard to make rules that are not annoying and overly strict. Markdown is a loose language in contrast to code. I'm open to considering linting CSS, but I'm not yet sure I want to open that floodgate. It will add a lot of bloat, both in code, maintenance, and in the documentation. In the few project I have with CSS, it's easy enough to just add |
My experience with
Basically the same value than XO has over ESLint:
In addition you would have one tool to take care of both JS and stylesheet file, without config, by just running |
As much as I'd like this, Stylelint isn't as good and as well-supported as ESLint. Mashing multiple tools under XO would just double the supporting code/glue required, for little benefit, I'd suggest using them directly, perhaps with https://github.com/xojs/stylelint-config-xo Closing because it's been a minute |
We could support markdown via remark-lint and css/sass/scss via stylelint.
By default we would lint
*.css
,*.sass
and*.scss
with stylelint-config-xo or stylelint-config-xo-space based on thespace
options.We would have to create the
remark-xo-config
repo for theremark-link
config (maybe based on awesome-lint/config.js?).The CLI options would work as follow:
--plugin
: add an ESLint plugin (for backward compatibility)--plugin-js
: add an ESLint plugin--plugin-css
: add a Stylelint plugin--plugin-md
: add a Remark-lint plugin (which is equivalent to add a rule or a preset are they are all npm package name to add to the config)--extend
: add an ESLint shareable config (for backward compatibility)--extend-js
: add an ESLint shareable config--extend-css
: add a Stylelint shareable config--extend-md
: add a Remark-lint preset (which is equivalent to add a rule or a preset are they are all npm package name to add to the config)--extension
: set file extension to lint with ESLint (for backward compatibility)--extension-js
: set file extension to lint with ESLint--extension-css
: set file extension to lint with Stylelint--extension-md
: set file extension to lint with Remark-lintThe configuration options would work as follow:
plugins
:String
or anArray
defines the ESLint pluginObject
, thejs
defines the ESLint plugins, thecss
key the Stylelint plugins and themd
key the Remark-lint pluginsextends
:String
or anArray
defines the ESLint configObject
, thejs
defines the ESLint config, thecss
key the Stylelint config and themd
key the Remark-lint configrules
:String
or anArray
defines the ESLint rulesObject
, thejs
defines the ESLint rules, thecss
key the Stylelint rules and themd
key the Remark-lint rulesextensions
:String
or anArray
defines the file extension to lint with ESLintObject
, thejs
defines the file extension to lint with ESLint, thecss
key the one to lint with Stylelint and themd
key the one to lint with Remark-lintWe could use [vfile-reporter-pretty]
https://github.com/vfile/vfile-reporter-pretty
to report errors in markdown files and stylelint-formatter-pretty for Stylelint.Most of the logic could be re-used especially
options-manager.js
. We would have to call the proper linter inindex.js
based on the file extension.The text was updated successfully, but these errors were encountered: