1
0
Fork 1
forked from fedi/mastodon

Fail ESLint for Warnings in CI (#24836)

This commit is contained in:
Nick Schonning 2023-05-04 03:48:50 -04:00 committed by GitHub
parent 27bafabb64
commit f95125bd04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -48,7 +48,7 @@ jobs:
run: yarn --frozen-lockfile
- name: ESLint
run: yarn test:lint:js
run: yarn test:lint:js --max-warnings 0
- name: Typecheck
run: yarn test:typecheck

View file

@ -21,10 +21,9 @@ export default class ColumnBackButton extends React.PureComponent {
if (onClick) {
onClick();
}
// Check if there is a previous page in the app to go back to per https://stackoverflow.com/a/70532858/9703201
// When upgrading to V6, check `location.key !== 'default'` instead per https://github.com/remix-run/history/blob/main/docs/api-reference.md#location
else if (router.location.key) {
} else if (router.location.key) {
router.history.goBack();
} else {
router.history.push('/');