quick-lint-js

Find bugs in JavaScript programs.

E0025: missing comma between object literal entries

Object literal entries, including methods, are separated by commas. It is an error to write two entries without a comma in between:

const snuffles = {
  age: 7
  meow() {
    console.log("😾")
  }
  eat() {
    console.log("😸")
  }
}

To fix this error, include commas:

const snuffles = {
  age: 7,
  meow() {
    console.log("😾")
  },
  eat() {
    console.log("😸")
  }
}

Introduced in quick-lint-js version 0.2.0.

Documentation for other errors