Skip to content

Commit

Permalink
fix(config.ts): add comment to disable eslint rule for hasOwnProperty…
Browse files Browse the repository at this point in the history
… check

The comment `// eslint-disable-next-line no-prototype-builtins` has been added to disable the eslint rule for the `hasOwnProperty` check. This is necessary because the `hasOwnProperty` method is a built-in JavaScript method and does not need to be explicitly imported.
  • Loading branch information
SHSharkar committed Nov 25, 2023
1 parent fe08f37 commit 8f9d9a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/commands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export const setConfig = (keyValues: [key: string, value: string][]) => {
const config = getConfig() || {};

for (const [configKey, configValue] of keyValues) {
// eslint-disable-next-line no-prototype-builtins
if (!configValidators.hasOwnProperty(configKey)) {
throw new Error(`Unsupported config key: ${configKey}`);
}
Expand Down

0 comments on commit 8f9d9a6

Please sign in to comment.