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 eslint/prettier configs #657

Merged
merged 10 commits into from
Aug 18, 2023
Merged

chore: update eslint/prettier configs #657

merged 10 commits into from
Aug 18, 2023

Conversation

AykutSarac
Copy link
Member

@AykutSarac AykutSarac commented Jul 14, 2023

Updates the following:

  • eslint
  • prettier
  • stylelint v14 -> v15

Adds

  • eslint-plugin-lit
  • eslint-plugin-wc

New eslint plugins helped me to notice & fix some errors at components. See 665a03c.

@AykutSarac AykutSarac changed the title Chore/update eslint chore: update eslint/prettier configs Jul 14, 2023
@AykutSarac AykutSarac added the dependencies Pull requests that update a dependency file label Jul 14, 2023
@ogunb
Copy link
Contributor

ogunb commented Jul 20, 2023

Should we disable whitespace-sensitive formatting?

Screenshot 2023-07-20 at 15 13 26

Other than that, lgtm. Eline sağlık.

@AykutSarac
Copy link
Member Author

Should we disable whitespace-sensitive formatting?

Screenshot 2023-07-20 at 15 13 26 Other than that, lgtm. Eline sağlık.

Each file seem to have its own parser according to Prettier, also this blog post is from 2018 so I have doubts it does have an effect on us. Unit tests also does pass.

@AykutSarac
Copy link
Member Author

Added 2 new eslint plugins for web components & lit. Additionally they helped me to identify some errors at existing components and tests.

@ogunb
Copy link
Contributor

ogunb commented Jul 24, 2023

Each file seem to have its own parser according to Prettier, also this blog post is from 2018 so I have doubts it does have an effect on us. Unit tests also does pass.

I meant as a styling choice. I don't really like current span formatting but, it also prevents unwanted spacing issue.

That being said, If the spacing doesn't matter, we can just add spaces before and after the text and it will format regularly. So, no big deal.

@AykutSarac
Copy link
Member Author

AykutSarac commented Jul 24, 2023

Each file seem to have its own parser according to Prettier, also this blog post is from 2018 so I have doubts it does have an effect on us. Unit tests also does pass.

I meant as a styling choice. I don't really like current span formatting but, it also prevents unwanted spacing issue.

That being said, If the spacing doesn't matter, we can just add spaces before and after the text and it will format regularly. So, no big deal.

I see. Just to confirm, what is the option for this config?
I've tried "htmlWhitespaceSensitivity": "ignore" (the opposite didn't do any changes) assuming it was the config you were referring to and it produced some unwanted results:

const content = this.embedUrl
      ? html`<iframe src=${this.embedUrl}></iframe>`
      : html`<slot></slot>`;
 const content = this.embedUrl
      ? html`
          <iframe src=${this.embedUrl}></iframe>
        `
      : html`
          <slot></slot>
        `;

...

const inputSelectedOptions = html`<ul class="selected-options">
      ${this._selectedOptions.map(item => html`<li>${item.textContent}</li>`)}
    </ul>`;
const inputSelectedOptions = html`
      <ul class="selected-options">
        ${this._selectedOptions.map(
          item =>
            html`
              <li>${item.textContent}</li>
            `
        )}
      </ul>
    `;

@AykutSarac AykutSarac added the ready to merge The PR is ready to be merged label Jul 28, 2023
.prettierrc.json Outdated Show resolved Hide resolved
@AykutSarac AykutSarac merged commit 1d5209d into next Aug 18, 2023
4 checks passed
@AykutSarac AykutSarac deleted the chore/update-eslint branch August 18, 2023 14:54
@github-actions
Copy link

🎉 This PR is included in version 2.3.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@AykutSarac AykutSarac mentioned this pull request Oct 12, 2023
@github-actions
Copy link

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ready to merge The PR is ready to be merged released on @beta released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants