diff --git a/.eslintrc.yml b/.eslintrc.yml index 5785292c45..0cf56f3a90 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -36,6 +36,23 @@ rules: - selector: class format: - PascalCase + - selector: variableLike + format: null + custom: + # Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar we + # should probably be using the following expression here (newlines added for readability) + # + # ^(break|case|catch|class|const|continue|debugger|default|delete|do|else|export| + # extends|finally|for|function|if|import|in|instanceof|new|return|super|switch|this| + # throw|try|typeof|var|void|while|with|yield|enum|implements|interface|let|package| + # private|protected|public|static|await|abstract|boolean|byte|char|double|final|float| + # goto|int|long|native|short|synchronized|throws|transient|volatile|null|true|false)$ + # + # But that'll cause a bunch of errors, for now we'll stick with replicating what the + # variable-name ban-keywords rule did for us in tslint + # see https://palantir.github.io/tslint/rules/variable-name/ + regex: '^(any|Number|number|String|string|Boolean|boolean|Undefined|undefined)$' + match: false '@typescript-eslint/consistent-type-assertions': - error - assertionStyle: 'as'