Skip to content

Commit

Permalink
fix: add frontend eslint check (#2562)
Browse files Browse the repository at this point in the history
Add eslint to CI pipeline
  • Loading branch information
Tymek committed Jan 2, 2023
1 parent b041825 commit 340bcf1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_frontend_prs.yml
Expand Up @@ -23,4 +23,5 @@ jobs:
- run: yarn --frozen-lockfile
- run: yarn run test
- run: yarn run fmt:check
- run: yarn run lint:check
- run: yarn run ts:check # TODO: optimize
3 changes: 2 additions & 1 deletion frontend/package.json
Expand Up @@ -11,7 +11,6 @@
},
"scripts": {
"build": "vite build",
"lint": "yarn fmt:check",
"start": "vite",
"start:prod": "vite build && vite preview",
"start:sandbox": "UNLEASH_API=https://sandbox.getunleash.io/ospro yarn run start",
Expand All @@ -20,6 +19,8 @@
"test": "tsc && vitest run",
"test:snapshot": "yarn test -u",
"test:watch": "vitest watch",
"lint": "eslint --fix ./src",
"lint:check": "eslint ./src",
"fmt": "prettier src --write --loglevel warn",
"fmt:check": "prettier src --check",
"ts:check": "tsc",
Expand Down
Expand Up @@ -188,7 +188,8 @@ const deleteButtonsActiveInChangeRequestEnv = async () => {
// production
const productionStrategyDeleteButton = deleteButtons[0];
expect(productionStrategyDeleteButton).not.toBeDisabled();

});
await waitFor(() => {
// custom env
const customEnvStrategyDeleteButton = deleteButtons[1];
expect(customEnvStrategyDeleteButton).toBeDisabled();
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/component/common/MessageBanner/MessageBanner.tsx
Expand Up @@ -161,11 +161,11 @@ const BannerButton = ({
openDialog,
children,
}: IBannerButtonProps) => {
if (!link) return null;

const navigate = useNavigate();
const tracker = usePlausibleTracker();

if (!link) return null;

const dialog = link === 'dialog';
const internal = !link.startsWith('http');

Expand Down
4 changes: 3 additions & 1 deletion scripts/check-release.sh
Expand Up @@ -7,5 +7,7 @@ yarn run lint
yarn run test

cd frontend
yarn run lint
yarn run ts:check
yarn run lint:check
yarn run fmt:check
yarn run test

0 comments on commit 340bcf1

Please sign in to comment.