Skip to content

Commit

Permalink
feat: Disallow comma operators (#920)
Browse files Browse the repository at this point in the history
This is often an accident, such as in

```typescript
assert.throws(() => {
  func(), Error;
});
```

That code should instead be:

```typescript
assert.throws(() => {
  func();
}, Error);
```
  • Loading branch information
l0b0 authored Mar 1, 2024
1 parent bf511b2 commit 9c6d818
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ module.exports = {
// Default simple-import-sort rules
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',

// Disallow comma operators
'no-sequences': 'error',
},

overrides: [
Expand Down

0 comments on commit 9c6d818

Please sign in to comment.