Skip to content

Conversation

@fisker
Copy link
Collaborator

@fisker fisker commented Jul 7, 2019

What I have done:

1, refact getNameReplacements, It should handle more kinds of strings, hope @futpib don't mind
2, update test fix #336 review

@fisker fisker marked this pull request as ready for review July 7, 2019 11:09
Copy link
Contributor

@futpib futpib left a comment

Choose a reason for hiding this comment

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

👍 for the quick follow-up

.map(originalIsInPascalCase ? pascalCase : name => name)
.sort();
};
let options = [[]];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this can be quick loop from 0 to limit, I will figure out later

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's cartesian product, I've done this before but forgot how to calculate

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is changing getWordByWordReplacements even necessary here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I want have a function can get replacements only by word, no matter what cases, file names is more complicated than variable names

@fisker fisker changed the title Update prevent-abbreviations [WIP]Update prevent-abbreviations Jul 7, 2019
@fisker fisker changed the title [WIP]Update prevent-abbreviations Update prevent-abbreviations Jul 8, 2019
@fisker
Copy link
Collaborator Author

fisker commented Jul 8, 2019

@futpib ready for review

@sindresorhus sindresorhus changed the title Update prevent-abbreviations Refactor the prevent-abbreviations rule Sep 5, 2019
@sindresorhus sindresorhus merged commit 9db361f into sindresorhus:master Sep 5, 2019
@sindresorhus
Copy link
Owner

Thanks, @fisker 👍

@fisker fisker deleted the fix-prevent-abbreviations branch September 6, 2019 06:51
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