mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-21 22:27:56 +01:00
Fix warning on lint
This commit is contained in:
parent
2f6b681016
commit
ab02e12d9f
@ -9,8 +9,23 @@
|
||||
"plugin:react/recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:cypress/recommended"
|
||||
|
||||
],
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
},
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [
|
||||
".js",
|
||||
".ts"
|
||||
]
|
||||
},
|
||||
"webpack": {
|
||||
"config": "./webpack.common.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
|
@ -1,4 +1,20 @@
|
||||
{
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
},
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [
|
||||
".js",
|
||||
".ts"
|
||||
]
|
||||
},
|
||||
"webpack": {
|
||||
"config": "./webpack.common.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
|
@ -89,7 +89,7 @@ const ImportDialog = ({ onClose }: CreateProps): React.ReactElement => {
|
||||
const extensionFile = file.name.split('.').pop();
|
||||
const extensionAccept = ['wxml', 'mm'];
|
||||
|
||||
if (!extensionAccept.includes(extensionFile!)) {
|
||||
if (!extensionFile || !extensionAccept.includes(extensionFile)) {
|
||||
setErrorFile({
|
||||
error: true,
|
||||
message: intl.formatMessage(
|
||||
|
@ -11,5 +11,6 @@ declare global {
|
||||
}
|
||||
|
||||
const container = document.getElementById('root') as HTMLElement;
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
const root = createRoot(container!);
|
||||
root.render(<App />);
|
||||
|
Loading…
Reference in New Issue
Block a user