Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

allow whitelisted modules to start with @ symbol #4192

Merged
merged 1 commit into from
Dec 12, 2018
Merged

allow whitelisted modules to start with @ symbol #4192

merged 1 commit into from
Dec 12, 2018

Conversation

ifiokjr
Copy link
Contributor

@ifiokjr ifiokjr commented Sep 27, 2018

PR checklist

Overview of change:

For the rule no-implicit-dependencies an array of whitelisted modules can be added. However, this didn't work when trying to whitelist a module that started with an @ symbol.

This is important since projects with custom paths in their compiler options can now use this lint configuration option without the false positives.

With this change, the rule can be used as follows.

"no-implicit-dependencies": [true, ["@components", "@app"]]

CHANGELOG.md entry:

[bugfix]

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @ifiokjr! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@ifiokjr
Copy link
Contributor Author

ifiokjr commented Oct 3, 2018

How do I get this reviewed and merged?

@ifiokjr ifiokjr closed this Oct 3, 2018
@ifiokjr ifiokjr reopened this Oct 3, 2018
@nicogreenarry
Copy link

Looks like maybe you still need to sign the contributor license agreement? I'm just guessing, since I don't see an update from the palbot.

@ifiokjr
Copy link
Contributor Author

ifiokjr commented Oct 18, 2018

@nicogreenarry I had signed pretty early on.

image

@elSuperRiton
Copy link

+1 for this feature. Prefixing modules with ‘@‘ is a fairly common thing to do.

@FernandoEsparrinha
Copy link

This would be really helpful. Any updates ?

@Merott
Copy link
Contributor

Merott commented Oct 31, 2018

I'd also like to see this merged. However, there are code formatting changes in this PR that shouldn't be there. @ifiokjr, perhaps correcting those will speed up the process?

@ifiokjr
Copy link
Contributor Author

ifiokjr commented Nov 3, 2018

@Merott The formatting was caused by a prettier pre-commit rule referenced in the package.json

tslint/package.json

Lines 32 to 34 in 61b0826

"precommit": "npm-run-all precommit:prettier",
"precommit:prettier": "pretty-quick --staged",
"prettier": "prettier --write ./**/*.{js,ts,css,scss,json,md,yml} --ignore-path ./.prettierignore",

	"precommit": "npm-run-all precommit:prettier",
    "precommit:prettier": "pretty-quick --staged",
    "prettier": "prettier --write ./**/*.{js,ts,css,scss,json,md,yml} --ignore-path ./.prettierignore",

I've resubmitted the changes now after running git commit --no-verify.

@elyalvarado
Copy link

@ajafff this is a very common pattern in react-native repos to avoid a lot of relative traversal ../../../../. This PR is very simple and includes tests, can you guys take a look at it?

- tests added for no-implicit-dependencies @ symbols
@ifiokjr
Copy link
Contributor Author

ifiokjr commented Nov 23, 2018

Thanks for the approval @JoshuaKGoldberg 👍
@ajafff Any chance it could be merged?

@ericanderson
Copy link
Member

Sorry about the delays.

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.

10 participants