Skip to content
Open
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
2 changes: 0 additions & 2 deletions .claude/commands/lint-enforce.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ Please follow the following process when I ask you to enfore a new lint rule usi
8. Add the changes
9. Commit the changes
10. Push the changes

You do not need to ask before updating biome.json, running tests, using --fix in safe mode, fetching coment from biomejs.dev, or updating the changelog
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Replace string concatenation with modern template literals
- Remove redundant 'use strict' directives as modules are automatically in strict mode
- Refactor assignment-in-expression patterns to improve code clarity and readability
- Replace Object.prototype.hasOwnProperty() with safer Object.hasOwn() method
- Enforce strict equality checks (=== and !==) instead of loose equality (== and !=)
- Replace global isNaN with Number.isNaN for safer type checking
- Ensure no variable redeclarations exist to prevent shadowing issues
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"noAsyncPromiseExecutor": "off",
"noGlobalIsNan": "error",
"noGlobalIsFinite": "error",
"noPrototypeBuiltins": "off",
"noPrototypeBuiltins": "error",
"noVar": "error"
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/codec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function encodeFieldValue(buffer, value, offset) {
let type = typeof value,
val = value;
// A trapdoor for specifying a type, e.g., timestamp
if (value && type === 'object' && value.hasOwnProperty('!')) {
if (value && type === 'object' && Object.hasOwn(value, '!')) {
val = value.value;
type = value['!'];
}
Expand Down Expand Up @@ -190,7 +190,7 @@ function encodeFieldValue(buffer, value, offset) {
break;
case 'decimal':
tag('D');
if (val.hasOwnProperty('places') && val.hasOwnProperty('digits') && val.places >= 0 && val.places < 256) {
if (Object.hasOwn(val, 'places') && Object.hasOwn(val, 'digits') && val.places >= 0 && val.places < 256) {
buffer[offset] = val.places;
offset++;
buffer.writeUInt32BE(val.digits, offset);
Expand Down