mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
Add lint to editor
This commit is contained in:
parent
38a2e5865d
commit
b0209e5b3e
@ -6,7 +6,7 @@
|
|||||||
"build": "webpack --config webpack.prod.js",
|
"build": "webpack --config webpack.prod.js",
|
||||||
"playground": "webpack serve --config webpack.playground.js",
|
"playground": "webpack serve --config webpack.playground.js",
|
||||||
"cy:run": "cypress run",
|
"cy:run": "cypress run",
|
||||||
"lint": "eslint src",
|
"lint": "eslint src --ext js,ts,tsx",
|
||||||
"test:integration": "start-server-and-test 'yarn playground' http-get://localhost:8081 'yarn cy:run'",
|
"test:integration": "start-server-and-test 'yarn playground' http-get://localhost:8081 'yarn cy:run'",
|
||||||
"test": "yarn test:integration",
|
"test": "yarn test:integration",
|
||||||
"test:unit": "jest ./test/unit/* --detectOpenHandles",
|
"test:unit": "jest ./test/unit/* --detectOpenHandles",
|
||||||
@ -28,6 +28,7 @@
|
|||||||
"copy-webpack-plugin": "^10.2.1",
|
"copy-webpack-plugin": "^10.2.1",
|
||||||
"css-loader": "^6.7.1",
|
"css-loader": "^6.7.1",
|
||||||
"cypress": "^10.11.0",
|
"cypress": "^10.11.0",
|
||||||
|
"eslint": "^7.14.0",
|
||||||
"cypress-image-snapshot": "^4.0.1",
|
"cypress-image-snapshot": "^4.0.1",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-react": "^7.31.10",
|
"eslint-plugin-react": "^7.31.10",
|
||||||
|
@ -43,7 +43,7 @@ class Capability {
|
|||||||
isHidden(action: ActionType): boolean {
|
isHidden(action: ActionType): boolean {
|
||||||
const mapping = ActionConfigByRenderMode[action];
|
const mapping = ActionConfigByRenderMode[action];
|
||||||
|
|
||||||
let result: boolean = false;
|
let result = false;
|
||||||
if (mapping) {
|
if (mapping) {
|
||||||
// Has been marked in desktop ...
|
// Has been marked in desktop ...
|
||||||
const desktopCapability: EditorRenderMode[] = mapping.desktop?.hidden;
|
const desktopCapability: EditorRenderMode[] = mapping.desktop?.hidden;
|
||||||
|
@ -133,7 +133,7 @@ export const ToolbarSubmenu = (props: {
|
|||||||
if (!o?.render) {
|
if (!o?.render) {
|
||||||
return (
|
return (
|
||||||
<ToolbarMenuItem
|
<ToolbarMenuItem
|
||||||
vertical={!!!props.vertical}
|
vertical={!props.vertical}
|
||||||
key={i}
|
key={i}
|
||||||
configuration={o as ActionConfig}
|
configuration={o as ActionConfig}
|
||||||
elevation={props.elevation + 3}
|
elevation={props.elevation + 3}
|
||||||
|
@ -69,7 +69,7 @@ const WarningDialog = ({ capability, message }: FooterPropsType): React.ReactEle
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if the toolbar is present, the alert must not overlap
|
// if the toolbar is present, the alert must not overlap
|
||||||
var alertTopAdjustmentStyle = 'tryInfoPanelWithToolbar';
|
const alertTopAdjustmentStyle = 'tryInfoPanelWithToolbar';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -13,6 +13,7 @@ const prodConfig = {
|
|||||||
'react-intl': 'react-intl',
|
'react-intl': 'react-intl',
|
||||||
'@emotion/styled': '@emotion/styled',
|
'@emotion/styled': '@emotion/styled',
|
||||||
'@emotion/react': '@emotion/react',
|
'@emotion/react': '@emotion/react',
|
||||||
|
'styled-components': 'styled-components',
|
||||||
},
|
},
|
||||||
plugins: [new CleanWebpackPlugin()],
|
plugins: [new CleanWebpackPlugin()],
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user