Sfoglia il codice sorgente

workflow: eslint ignore unused args that start with _

Evan You 5 anni fa
parent
commit
c80d93f15c
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      .eslintrc.js

+ 1 - 1
.eslintrc.js

@@ -11,7 +11,7 @@ module.exports = {
       'error',
       'error',
       // we are only using this rule to check for unused arguments since TS
       // we are only using this rule to check for unused arguments since TS
       // catches unused variables but not args.
       // catches unused variables but not args.
-      { varsIgnorePattern: '.*', args: 'after-used' }
+      { varsIgnorePattern: '.*', args: 'after-used', argsIgnorePattern: '^_' }
     ],
     ],
     // most of the codebase are expected to be env agnostic
     // most of the codebase are expected to be env agnostic
     'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
     'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],