Computed properties allow you to define methods and properties of an object or class without having to know exact name of the key.
This rule aims to prevent the use of a computed property when the value being computed is a literal (and could therefore omit the computed property altogether).
The following patterns are considered warnings:
var foo = {
['bar']: true,
}
class Foo {
['bar']() {}
static [123]() {}
}
The following patterns are not warnings:
var foo = {
'bar': true,
baz: true,
[qux]: true,
[buzz()]: true,
}
If you do not care about unnecessarily computed properties, you can safely disable this rule.