chore: lint for unused arguments

This commit is contained in:
Evan You
2020-06-12 16:31:31 -04:00
parent 825ec1500f
commit 91fa52850a
7 changed files with 13 additions and 62 deletions

View File

@@ -7,6 +7,12 @@ module.exports = {
sourceType: 'module'
},
rules: {
'no-unused-vars': [
'error',
// we are only using this rule to check for unused arguments since TS
// catches unused variables but not args.
{ varsIgnorePattern: '.*', args: 'after-used' }
],
// most of the codebase are expected to be env agnostic
'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
// since we target ES2015 for baseline support, we need to forbid object