Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed Feb 21, 2020
1 parent 9edd863 commit e5224b7
Show file tree
Hide file tree
Showing 9 changed files with 1,085 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -29,6 +29,7 @@ module.exports = {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-unsafe-any': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/configs/all.json
Expand Up @@ -41,7 +41,6 @@
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-inferrable-types": "error",
"no-magic-numbers": "off",
"@typescript-eslint/no-magic-numbers": "error",
Expand All @@ -60,6 +59,7 @@
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unsafe-any": "error",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "error",
"no-unused-vars": "off",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/func-call-spacing.ts
Expand Up @@ -79,7 +79,7 @@ export default util.createRule<Options, MessageIds>({
| TSESTree.OptionalCallExpression
| TSESTree.NewExpression,
): void {
const isOptionalCall = util.isOptionalOptionalChain(node);
const isOptionalCall = util.isOptionalOptionalCallExpression(node);

const closingParenToken = sourceCode.getLastToken(node)!;
const lastCalleeTokenWithoutPossibleParens = sourceCode.getLastToken(
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-array-constructor.ts
Expand Up @@ -37,7 +37,7 @@ export default util.createRule({
node.callee.type === AST_NODE_TYPES.Identifier &&
node.callee.name === 'Array' &&
!node.typeParameters &&
!util.isOptionalOptionalChain(node)
!util.isOptionalOptionalCallExpression(node)
) {
context.report({
node,
Expand Down

0 comments on commit e5224b7

Please sign in to comment.