mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Add lint to editor
This commit is contained in:
parent
7598a8562b
commit
38a2e5865d
@ -7,6 +7,7 @@ const prodConfig = {
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
usedExports: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -30,6 +30,15 @@
|
||||
"@typescript-eslint/explicit-module-boundary-types": "error",
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
|
||||
"react-hooks/exhaustive-deps": "warn" // Checks effect dependencies
|
||||
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"patterns": [
|
||||
"@mui/*/*/*",
|
||||
"!@mui/material/test-utils/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
6
packages/editor/.prettierignore
Normal file
6
packages/editor/.prettierignore
Normal file
@ -0,0 +1,6 @@
|
||||
node_modules
|
||||
public
|
||||
dist
|
||||
lang
|
||||
coverage
|
||||
*.json
|
7
packages/editor/.prettierrc.json
Normal file
7
packages/editor/.prettierrc.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"trailingComma": "all",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"printWidth": 100
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
"build": "webpack --config webpack.prod.js",
|
||||
"playground": "webpack serve --config webpack.playground.js",
|
||||
"cy:run": "cypress run",
|
||||
"lint": "eslint src",
|
||||
"test:integration": "start-server-and-test 'yarn playground' http-get://localhost:8081 'yarn cy:run'",
|
||||
"test": "yarn test:integration",
|
||||
"test:unit": "jest ./test/unit/* --detectOpenHandles",
|
||||
@ -28,9 +29,12 @@
|
||||
"css-loader": "^6.7.1",
|
||||
"cypress": "^10.11.0",
|
||||
"cypress-image-snapshot": "^4.0.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-react": "^7.31.10",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"jest-transform-stub": "^2.0.0",
|
||||
"prettier": "^2.7.1",
|
||||
"react": "^18.2.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"ts-jest": "^27.1.0",
|
||||
@ -47,12 +51,15 @@
|
||||
"styled-components": "^5.3.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emotion": "^11.10.5",
|
||||
"@emotion/react": "^11.10.5",
|
||||
"@emotion/styled": "^11.10.5",
|
||||
"@mui/icons-material": "^5.9.3",
|
||||
"@mui/material": "^5.10.11",
|
||||
"lodash": "^4.17.14",
|
||||
"react": "^18.2.0",
|
||||
"react-intl": "^6.2.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-intl": "^6.2.1",
|
||||
"styled-components": "^5.3.6"
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ const prodConfig = {
|
||||
'react-dom': 'react-dom',
|
||||
'react-intl': 'react-intl',
|
||||
'@emotion/styled': '@emotion/styled',
|
||||
'@mui/icons-material': '@mui/icons-material',
|
||||
'@mui/material': '@mui/material',
|
||||
'@emotion/react': '@emotion/react',
|
||||
},
|
||||
plugins: [new CleanWebpackPlugin()],
|
||||
};
|
||||
|
@ -32,7 +32,6 @@
|
||||
"@babel/preset-env": "^7.19.4",
|
||||
"babel-loader": "^8.2.2",
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"core-js": "^3.15.2",
|
||||
"cypress": "^10.11.0",
|
||||
"cypress-image-snapshot": "^4.0.1",
|
||||
"eslint": "^5.16.0",
|
||||
@ -42,7 +41,6 @@
|
||||
"eslint-plugin-cypress": "^2.12.1",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"html-webpack-plugin": "^5.3.2",
|
||||
"jquery": "3.6.0",
|
||||
"nodemon": "^2.0.12",
|
||||
"start-server-and-test": "^1.14.0",
|
||||
"webpack": "^5.74.0",
|
||||
@ -51,6 +49,13 @@
|
||||
"webpack-merge": "^5.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@wisemapping/core-js": "^0.4.0"
|
||||
"@wisemapping/core-js": "^0.4.0",
|
||||
"jquery": "^3.6.0",
|
||||
"core-js": "^3.15.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@wisemapping/core-js": "^0.4.0",
|
||||
"jquery": "^3.6.0",
|
||||
"core-js": "^3.15.2"
|
||||
}
|
||||
}
|
@ -30,7 +30,16 @@
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "error",
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
"react-hooks/rules-of-hooks": "warn" // Checks rules of Hooks
|
||||
// "react-hooks/exhaustive-deps": "warn" // Checks effect dependencies
|
||||
"react-hooks/rules-of-hooks": "warn", // Checks rules of Hooks
|
||||
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"patterns": [
|
||||
"@mui/*/*/*",
|
||||
"!@mui/material/test-utils/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -72,9 +72,7 @@ const App = (): ReactElement => {
|
||||
</Suspense>
|
||||
</Route>
|
||||
<Route exact path="/c/maps/:id/edit">
|
||||
<Suspense fallback={<div></div>}>
|
||||
<EnhacedEditorPage isTryMode={false} />
|
||||
</Suspense>
|
||||
</Route>
|
||||
<Route exact path="/c/maps/:id/try">
|
||||
<Suspense fallback={<div></div>}>
|
||||
|
Loading…
Reference in New Issue
Block a user