Hi Miguel, There's no way to have this rule apply just to destructured variables. The "destructuring" option just allows you to specify when the rule should flag destructured variables but doesn't affect other variables.
Here's the documentation for the rule: http://eslint.org/docs/rules/prefer-const -N On Sat, Apr 16, 2016, 3:25 AM Miguel Guedes <[email protected]> wrote: > Is it possible to enable errors on "prefer-const" but for the > "destructuring" option only? > > So far I've tried, > > "prefer-const": [2, {"destructuring": "all"}] > > ... but that seems to also enable const enforcement on variables. > > -- > You received this message because you are subscribed to the Google Groups > "ESLint" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "ESLint" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
