diff --git a/package.json b/package.json index 11b7c14c..7da60306 100644 --- a/package.json +++ b/package.json @@ -40,15 +40,5 @@ }, "homepage": "http://localhost:8080/react", "license": "https://wisemapping.atlassian.net/wiki/spaces/WS/pages/524357/WiseMapping+Public+License+Version+1.0+WPL", - "husky": { - "hooks": { - "pre-commit": "lint-staged", - "pre-push": "yarn lint && yarn test" - } - }, - "lint-staged": { - "**/*.{ts,tsx}": [ - "prettier --write" - ] - } + } diff --git a/packages/web2d/.eslintrc.json b/packages/web2d/.eslintrc.json index cfb05505..78f2aadb 100644 --- a/packages/web2d/.eslintrc.json +++ b/packages/web2d/.eslintrc.json @@ -11,5 +11,12 @@ "ecmaVersion": 12 }, "rules": { - } -} + "max-len": [0, 200], + "no-underscore-dangle": "off", + "no-restricted-syntax": "off", + "guard-for-in": "off", + "no-plusplus": "off" + }, + "plugins": ["only-warn"] + +} \ No newline at end of file diff --git a/packages/web2d/lib/components/Element.js b/packages/web2d/lib/components/Element.js index 503de7ff..c6587e1e 100644 --- a/packages/web2d/lib/components/Element.js +++ b/packages/web2d/lib/components/Element.js @@ -1,4 +1,4 @@ -/** +/* * Copyright [2015] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). diff --git a/packages/web2d/lib/components/Elipse.js b/packages/web2d/lib/components/Elipse.js index b93ade6c..905182d1 100644 --- a/packages/web2d/lib/components/Elipse.js +++ b/packages/web2d/lib/components/Elipse.js @@ -1,3 +1,20 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ const Element = require('./Element').default; const Toolkit = require('./Toolkit').default; diff --git a/packages/web2d/lib/components/header.js b/packages/web2d/lib/components/header.js deleted file mode 100644 index d3e7ba26..00000000 --- a/packages/web2d/lib/components/header.js +++ /dev/null @@ -1,23 +0,0 @@ -/* -* Copyright [2015] [wisemapping] -* -* Licensed under WiseMapping Public License, Version 1.0 (the "License"). -* It is basically the Apache License, Version 2.0 (the "License") plus the -* "powered by wisemapping" text requirement on every single page; -* you may not use this file except in compliance with the License. -* You may obtain a copy of the license at -* -* http://www.wisemapping.org/license -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -const web2d = {}; -web2d.peer = { - svg: {}, -}; -web2d.peer.utils = {}; diff --git a/packages/web2d/package.json b/packages/web2d/package.json index 647f1b3a..e28396b4 100644 --- a/packages/web2d/package.json +++ b/packages/web2d/package.json @@ -40,6 +40,7 @@ "eslint-loader": "^4.0.2", "eslint-plugin-import": "^2.24.2", "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-only-warn": "^1.0.3", "eslint-plugin-react": "^7.26.1", "eslint-plugin-react-hooks": "^4.2.0", "html-webpack-plugin": "^5.3.2", diff --git a/yarn.lock b/yarn.lock index 153622ad..8c83ce9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4655,6 +4655,10 @@ eslint-plugin-jsx-a11y@^6.4.1: jsx-ast-utils "^3.1.0" language-tags "^1.0.5" +eslint-plugin-only-warn@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-only-warn/-/eslint-plugin-only-warn-1.0.3.tgz#a75f3a9ded7f03e9808e75ec27f22b644084506e" + eslint-plugin-react-hooks@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556"