Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,20 @@

The web interface is a [React app](https://github.com/facebook/create-react-app), served by [nginx](https://nginx.org/en/) in [Docker](https://www.docker.com/).
The front-end application was initially generated from [create-react-app](https://github.com/facebook/create-react-app).

## eslint policies
Commits that introduce lint violations break the build. If this happens, it is the responsibility of the original author
to fix any violations. If you think an exception to a rule should be made for some reason, you should add
an `// eslint-disable` directive to the line above the violating piece of code. This turns off the rule for the
specific occurrence of the issue.

The repo also contains an `eslint-suppressions` file. This is for lint violations that have been introduced with the
addition of new eslint rules (or had been introduced before we started using eslint). This file should only ever
decrease in size, when a legacy violation is fixed. That is, newly introduced lint violations should never be added to the
suppressions file. The only exception to this rule is when a commit introduces a new eslint rule, and you deem that
fixing existing the violations would be too expensive. In this case, running `yarn run lint --fix --suppress-all` will
attempt to autofix violations, and if any violations cannot be fixed, they are added to the suppressions file.

When you fix a legacy violation, it is nice to remove these from the suppressions file by running `yarn run lint:prune`.
We should periodically do this. However, the build is configured not to break when there are outdated suppressions in
the file, so this is not, strictly speaking, necessary after each fixed violation.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"test-ada-visual": "python3 vrt-in-docker.py ada",
"test-ada-visual-update-baseline": "python3 vrt-in-docker.py ada --update-baselines",
"lint": "eslint -c eslint.config.mjs src/",
"lint:ci": "CI=true yarn run lint --max-warnings=0",
"lint:ci": "CI=true yarn run lint --max-warnings=0 --pass-on-unpruned-suppressions",
"lint:prune": "CI=true yarn run lint --prune-suppressions",
"build-stats-phy": "webpack --env prod --config config/webpack.config.physics.js --profile --json > bundle-stats-phy.json",
"analyse-bundle-phy": "webpack-bundle-analyzer bundle-stats-phy.json build-phy",
"build-stats-ada": "webpack --env prod --config config/webpack.config.ada.js --profile --json > bundle-stats-ada.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ export const AbstractListViewItem = ({title, icon, subject, subtitle, breadcrumb
const isDisabled = state && [AbstractListViewItemState.COMING_SOON, AbstractListViewItemState.DISABLED].includes(state);

fullWidth = fullWidth || below["sm"](deviceSize) || (isItem && !(typedProps.status || typedProps.audienceViews));
const cardBody =
<div className="w-100 d-flex flex-row">
const cardBody = <div className="w-100 d-flex flex-row">
<Col className={classNames("d-flex flex-grow-1", {"mt-3": isCard, "mb-3": isCard && !typedProps.linkTags?.length})}>
<div className="position-relative">
{icon && (
Expand Down