chore(style): add keyword spacing rule (#1098)

This commit is contained in:
q1anx1
2022-09-04 19:40:30 +08:00
committed by GitHub
parent 8128671c8c
commit 35676455bc
4 changed files with 7 additions and 6 deletions

View File

@ -97,6 +97,7 @@
"react/jsx-key": "error",
"no-console": "error",
"eqeqeq": "error",
"keyword-spacing": "error",
"react/prop-types": "off",
"react/display-name": "off",

View File

@ -527,7 +527,7 @@ class App extends Component {
}
renderRouter() {
return(
return (
<div>
<Switch>
<Route exact path="/result" render={(props) => this.renderHomeIfLoggedIn(<ResultPage {...props} />)} />
@ -618,7 +618,7 @@ class App extends Component {
</div>
);
} else {
return(
return (
<div>
<Header style={{padding: "0", marginBottom: "3px"}}>
{

View File

@ -450,9 +450,9 @@ export function trim(str, ch) {
let start = 0;
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;
}

View File

@ -584,9 +584,9 @@ class SignupPage extends React.Component {
&nbsp;&nbsp;{i18next.t("signup:Have account?")}&nbsp;
<a onClick={() => {
const linkInStorage = sessionStorage.getItem("signinUrl");
if(linkInStorage !== null && linkInStorage !== "") {
if (linkInStorage !== null && linkInStorage !== "") {
Setting.goToLink(linkInStorage);
}else{
} else {
Setting.goToLogin(this, application);
}
}}>