esModuleInterop

This commit is contained in:
shibafu 2020-08-17 18:17:38 +09:00
parent 8641f26350
commit 7d8969e5f1
11 changed files with 17 additions and 16 deletions

View File

@ -1,4 +1,4 @@
import * as Cookies from 'js-cookie';
import Cookies from 'js-cookie';
import { fetchPostJson, fetchDeleteJson, ResponseError } from './fetch';
import { linkCard, pageSelector, deleteCheckinModal } from './tissue';

View File

@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { CheckinForm } from './components/CheckinForm';
const initialState = JSON.parse(document.getElementById('initialState')?.textContent as string);

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
type CheckboxProps = {
id: string;

View File

@ -1,6 +1,6 @@
import * as React from 'react';
import React from 'react';
import { useState } from 'react';
import * as classNames from 'classnames';
import classNames from 'classnames';
import { CheckBox } from './CheckBox';
import { FieldError, StandaloneFieldError } from './FieldError';
import { TagInput } from './TagInput';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
type FieldErrorProps = {
errors?: string[];

View File

@ -1,6 +1,6 @@
import * as React from 'react';
import React from 'react';
import { useEffect, useState } from 'react';
import * as classNames from 'classnames';
import classNames from 'classnames';
import { fetchGet, ResponseError } from '../fetch';
enum MetadataLoadState {

View File

@ -1,6 +1,6 @@
import * as React from 'react';
import React from 'react';
import { useState, useRef } from 'react';
import * as classNames from 'classnames';
import classNames from 'classnames';
type TagInputProps = {
id: string;

View File

@ -1,4 +1,4 @@
import * as Chart from 'chart.js';
import Chart from 'chart.js';
const graph = document.getElementById('global-count-graph') as HTMLCanvasElement;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion

View File

@ -1,4 +1,4 @@
import * as CalHeatMap from 'cal-heatmap';
import CalHeatMap from 'cal-heatmap';
import { subMonths } from 'date-fns';
if (document.getElementById('cal-heatmap')) {

View File

@ -1,5 +1,5 @@
import * as CalHeatMap from 'cal-heatmap';
import * as Chart from 'chart.js';
import CalHeatMap from 'cal-heatmap';
import Chart from 'chart.js';
import { addMonths, format } from 'date-fns';
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion

View File

@ -6,7 +6,8 @@
"moduleResolution": "node",
"strict": true,
"experimentalDecorators": true,
"jsx": "react"
"jsx": "react",
"esModuleInterop": true
},
"include": [
"resources/assets/js/**/*"