Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] [Chore] Add error for unwanted console.logs in the UI #830

Merged
merged 13 commits into from
Nov 19, 2024
Merged
12 changes: 1 addition & 11 deletions .github/workflows/dev-fe-gatekeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@
name: FE CI Gatekeeper
on:
push:
paths:
- "ui/**"
- ".github/workflows/dev-fe-gatekeeper.yaml"
- ".github/workflows/dev-fe-e2e.yaml"
branches:
- main
pull_request:
paths:
- "ui/**"
- ".github/workflows/dev-fe-gatekeeper.yaml"
- ".github/workflows/dev-fe-e2e.yaml"
types: [opened, synchronize]
- chore/add-eslint-warning-for-logs
dianabirs marked this conversation as resolved.
Show resolved Hide resolved

permissions:
contents: write
Expand Down
1 change: 1 addition & 0 deletions ui/apps/everest/move-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const checkDistEnvVarAndMove = async () => {
? envDir
: path.join(process.cwd(), '../..', envDir);

// eslint-disable-next-line no-console
console.log(`Outputting Everest files to: ${outDir}`);

fs.rmSync(outDir, { force: true, recursive: true });
Expand Down
1 change: 1 addition & 0 deletions ui/apps/everest/src/components/nav-item/NavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
onClick,
...listItemProps
}: NavItemProps) => {
console.log('🚀 ~ open:', open);

Check failure on line 22 in ui/apps/everest/src/components/nav-item/NavItem.tsx

View workflow job for this annotation

GitHub Actions / CI_checks (lint)

Unexpected console statement
fabio-silva marked this conversation as resolved.
Show resolved Hide resolved
const navigate = useNavigate();

const redirect = (redirectUrl: string) => {
Expand Down
1 change: 1 addition & 0 deletions ui/apps/everest/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import ReactDOM from 'react-dom/client';
import App from 'App';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const DefaultConfigurations = () => {
});

const onSubmit: SubmitHandler<DefaultConfigurationsType> = (data) => {
// eslint-disable-next-line no-console
console.log(data);
dianabirs marked this conversation as resolved.
Show resolved Hide resolved
};

Expand Down
1 change: 1 addition & 0 deletions ui/packages/eslint-config-react/eslint-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ module.exports = {
],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'no-console': 2,
},
};
Loading