-
Notifications
You must be signed in to change notification settings - Fork 198
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
Converted npm-naming from TSLint to ESLint #681
Merged
Merged
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
fb4ca4b
Converted npm-naming from TSLint to ESLint
JoshuaKGoldberg 0bfae60
Converted npm-naming from TSLint to ESLint
JoshuaKGoldberg 338b006
disable rule in fixtures dir
JoshuaKGoldberg 5142471
Merge branch 'main'
JoshuaKGoldberg 574cc71
Add I think equivalent logic to expectOnly
JoshuaKGoldberg 6e50f20
fix: .eslintrc.json, not tslint.json
JoshuaKGoldberg d1c8033
docs: mention npmNamingOnly in .md files too
JoshuaKGoldberg f7d7c30
Drop new flag
jakebailey 15a91e8
Baseline plugin exports
jakebailey e692e20
Remove npm-naming from preset
jakebailey f2950e0
Formatting
jakebailey 351b5e7
knip
jakebailey 441aeee
Make tslint instance undefined
jakebailey 24cc08f
Undo changes in fixture eslintrc
jakebailey 159dc92
Changeset
jakebailey 151f33b
Forgot to actually enable the rule, oops
jakebailey 81eae93
npm apparently returns a single string when there's one version
jakebailey 4c991ae
Set npm-naming in baseConfig so it can be overridden
jakebailey a0b842d
Fix message for disabling lint
jakebailey File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
{ | ||
"extends": "./dtslint.json", | ||
"rules": { | ||
"npm-naming": [true, { "mode": "code" }] | ||
} | ||
"extends": "./dtslint.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"rulesDirectory": "./dist/rules", | ||
"rules": { | ||
"npm-naming": true | ||
} | ||
"rules": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only use this program to build a list of files; not for this PR, but we're going to have to remove this when we remove tslint so I expect that we will just ask eslint to run on all non-ignored files (which is a lot better than having to find a list of all files here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That being said, since we run type-using rules and also use project=true, it's likely that people will have random files that aren't in the program that may break via ts-eslint complaining about not being in a program, or via new lints that were previously uncaught.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cost reduction:
Linter.createProgram
is a standalonepublic static
, so an equivalent could always be re-written.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, yeah, though it seems a bit overkill to build a Program to only use it to list files!