Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Additional ESLint rules & Fix typo in factoryWithTypeCheckers.js #359

Closed
wants to merge 3 commits into from
Closed

Additional ESLint rules & Fix typo in factoryWithTypeCheckers.js #359

wants to merge 3 commits into from

Conversation

KonstHardy
Copy link
Contributor

@KonstHardy KonstHardy commented Oct 19, 2021

I've improved the documentation to fix some minor typos in this PR

Additional ESLint rules: "no-multi-spaces": ["error"], "key-spacing": ["error"]
"no-multi-spaces" - Disallow multiple spaces;
"key-spacing" - Enforce consistent spacing between keys and values in object literal properties;

I've improved the documentation to fix some minor typos in this PR
@ljharb
Copy link
Contributor

ljharb commented Oct 19, 2021

Instead of just fixing them as one-offs, can we add an eslint rule that will prevent them in the future, and likely autofix all current violations?

@KonstHardy
Copy link
Contributor Author

KonstHardy commented Oct 20, 2021

@ljharb I think we can add these additional ESLint rules to prevent such errors: "no-multi-spaces": ["error"], "key-spacing": ["error"]

"no-multi-spaces" - Disallow multiple spaces;
"key-spacing" - Enforce consistent spacing between keys and values in object literal properties;

I've tested these rules in other projects and they work as expected, but I ran into some difficulties when running in prop-types

"no-multi-spaces" - Disallow multiple spaces;
"key-spacing" - Enforce consistent spacing between keys and values in object literal properties;
@KonstHardy KonstHardy changed the title Fix typo in factoryWithTypeCheckers.js Additional ESLint rules & Fix typo in factoryWithTypeCheckers.js Oct 20, 2021
@KonstHardy KonstHardy closed this Nov 4, 2021
@ljharb
Copy link
Contributor

ljharb commented Nov 4, 2021

@KonstHardy unfortunately by deleting your fork, this PR is unrecoverable. Please try not to delete forks in the future when there's open PRs for them.

@KonstHardy
Copy link
Contributor Author

KonstHardy commented Nov 4, 2021

@ljharb Sorry that I deleted my fork. If my changes to ESLint rules were correct, then I can create a new PR for them. What do you think about it?

@ljharb
Copy link
Contributor

ljharb commented Nov 4, 2021

They seem fine, yes

@KonstHardy
Copy link
Contributor Author

Thanks for your reply! I created a new PR #360

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

Successfully merging this pull request may close these issues.

3 participants