Skip to content

Commit 7f3cc12

Browse files
authored
chore: use @tsconfig/node14 and stricter TS config (#1242)
1 parent 43f7ccc commit 7f3cc12

14 files changed

+29
-17
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"@schemastore/package": "^0.0.6",
109109
"@semantic-release/changelog": "^6.0.0",
110110
"@semantic-release/git": "^10.0.0",
111+
"@tsconfig/node14": "^1.0.3",
111112
"@types/dedent": "^0.7.0",
112113
"@types/jest": "^29.0.0",
113114
"@types/node": "^14.18.26",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { readdirSync } from 'fs';
22
import { join, parse } from 'path';
3-
import { TSESLint } from '@typescript-eslint/utils';
3+
import type { TSESLint } from '@typescript-eslint/utils';
44
import globals from './globals.json';
55
import * as snapshotProcessor from './processors/snapshot-processor';
66

src/rules/no-commented-out-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESTree } from '@typescript-eslint/utils';
1+
import type { TSESTree } from '@typescript-eslint/utils';
22
import { createRule } from './utils';
33

44
function hasTests(node: TSESTree.Comment) {

src/rules/no-conditional-in-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESTree } from '@typescript-eslint/utils';
1+
import type { TSESTree } from '@typescript-eslint/utils';
22
import { createRule, isTypeOfJestFnCall } from './utils';
33

44
export default createRule({

src/rules/no-mocks-import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { posix } from 'path';
2-
import { TSESTree } from '@typescript-eslint/utils';
2+
import type { TSESTree } from '@typescript-eslint/utils';
33
import { createRule, getStringValue, isStringNode } from './utils';
44

55
const mocksDirName = '__mocks__';

src/rules/prefer-each.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESTree } from '@typescript-eslint/utils';
1+
import type { TSESTree } from '@typescript-eslint/utils';
22
import { JestFnType, createRule, parseJestFnCall } from './utils';
33

44
export default createRule({

src/rules/prefer-lowercase-title.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint, TSESTree } from '@typescript-eslint/utils';
1+
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
22
import {
33
CallExpressionWithSingleArgument,
44
DescribeAlias,

src/rules/require-top-level-describe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESTree } from '@typescript-eslint/utils';
1+
import type { TSESTree } from '@typescript-eslint/utils';
22
import { createRule, isTypeOfJestFnCall, parseJestFnCall } from './utils';
33

44
const messages = {

src/rules/utils/__tests__/detectJestVersion.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { spawnSync } from 'child_process';
22
import * as fs from 'fs';
33
import * as os from 'os';
44
import * as path from 'path';
5-
import { JSONSchemaForNPMPackageJsonFiles } from '@schemastore/package';
5+
import type { JSONSchemaForNPMPackageJsonFiles } from '@schemastore/package';
66
import { create } from 'ts-node';
77
import { detectJestVersion } from '../detectJestVersion';
88

src/rules/utils/__tests__/parseJestFnCall.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { JSONSchemaForNPMPackageJsonFiles } from '@schemastore/package';
1+
import type { JSONSchemaForNPMPackageJsonFiles } from '@schemastore/package';
22
import { TSESLint, TSESTree } from '@typescript-eslint/utils';
33
import dedent from 'dedent';
44
import { espreeParser } from '../../__tests__/test-utils';
@@ -76,7 +76,7 @@ const rule = createRule({
7676
messageId: 'details',
7777
node,
7878
data: {
79-
data: JSON.stringify(sorted, (key, value) => {
79+
data: JSON.stringify(sorted, (_key, value) => {
8080
if (isNode(value)) {
8181
if (isSupportedAccessor(value)) {
8282
return getAccessorValue(value);

0 commit comments

Comments
 (0)