From 074ff80f790e0dc8d741bb9893d59d31825ffe92 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 23 May 2020 14:46:15 +0200 Subject: [PATCH] fix: disable `esModuleInterop` --- .eslintignore | 2 +- .eslintrc.js | 9 +-------- src/Reporter.tsx | 2 +- src/shared.tsx | 4 ++-- tsconfig.json | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.eslintignore b/.eslintignore index 64be67e..d64c4ca 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,2 @@ coverage/ -lib/ +dist/ diff --git a/.eslintrc.js b/.eslintrc.js index 3890d45..04a618b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,7 +25,7 @@ module.exports = { }, rules: { '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], - '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-require-imports': 'off', '@typescript-eslint/ban-ts-ignore': 'warn', '@typescript-eslint/ban-types': 'error', '@typescript-eslint/no-unused-vars': 'error', @@ -60,12 +60,6 @@ module.exports = { }, }, overrides: [ - { - files: ['*.js'], - rules: { - '@typescript-eslint/no-require-imports': 'off', - }, - }, { files: 'src/**/*', parserOptions: { @@ -75,7 +69,6 @@ module.exports = { { files: ['.eslintrc.js', 'babel.config.js'], rules: { - '@typescript-eslint/no-require-imports': 'off', 'import/no-commonjs': 'off', }, }, diff --git a/src/Reporter.tsx b/src/Reporter.tsx index 169c766..7f60cd3 100644 --- a/src/Reporter.tsx +++ b/src/Reporter.tsx @@ -1,7 +1,7 @@ import * as path from 'path'; import * as React from 'react'; import { Box, Color, ColorProps, Static, render, useApp, useStdout } from 'ink'; -import slash from 'slash'; +import slash = require('slash'); import type { Config } from '@jest/types'; import type { AggregatedResult, TestResult } from '@jest/test-result'; import { diff --git a/src/shared.tsx b/src/shared.tsx index 4d60936..f9eec93 100644 --- a/src/shared.tsx +++ b/src/shared.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import { Box, Color, ColorProps } from 'ink'; import type { TestResult } from '@jest/test-result'; import type { Config } from '@jest/types'; -import chalk from 'chalk'; -import slash from 'slash'; +import chalk = require('chalk'); +import slash = require('slash'); import { relativePath } from './utils'; export const Arrow: React.FC = () => <>{' \u203A '}; diff --git a/tsconfig.json b/tsconfig.json index e143fe5..d6ae40c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "importsNotUsedAsValues": "error", "noImplicitReturns": true, "strict": true, - "esModuleInterop": true, + "esModuleInterop": false, "forceConsistentCasingInFileNames": true, "outDir": "dist/" },