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

chore: update prettier config #1354

Merged
merged 3 commits into from
Apr 19, 2024
Merged

chore: update prettier config #1354

merged 3 commits into from
Apr 19, 2024

Conversation

janivo
Copy link
Collaborator

@janivo janivo commented Apr 4, 2024

  • Increase print width for better readability (see below for an example)
  • Avoid parenthesis in arrow functions (e.g.: map(x => x.toString()) instead of map((x) => x.toString()))

Before:

componentDidLoad() {
    this.snackbarInstance = new MDCSnackbar(this.snackbarElement);

    this.snackbarElement.addEventListener(
      'MDCSnackbar:closing',
      this.handleSnackbarHide,
    );
    this.setupTimeout();
    if (this.stayVisibleOnHover) {
      this.snackbarElement.addEventListener(
        'mouseenter',
        this.interruptTimeout,
      );
      this.snackbarElement.addEventListener('mouseleave', this.setupTimeout);
    }
    this.snackbarInstance.open();

    if (this.message) {
      console.warn(
        '[ino-snackbar] The attribute "message" is deprecated, please use the default slot instead.',
      );
    }
  }

After:

  componentDidLoad() {
    this.snackbarInstance = new MDCSnackbar(this.snackbarElement);

    this.snackbarElement.addEventListener('MDCSnackbar:closing', this.handleSnackbarHide);
    this.setupTimeout();
    if (this.stayVisibleOnHover) {
      this.snackbarElement.addEventListener('mouseenter', this.interruptTimeout);
      this.snackbarElement.addEventListener('mouseleave', this.setupTimeout);
    }
    this.snackbarInstance.open();

    if (this.message) {
      console.warn('[ino-snackbar] The attribute "message" is deprecated, please use the default slot instead.');
    }
  }

@BenPag
Copy link
Collaborator

BenPag commented Apr 5, 2024

Do we want to update all files according this configuration? Or do it splitwise by changed files?

BenPag
BenPag previously approved these changes Apr 5, 2024
@janivo janivo added the blocked This issue is blocked by another issue label Apr 5, 2024
@janivo
Copy link
Collaborator Author

janivo commented Apr 5, 2024

TODO: Format all files as soon as we have less open PRs

@janivo janivo removed the blocked This issue is blocked by another issue label Apr 19, 2024
@janivo janivo merged commit 00ddf90 into master Apr 19, 2024
7 checks passed
@janivo janivo deleted the chore/prettier-update branch April 19, 2024 13:24
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.

2 participants