Skip to content

Commit aa7f35b

Browse files
authored
chore: use base node14 tsconfig (#220)
1 parent f9351a6 commit aa7f35b

File tree

6 files changed

+29
-11
lines changed

6 files changed

+29
-11
lines changed

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ module.exports = {
2525
'error',
2626
{ argsIgnorePattern: '^_', caughtErrors: 'all' },
2727
],
28+
'@typescript-eslint/consistent-type-imports': [
29+
'error',
30+
{ fixStyle: 'inline-type-imports', disallowTypeAnnotations: false },
31+
],
32+
'@typescript-eslint/no-import-type-side-effects': 'error',
2833
'no-else-return': 'error',
2934
'no-negated-condition': 'error',
3035
eqeqeq: ['error', 'smart'],

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@jest/types": "^29.0.2",
5555
"@semantic-release/changelog": "^6.0.0",
5656
"@semantic-release/git": "^10.0.0",
57+
"@tsconfig/node14": "^14.1.2",
5758
"@types/jest": "^29.0.0",
5859
"@types/node": "^16.0.0",
5960
"@types/react": "^17.0.39",

src/Reporter.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
import * as path from 'path';
22
import * as React from 'react';
3-
import { Box, Static, Text, TextProps, render, useApp, useStdout } from 'ink';
3+
import {
4+
Box,
5+
Static,
6+
Text,
7+
type TextProps,
8+
render,
9+
useApp,
10+
useStdout,
11+
} from 'ink';
412
import slash = require('slash');
513
import type { Config } from '@jest/types';
614
import type { AggregatedResult, TestResult } from '@jest/test-result';
715
import {
816
BaseReporter,
9-
ReporterOnStartOptions,
10-
Test,
11-
TestContext,
17+
type ReporterOnStartOptions,
18+
type Test,
19+
type TestContext,
1220
} from '@jest/reporters';
1321
import { SnapshotStatus } from './SnapshotStatus';
1422
import { Summary } from './Summary';

src/shared.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { Box, Text, TextProps } from 'ink';
2+
import { Box, Text, type TextProps } from 'ink';
33
import type { TestResult } from '@jest/test-result';
44
import type { Config } from '@jest/types';
55
import chalk = require('chalk');

tsconfig.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
{
2+
"extends": "@tsconfig/node14/tsconfig.json",
23
"compilerOptions": {
3-
"lib": ["es2017", "dom"],
4-
"target": "es2017",
5-
"module": "commonjs",
6-
"moduleResolution": "node",
4+
"skipLibCheck": false,
75
"jsx": "react",
86
"declaration": false,
97
"isolatedModules": true,
10-
"importsNotUsedAsValues": "error",
118
"noImplicitReturns": true,
12-
"strict": true,
139
// ink requires this
1410
"esModuleInterop": true,
1511
"forceConsistentCasingInFileNames": true,

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,13 @@ __metadata:
16181618
languageName: node
16191619
linkType: hard
16201620

1621+
"@tsconfig/node14@npm:^14.1.2":
1622+
version: 14.1.2
1623+
resolution: "@tsconfig/node14@npm:14.1.2"
1624+
checksum: f5934cebc6c8790b28a145d8abbafcb0bd23a405ebcb790bd9f524a2750757d5675b418583bddaed760894a18a0a59a8cbfec1979c90e388d7ad784a9519193f
1625+
languageName: node
1626+
linkType: hard
1627+
16211628
"@tufjs/canonical-json@npm:2.0.0":
16221629
version: 2.0.0
16231630
resolution: "@tufjs/canonical-json@npm:2.0.0"
@@ -5591,6 +5598,7 @@ __metadata:
55915598
"@jest/types": ^29.0.2
55925599
"@semantic-release/changelog": ^6.0.0
55935600
"@semantic-release/git": ^10.0.0
5601+
"@tsconfig/node14": ^14.1.2
55945602
"@types/jest": ^29.0.0
55955603
"@types/node": ^16.0.0
55965604
"@types/react": ^17.0.39

0 commit comments

Comments
 (0)