Community
Participate
Working Groups
We should add a new rule to enforce quotes consistency through the code base. Check http://eslint.org/docs/rules/quotes.html.
This one would require a way to specify an option for the rule like "single", "double" or "backtick". So it doesn't quite fit into the existing framework. Silenio, is there a way to plug this into the existing framework?
(In reply to Olivier Thomann from comment #1) > This one would require a way to specify an option for the rule like > "single", "double" or "backtick". So it doesn't quite fit into the existing > framework. > Silenio, is there a way to plug this into the existing framework? If we have to create something new to accomplish this, perhaps it could be as simple as being able to specify a list of dependent prefs that the UI-client would draw as indented compared to their 'owning' pref. For example, a plugin could provide: { id: "quotes", //$NON-NLS-1$ name: "Enforce quote style:", //$NON-NLS-1$ type: "number", //$NON-NLS-1$ defaultValue: error, options: severities, dependents: [ { id: "quotes-options", //$NON-NLS-1$ name: "Quoting options:", //$NON-NLS-1$ type: "string", //$NON-NLS-1$ defaultValue: "double", //$NON-NLS-1$ options: ["double", "single", "backtick"] //$NON-NLS-1$ }] }
Silenio proposed to add a dependsOn field that contains the id of the option the current option depends on. I am looking at how this can be rendered in the UI so that it looks indented under the dependent option. So an option can have multiple dependent options. They would all be rendered indented in the UI under the right option.
Created attachment 259498 [details] Work in progress
Delivered as commit http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=4df81c3a842311761dcc12c69ee26a9596024aec