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

enforced lint to avoid console.* in prod #187

Merged
merged 10 commits into from
Dec 19, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ jobs:
working-directory: frontend
run: npm run format

- name: Run npm lint
- name: Run npm lint check
yashpandey06 marked this conversation as resolved.
Show resolved Hide resolved
working-directory: frontend
run: npm run lint
run: npm run lint:check


code-ql:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ __pycache__
.coverage
.coverage
.env
.env.*
!.env.example
.idea
.local
.npm
Expand Down
12 changes: 11 additions & 1 deletion frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# .env.example: Template for configuring the environment variables for frontend development

# Replace this with your local, staging, or production API URL based on your environment.
VITE_NEST_API_URL=http://localhost:8000/api/v1
VITE_NODE_ENV=local

# Application environment mode (local, staging, production)
# Set this based on the environment you're working in.
VITE_NEST_ENV=local

# Sentry DSN for error tracking (Replace with your actual DSN for your environment)
# This should be updated per environment (local, staging, production).
VITE_NEST_SENTRY_DSN_URL=Default
4 changes: 4 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Node modules and build outputs
node_modules
dist
dist-ssr
Expand All @@ -23,3 +24,6 @@ dist-ssr
*.sln
*.sw?
coverage
.env
.env.*
!.env.example
2 changes: 2 additions & 0 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export default [
'newlines-between': 'always',
},
],
'no-console': 'error',
},
ignores: ['src/utils/logger.ts'],
},
]
2 changes: 2 additions & 0 deletions frontend/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export default {
'!src/reportWebVitals.ts',
'!src/setupTests.ts',
'!src/utils/**',
'!src/ErrorWrapper.tsx',
'!src/sentry.config.ts',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html', 'json-summary'],
Expand Down
Loading
Loading