# Source: https://github.com/quick-lint/quick-lint-js/blob/master/docs/errors/E0072.md

# E0072: methods should not use the 'function' keyword

Classes and object literals can contain methods. It is an error to use the
`function` keyword in a class or object literal when defining a method:

```javascript
class Doge {
  function speak() {
    console.log('many woofie');
  }
}
```

To fix this error, remove the `function` keyword:

```javascript
class Doge {
  speak() {
    console.log('many woofie');
  }
}
```

Introduced in quick-lint-js version 0.2.0.