We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Summary
The codebase currently contains some hardcode strings like "admin" and "mentors" and it would be better to have those in a central lookup table.
"admin"
"mentors"
Impact to Users
None, this is a code-quality issue.
Additional Information
Some examples of the hardcoded strings in the codebase as came up in a recent review:
discord-shift-swap/slash/edit.js
Line 35 in 40483d5
discord-shift-swap/slash/trade.js
Line 20 in 40483d5
It would be better to store these in a lookup table in some roles.js file like
roles.js
export const ROLES = { ADMIN: "admin", MENTORS: "mentors" }
and then in the individual files you'd
import { ROLES } from './roles.js`
and replace the instances in the code like
"admin" -> ROLES.ADMIN "mentors" -> ROLES.MENTORS
It might not be exactly like the above, but similar.
The text was updated successfully, but these errors were encountered:
Jakemunro
No branches or pull requests
General Information
Summary
The codebase currently contains some hardcode strings like
"admin"
and"mentors"
and it would be better to have those in a central lookup table.Impact to Users
None, this is a code-quality issue.
Additional Information
Some examples of the hardcoded strings in the codebase as came up in a recent review:
discord-shift-swap/slash/edit.js
Line 35 in 40483d5
and
discord-shift-swap/slash/trade.js
Line 20 in 40483d5
There may be others.
It would be better to store these in a lookup table in some
roles.js
file likeand then in the individual files you'd
and replace the instances in the code like
It might not be exactly like the above, but similar.
The text was updated successfully, but these errors were encountered: