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

New: add no-import-assign (fixes #12237) #12252

Merged
merged 6 commits into from
Sep 14, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add a test
  • Loading branch information
mysticatea committed Sep 12, 2019
commit 3e25a00398286f5f51cea27f7eecea161dbf0ea5
4 changes: 4 additions & 0 deletions tests/lib/rules/no-import-assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ ruleTester.run("no-import-assign", rule, {
{
code: "import * as mod from 'mod'; Reflect.setPrototypeOf(mod, proto)",
errors: [{ messageId: "readonlyMember", data: { name: "mod" }, column: 29 }]
},
{
code: "import mod, * as mod_ns from 'mod'; mod.prop = 0; mod_ns.prop = 0",
errors: [{ messageId: "readonlyMember", data: { name: "mod_ns" }, column: 51 }]
}
]
});