Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Add rule configuration option to the demo #26

Closed
ilyavolodin opened this issue Mar 7, 2015 · 7 comments · Fixed by #28
Closed

Add rule configuration option to the demo #26

ilyavolodin opened this issue Mar 7, 2015 · 7 comments · Fixed by #28
Labels
enhancement This change enhances an existing feature of the website

Comments

@ilyavolodin
Copy link
Member

ESLint has a ton of different rules, I think it would be good to add ability for users to play with different rules on the demo page. For that, we need to expose a way to configure them. It would be even cooler, if we would allow to use plugins, but I don't think that's possible with the current setup.

@ilyavolodin ilyavolodin added the enhancement This change enhances an existing feature of the website label Mar 7, 2015
@nzakas
Copy link
Member

nzakas commented Mar 7, 2015

Plugins are a stretch, but options would be nice.

@ilyavolodin
Copy link
Member Author

Correct me if I'm wrong, but currently, there's absolutely no way to do plugins in a browser, right? That feels like an oversight, maybe that should be looked into.

@nzakas
Copy link
Member

nzakas commented Mar 7, 2015

You are correct. It's not an oversight - ESLint is made primarily to be used on the command line. We only create a browserified bundle for demo purposes, but it's in no way meant to have all the functionality available on the command line.

@ilyavolodin
Copy link
Member Author

I was thinking more in terms of Orion, but I guess, they are forking ESLint anyways, if they want plugin support, they should be able to add it in.

@nzakas
Copy link
Member

nzakas commented Mar 7, 2015

Yeah, they just need to create a plugin loader and it should work fine.

@ilyavolodin
Copy link
Member Author

I started looking into this, and the biggest problem that I see is rule configuration options. We do not have central place that lists all available options for rules, and in order to make this even remotely user friendly, I would need to list config options as something like checkboxes.
I also do not want to maintain options separately from rules themselves, because that means that the page will need to be updated every time there's a change to the rule. I think in general it would be a good idea to add rules options somewhere in the ESLint code. It will help not only with this case, but also will help other people who create editor integrations, and it would be useful for documentation purposes.

@nzakas
Copy link
Member

nzakas commented Mar 7, 2015

I think in the short term it makes sense to just toggle options off or on rather than configuring them completely.

We do have this issue open to figure out how to deal with rule options more sanely: eslint/eslint#967

@nzakas nzakas closed this as completed in #28 Mar 8, 2015
nzakas added a commit that referenced this issue Mar 8, 2015
Adding configuration to eslint demo (fixes #26)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement This change enhances an existing feature of the website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants