diff --git a/web/.eslintrc b/web/.eslintrc index 96304384..8ab9e0a4 100644 --- a/web/.eslintrc +++ b/web/.eslintrc @@ -45,6 +45,10 @@ "curly": ["error", "all"], "brace-style": ["error", "1tbs", { "allowSingleLine": true }], "no-mixed-spaces-and-tabs": "error", + "sort-imports": ["error", { + "ignoreDeclarationSort": true + }], + "react/prop-types": "off", "react/display-name": "off", diff --git a/web/src/AccountTable.js b/web/src/AccountTable.js index 58da2648..e0da9780 100644 --- a/web/src/AccountTable.js +++ b/web/src/AccountTable.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {DownOutlined, DeleteOutlined, UpOutlined} from "@ant-design/icons"; +import {DeleteOutlined, DownOutlined, UpOutlined} from "@ant-design/icons"; import {Button, Col, Row, Select, Switch, Table, Tooltip} from "antd"; import * as Setting from "./Setting"; import i18next from "i18next"; diff --git a/web/src/App.js b/web/src/App.js index 35846299..85d626c5 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -17,7 +17,7 @@ import "./App.less"; import {Helmet} from "react-helmet"; import * as Setting from "./Setting"; import {DownOutlined, LogoutOutlined, SettingOutlined} from "@ant-design/icons"; -import {Avatar, BackTop, Dropdown, Layout, Menu, Card, Result, Button} from "antd"; +import {Avatar, BackTop, Button, Card, Dropdown, Layout, Menu, Result} from "antd"; import {Link, Redirect, Route, Switch, withRouter} from "react-router-dom"; import OrganizationListPage from "./OrganizationListPage"; import OrganizationEditPage from "./OrganizationEditPage"; diff --git a/web/src/CropperDiv.js b/web/src/CropperDiv.js index 9efed868..3cee2be1 100644 --- a/web/src/CropperDiv.js +++ b/web/src/CropperDiv.js @@ -16,7 +16,7 @@ import React, {useState} from "react"; import Cropper from "react-cropper"; import "cropperjs/dist/cropper.css"; import * as Setting from "./Setting"; -import {Button, Row, Col, Modal} from "antd"; +import {Button, Col, Modal, Row} from "antd"; import i18next from "i18next"; import * as ResourceBackend from "./backend/ResourceBackend"; diff --git a/web/src/LdapSyncPage.js b/web/src/LdapSyncPage.js index 0b27ec8b..abf207d5 100644 --- a/web/src/LdapSyncPage.js +++ b/web/src/LdapSyncPage.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {Button, Col, Row, Table, Popconfirm} from "antd"; +import {Button, Col, Popconfirm, Row, Table} from "antd"; import * as Setting from "./Setting"; import * as LdapBackend from "./backend/LdapBackend"; import i18next from "i18next"; diff --git a/web/src/PasswordModal.js b/web/src/PasswordModal.js index 01f7e925..43570fb5 100644 --- a/web/src/PasswordModal.js +++ b/web/src/PasswordModal.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Button, Col, Modal, Row, Input} from "antd"; +import {Button, Col, Input, Modal, Row} from "antd"; import i18next from "i18next"; import React from "react"; import * as UserBackend from "./backend/UserBackend"; diff --git a/web/src/ProviderTable.js b/web/src/ProviderTable.js index c15554a1..03208187 100644 --- a/web/src/ProviderTable.js +++ b/web/src/ProviderTable.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {DownOutlined, DeleteOutlined, UpOutlined} from "@ant-design/icons"; +import {DeleteOutlined, DownOutlined, UpOutlined} from "@ant-design/icons"; import {Button, Col, Row, Select, Switch, Table, Tooltip} from "antd"; import * as Setting from "./Setting"; import i18next from "i18next"; diff --git a/web/src/ResetModal.js b/web/src/ResetModal.js index 0765e452..8e6b8b0f 100644 --- a/web/src/ResetModal.js +++ b/web/src/ResetModal.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Button, Col, Modal, Row, Input} from "antd"; +import {Button, Col, Input, Modal, Row} from "antd"; import i18next from "i18next"; import React from "react"; import * as Setting from "./Setting"; diff --git a/web/src/SelectLanguageBox.js b/web/src/SelectLanguageBox.js index d0f8f5ef..51726951 100644 --- a/web/src/SelectLanguageBox.js +++ b/web/src/SelectLanguageBox.js @@ -14,7 +14,7 @@ import React from "react"; import * as Setting from "./Setting"; -import {Menu, Dropdown} from "antd"; +import {Dropdown, Menu} from "antd"; import {createFromIconfontCN} from "@ant-design/icons"; import "./App.less"; diff --git a/web/src/Setting.js b/web/src/Setting.js index 585375b9..04fa3c4c 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {message, Tag, Tooltip} from "antd"; +import {Tag, Tooltip, message} from "antd"; import {QuestionCircleTwoTone} from "@ant-design/icons"; import React from "react"; import {isMobile as isMobileDevice} from "react-device-detect"; diff --git a/web/src/SignupTable.js b/web/src/SignupTable.js index d08910c2..4c0097fc 100644 --- a/web/src/SignupTable.js +++ b/web/src/SignupTable.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {DownOutlined, DeleteOutlined, UpOutlined} from "@ant-design/icons"; +import {DeleteOutlined, DownOutlined, UpOutlined} from "@ant-design/icons"; import {Button, Col, Row, Select, Switch, Table, Tooltip} from "antd"; import * as Setting from "./Setting"; import i18next from "i18next"; diff --git a/web/src/SyncerTableColumnTable.js b/web/src/SyncerTableColumnTable.js index e9768285..bb60591b 100644 --- a/web/src/SyncerTableColumnTable.js +++ b/web/src/SyncerTableColumnTable.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {DownOutlined, DeleteOutlined, UpOutlined} from "@ant-design/icons"; +import {DeleteOutlined, DownOutlined, UpOutlined} from "@ant-design/icons"; import {Button, Col, Input, Row, Select, Switch, Table, Tooltip} from "antd"; import * as Setting from "./Setting"; import i18next from "i18next"; diff --git a/web/src/UrlTable.js b/web/src/UrlTable.js index 7b160ae0..6abf4837 100644 --- a/web/src/UrlTable.js +++ b/web/src/UrlTable.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {DownOutlined, DeleteOutlined, UpOutlined, LinkOutlined} from "@ant-design/icons"; +import {DeleteOutlined, DownOutlined, LinkOutlined, UpOutlined} from "@ant-design/icons"; import {Button, Col, Input, Row, Table, Tooltip} from "antd"; import * as Setting from "./Setting"; import i18next from "i18next"; diff --git a/web/src/WebhookHeaderTable.js b/web/src/WebhookHeaderTable.js index dfdeff39..0afcef2b 100644 --- a/web/src/WebhookHeaderTable.js +++ b/web/src/WebhookHeaderTable.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {DownOutlined, DeleteOutlined, UpOutlined} from "@ant-design/icons"; +import {DeleteOutlined, DownOutlined, UpOutlined} from "@ant-design/icons"; import {Button, Col, Input, Row, Table, Tooltip} from "antd"; import * as Setting from "./Setting"; import i18next from "i18next"; diff --git a/web/src/auth/ResultPage.js b/web/src/auth/ResultPage.js index 85d3e00a..cd2bc262 100644 --- a/web/src/auth/ResultPage.js +++ b/web/src/auth/ResultPage.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {Result, Button} from "antd"; +import {Button, Result} from "antd"; import i18next from "i18next"; import {authConfig} from "./Auth"; import * as Util from "./Util"; diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index babb96b5..b198a0b5 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -14,7 +14,7 @@ import React from "react"; import {Link} from "react-router-dom"; -import {Form, Input, Checkbox, Button, Row, Col, Result, Modal} from "antd"; +import {Button, Checkbox, Col, Form, Input, Modal, Result, Row} from "antd"; import * as Setting from "../Setting"; import * as AuthBackend from "./AuthBackend"; import i18next from "i18next"; diff --git a/web/src/auth/Util.js b/web/src/auth/Util.js index 25311acc..80e4e5b4 100644 --- a/web/src/auth/Util.js +++ b/web/src/auth/Util.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {Alert, Button, message, Result} from "antd"; +import {Alert, Button, Result, message} from "antd"; export function showMessage(type, text) { if (type === "success") {