Why does eslint think this object is never reassigned? (prefer-const)

I am using eslint 4.17.0, which is reporting an issue that number is never reassigned, however I am reassigning it. Can someone explain why do I need to use const in this case?

let test = {
    'number': 1,
    'string': 'asd',
test.number = 99;

// output: 99
    "parser": "babel-eslint",
    "env": {
        "browser": true
    "extends": [
    "rules": {
        "prefer-const": 2

    "parserOptions": {
        "ecmaVersion": 6,
        "sourceType": "module"
[eslint] 'test' is never reassigned. Use 'const' insted. (prefer-const)


  • ES6 const does not indicate that a value is ‘constant’ or immutable. A const value can definitely change. The following is perfectly valid ES6 code that does not throw an exception.

    const foo = {}; = 42;
    // → 42

    In your case, if you know that you are gonna change the properties, try using let.

    Take a look here: