Skip to content

Unexpected property "ignoreReadonly" in svelte/prefer-const #1238

Closed
@uh-zuh

Description

@uh-zuh

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

9.28.0

What version of eslint-plugin-svelte are you using?

3.9.0

What did you do?

Configuration
'svelte/prefer-const': [
    'error',
    {
        destructuring:  'all',
        ignoreReadonly: true,
    },
]

I've added option ignoreReadonly described here:
https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
and then run npm run lint:dev

What did you expect to happen?

No errors

What actually happened?

Error: Key "rules": Key "svelte/prefer-const":
        Value {"destructuring":"all","ignoreReadBeforeAssign":false,"ignoreReadonly":true} should NOT have additional properties.
                Unexpected property "ignoreReadonly". Expected properties: "destructuring", "ignoreReadBeforeAssign", "excludedRunes".

Link to GitHub Repo with Minimal Reproducible Example

https://eslint-online-playground.netlify.app/#eNp1VE2P2yAQ/SsWF9pog5O4lbLppYdur616Da1E7bHFFoMFONrVKv+9fMVhHWdkyXjmveExw/gNGV2XFowl5gTCAjqg7a5CDwiM4NKSWsmWd+TZuADvB6VtYV8HMLXmg30KmKLVqi/w1b2OXPyFykSJuSP8J9MGdCLFQCKshxC6xxNjx2XiXQjBt44wz6MSXgKzgZaN4lZsOtAHKgtnb/HlDV4syMYciuPV5+1WQkphjrgVzJYaatX3jgsN/v1wJefrlgu4TY1Xq3KV6o7vMAWT3cg6+DFYrqTLkUn2Fkt2WFQbQlmuK/5etlQIzb47wU++IibijviiMxfn7Zx952s9hiPPNsCDhhb02pXQWDzJxqpt8woEX9ywnDFmNQxI0FrpOX/W39wad9/1WNtRc9k5EZgJsUT3xjupNPwC1igpXg+FI8ICND/6vIeXmH9/dJfUTdfA6n+uq26ulHSTFXRSJFkPFB3cyk8kRYFH0aD5idkQmXan6ATaNyfiN2RDthPBX/ro71Xj+jAFGjh9g8HfVVlzMB6TSkTR1zhT5XNwU/Tnkez2ZJO4AWFNvPplbE3CfXZ7f8pgMc+9JEuTm7AVeXwHne1SVWS7y8LWZfqbojuyn85/qUAc+4m+J9UiIP18Es6hKi/C485Uuged/wPjm4Ft

Additional comments

Seems like doc is outdated.
It's need to remove ignoreReadonly and add ignoreReadBeforeAssign option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions