Skip to content

Commit

Permalink
chore: imporved typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
anikethsaha committed Apr 10, 2020
1 parent 375bc6a commit 44f4f16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/init-declarations.ts
Expand Up @@ -41,7 +41,7 @@ export default createRule<Options, MessageIds>({
return {
'VariableDeclaration:exit'(node: TSESTree.VariableDeclaration): void {
if (mode === 'always') {
if (node?.declare) {
if (node.declare) {
return;
}
if (
Expand Down
9 changes: 1 addition & 8 deletions packages/eslint-plugin/tests/rules/init-declarations.test.ts
@@ -1,15 +1,8 @@
import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils';
import rule from '../../src/rules/init-declarations';
import { RuleTester, getFixturesRootDir } from '../RuleTester';
import { RuleTester } from '../RuleTester';

const rootDir = getFixturesRootDir();
const ruleTester = new RuleTester({
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: rootDir,
},
parser: '@typescript-eslint/parser',
});

Expand Down

0 comments on commit 44f4f16

Please sign in to comment.