Skip to content

Commit

Permalink
chore: disallow == and != (#605)
Browse files Browse the repository at this point in the history
This enables the [ESLint eqeqeq rule][0], requiring `===` and `!==` over
`==` and `!=`.

[0]: https://eslint.org/docs/latest/rules/eqeqeq
  • Loading branch information
EvanHahn authored May 6, 2024
1 parent b7226aa commit b780898
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"sourceType": "module"
},
"rules": {
"eqeqeq": "error",
"no-unused-vars": [
"error",
{
Expand Down
2 changes: 1 addition & 1 deletion src/mapeo-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ export class MapeoProject extends TypedEmitter {

// Determine if the the device is a coordinator based on the role docs
const isCoordinator = roleDocs.some(
(doc) => doc.docId === deviceId && doc.roleId == COORDINATOR_ROLE_ID
(doc) => doc.docId === deviceId && doc.roleId === COORDINATOR_ROLE_ID
)

if (isCoordinator) {
Expand Down

0 comments on commit b780898

Please sign in to comment.