fix: add frontend eslint check (#2562)

Add eslint to CI pipeline
This commit is contained in:
Tymoteusz Czech
2023-01-02 10:46:32 +01:00
committed by GitHub
parent b0418253c1
commit 340bcf1d1b
5 changed files with 10 additions and 5 deletions
+1
View File
@@ -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
+2 -1
View File
@@ -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",
@@ -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",
@@ -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();
@@ -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');
+3 -1
View File
@@ -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