Skip to content
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

refactor: general refactor/fixes #797

Merged
merged 16 commits into from
Apr 14, 2019
Merged

refactor: general refactor/fixes #797

merged 16 commits into from
Apr 14, 2019

Conversation

rafaelss95
Copy link
Collaborator

This PR:

  • Fixes the utility function getDecoratorName. Currently, it throws an error if you try to get a name of a decorator that isn't a call expression; (porting from refactor(rule): rework prefer-inline-decorator to accept options #794)
  • Fixes the assertMultipleAnnotated helper (Currently it doesn't work well as I mentioned in other issues/PRs);
  • Changes Boolean checks to the utility function isNotNullOrUndefined (I've added a mini explanation in that file);
  • Adds a tslint rule to enforce file names casing as camelCase;
  • Removes the tslint unused rule variable-name;
  • Adds missing angular decorators in utils;
  • Normalizes the enums, constants, interfaces and types names to Angular-*;

@rafaelss95
Copy link
Collaborator Author

By the way, what's the convention about utils? Should we put every helper into the utils file or we should try to separate in small files?

@mgechev
Copy link
Owner

mgechev commented Mar 24, 2019

Not a big fan of packages called utils in general. If the file grows too much, we should probably think of a better way to organize the helpers.

it('should succeed if a property is decorated with @ContentChild() decorator', () => {
const source = `
const source = `Component
Copy link
Owner

@mgechev mgechev Mar 26, 2019

Choose a reason for hiding this comment

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

This doesn't feel right. How does typescript parses the file successfully?

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 was a bad copy and paste. Fixed.

@rafaelss95 rafaelss95 requested a review from mgechev April 5, 2019 01:20
@rafaelss95
Copy link
Collaborator Author

friendly bump :)

@mgechev
Copy link
Owner

mgechev commented Apr 7, 2019

@wKoza would you be able to help reviewing? I'm on the road for the next two weeks.

@wKoza
Copy link
Collaborator

wKoza commented Apr 7, 2019

@rafaelss95 , I'll take a look at this next week.

Copy link
Collaborator

@wKoza wKoza left a comment

Choose a reason for hiding this comment

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

Some comments and LGTM.

src/angularWhitespaceRule.ts Show resolved Hide resolved
src/templateI18nRule.ts Show resolved Hide resolved
src/util/utils.ts Outdated Show resolved Hide resolved
@wKoza wKoza merged commit 8d816c8 into mgechev:master Apr 14, 2019
@rafaelss95 rafaelss95 deleted the refactor/utils branch April 19, 2019 17:36
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