springernature / eslint-config-springernature

ESLint shareable config used at Springer Nature
MIT License
3 stars 0 forks source link

Fix bug in no-unused-vars #36

Closed alexkilgour closed 5 years ago

alexkilgour commented 5 years ago

This fixes a bug in the no-unused-vars rule when specifying an argsIgnorePattern. The aim of the pattern is allow unused vars if they start with an underscore, as per the example in the documentation - "argsIgnorePattern": "^_".

Our rule specified "argsIgnorePattern": "^_$" which means that only arguments called _ can be unused, rather than _name-of-arg.