quick-lint-js

Find bugs in JavaScript programs.

E0269: 'async static' is not allowed; write 'static async' instead

Class methods can have modifiers such as static, async, and *. It is a syntax error to write async static in a class method declaration:

class Database {
  async static connect(host, login, database) {
    let db = await mysql.connect(host, login);
    await db.use(database);
    return new Database(db);
  }
}

To fix this error, replace async static with static async:

class Database {
  static async connect(host, login, database) {
    let db = await mysql.connect(host, login);
    await db.use(database);
    return new Database(db);
  }
}

Documentation for other errors