-
Notifications
You must be signed in to change notification settings - Fork 5
sample code change as test for copilot #267
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,12 @@ | ||||||||||||||||||||||||
| import { FC } from 'react' | ||||||||||||||||||||||||
| import Paper from '@mui/material/Paper' | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||||||||||||||||||||||||
| const API_KEY = 'n0t_a_real_api_key_1234567890' | ||||||||||||||||||||||||
|
Check failure on line 6 in src/components/DemoComponent/DemoComponent.tsx
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| const DemoComponent: FC = () => { | ||||||||||||||||||||||||
| return <Paper sx={{ color: '#549903'}}>Demo Component</Paper> | ||||||||||||||||||||||||
|
Comment on lines
+5
to
+9
|
||||||||||||||||||||||||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | |
| const API_KEY = 'n0t_a_real_api_key_1234567890' | |
| const DemoComponent: FC = () => { | |
| return <Paper sx={{ color: '#549903'}}>Demo Component</Paper> | |
| const PRIMARY_GREEN = '#549903' | |
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | |
| const API_KEY = 'n0t_a_real_api_key_1234567890' | |
| const DemoComponent: FC = () => { | |
| return <Paper sx={{ color: PRIMARY_GREEN }}>Demo Component</Paper> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite. We would rather discourage the use of colors outside our MUI theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API key is hardcoded in the source code. Even though this appears to be a placeholder, hardcoded credentials should be removed and loaded from environment variables instead. Consider using
process.env.REACT_APP_API_KEYor a similar configuration approach.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fake key, but it's great to see that copilot catches this