mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
chore(style): add keyword spacing rule (#1098)
This commit is contained in:
@ -97,6 +97,7 @@
|
|||||||
"react/jsx-key": "error",
|
"react/jsx-key": "error",
|
||||||
"no-console": "error",
|
"no-console": "error",
|
||||||
"eqeqeq": "error",
|
"eqeqeq": "error",
|
||||||
|
"keyword-spacing": "error",
|
||||||
|
|
||||||
"react/prop-types": "off",
|
"react/prop-types": "off",
|
||||||
"react/display-name": "off",
|
"react/display-name": "off",
|
||||||
|
@ -527,7 +527,7 @@ class App extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderRouter() {
|
renderRouter() {
|
||||||
return(
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route exact path="/result" render={(props) => this.renderHomeIfLoggedIn(<ResultPage {...props} />)} />
|
<Route exact path="/result" render={(props) => this.renderHomeIfLoggedIn(<ResultPage {...props} />)} />
|
||||||
@ -618,7 +618,7 @@ class App extends Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return(
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Header style={{padding: "0", marginBottom: "3px"}}>
|
<Header style={{padding: "0", marginBottom: "3px"}}>
|
||||||
{
|
{
|
||||||
|
@ -450,9 +450,9 @@ export function trim(str, ch) {
|
|||||||
let start = 0;
|
let start = 0;
|
||||||
let end = str.length;
|
let end = str.length;
|
||||||
|
|
||||||
while(start < end && str[start] === ch) {++start;}
|
while (start < end && str[start] === ch) {++start;}
|
||||||
|
|
||||||
while(end > start && str[end - 1] === ch) {--end;}
|
while (end > start && str[end - 1] === ch) {--end;}
|
||||||
|
|
||||||
return (start > 0 || end < str.length) ? str.substring(start, end) : str;
|
return (start > 0 || end < str.length) ? str.substring(start, end) : str;
|
||||||
}
|
}
|
||||||
|
@ -584,9 +584,9 @@ class SignupPage extends React.Component {
|
|||||||
{i18next.t("signup:Have account?")}
|
{i18next.t("signup:Have account?")}
|
||||||
<a onClick={() => {
|
<a onClick={() => {
|
||||||
const linkInStorage = sessionStorage.getItem("signinUrl");
|
const linkInStorage = sessionStorage.getItem("signinUrl");
|
||||||
if(linkInStorage !== null && linkInStorage !== "") {
|
if (linkInStorage !== null && linkInStorage !== "") {
|
||||||
Setting.goToLink(linkInStorage);
|
Setting.goToLink(linkInStorage);
|
||||||
}else{
|
} else {
|
||||||
Setting.goToLogin(this, application);
|
Setting.goToLogin(this, application);
|
||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
|
Reference in New Issue
Block a user