Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add an example Object.assign() for rule no-import-assign #14916

Merged
merged 3 commits into from Aug 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/rules/no-import-assign.md
Expand Up @@ -18,6 +18,7 @@ mod = 1 // ERROR: 'mod' is readonly.
named = 2 // ERROR: 'named' is readonly.
mod_ns.named = 3 // ERROR: the members of 'mod_ns' is readonly.
aladdin-add marked this conversation as resolved.
Show resolved Hide resolved
mod_ns = {} // ERROR: 'mod_ns' is readonly.
Object.assign(mod_ns, { foo: "foo" }) // ERROR: 'mod_ns' is not extensible.
aladdin-add marked this conversation as resolved.
Show resolved Hide resolved
```

Examples of **correct** code for this rule:
Expand Down