Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Disallow current/parent folders inside module path #629

Merged

Conversation

IllusionMH
Copy link
Contributor

Fixes #624

This PR disallows references to current and parent directory (e.g. common/../other-folder/App).
This check doesn't depend on allow-siblings argument, and new error will be shown only if path passes checks for relative or parent references at the beginning.

I've removed Mocha tests for no-relative-imports rule, so this is first rule that fully migrated to TSLint format tests.

@JoshuaKGoldberg
Copy link

first rule that fully migrated to TSLint format tests.

Whoohoo!

Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! This'll go into 6.0.

@JoshuaKGoldberg JoshuaKGoldberg merged commit 173c226 into microsoft:master Nov 3, 2018
@IllusionMH
Copy link
Contributor Author

Thanks!
To be honest - I was too lazy to add all cases to mocha tests, and just updated existing TSLint bases tests 😭

@JoshuaKGoldberg
Copy link

Ha, more evidence that the bases tests are the way to go for easier contributing! 😉

@IllusionMH IllusionMH deleted the strict-no-relative-imports-624 branch November 4, 2018 23:31
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0-beta0 milestone Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants