Skip to content

Added quick utility script for making a new rule #1089

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

Merged
merged 12 commits into from
Jun 1, 2021

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented May 23, 2021

@Res42's efforts in #1085 reminded me I've been meaning to write this for a little while... should be helpful in setting up new rules, in lieu of #813. Thoughts?

@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for reviewer Waiting for a maintainer to review label May 23, 2021
@Res42
Copy link
Contributor

Res42 commented May 23, 2021

I generated my rules too, so here are some thoughts.

  • I used an optional flag sameArguments that included this in the converter:
...(tslintRule.ruleArguments.length !== 0 && {
    ruleArguments: tslintRule.ruleArguments,
}),
  • I used an optional flag todo that added // TODO: comments when there was complex options or missing tests (when there are options). But I think it is not required to do this here since I did mine as a batch and I wanted to easily find all converters that needed further manual handling.

Enforces that exports and imports are sorted alphabetically, with a fixer for ESLint's `--fix`.

Precursor to #1089 to make it easier to insert lines into `ruleConverters.ts` automatically.
@JoshuaKGoldberg JoshuaKGoldberg changed the base branch from main to simple-import-sort May 28, 2021 05:10
@JoshuaKGoldberg JoshuaKGoldberg added status: waiting for author The PR author should address requested changes and removed status: waiting for reviewer Waiting for a maintainer to review labels May 28, 2021
Base automatically changed from simple-import-sort to main May 28, 2021 21:26
JoshuaKGoldberg pushed a commit that referenced this pull request May 28, 2021
* Enabled eslint-plugin-simple-import-sort internally

* Added eslint-plugin-simple-import-sort

Enforces that exports and imports are sorted alphabetically, with a fixer for ESLint's `--fix`.

Precursor to #1089 to make it easier to insert lines into `ruleConverters.ts` automatically.

* Reset package-lock.json

* Autofix imports
@JoshuaKGoldberg JoshuaKGoldberg removed the status: waiting for author The PR author should address requested changes label May 28, 2021
Copy link
Collaborator

@KingDarBoja KingDarBoja left a comment

Choose a reason for hiding this comment

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

LGTM, and I trust it works even if there are no tests 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants