douglascrockford/JSLint — Issue #82: Expected set, but do not want to have a set for a value
Author: mattyclarkson
Created: 2011-10-23 17:03:07+00:00
State: open

```javascript
get level() {
return bb.members.logLevel;
},

error: function (string) {
bb.methods.log.error(string);
},
```

JS lint returns the error:

`Problem at line 792 character 21: Expected 'set' and instead saw 'error'.`

But I don't want to have a set for level, I only want people to be able to `get` it.

Should I always define a `set`?

The above can be fixed (no errors in JS lint) with:

```javascript
get level() {
return bb.members.logLevel;
},
set level(value) {
// Do nothing!
},

error: function (string) {
bb.methods.log.error(string);
},