Skip to content

chore: improve interop between prettier and eslint#29

Merged
baev merged 9 commits intomainfrom
prettier-eslint-interop
Dec 19, 2024
Merged

chore: improve interop between prettier and eslint#29
baev merged 9 commits intomainfrom
prettier-eslint-interop

Conversation

@delatrie
Copy link
Copy Markdown
Collaborator

  • Set quoteProps to "consistent" to match ESLint's quote-props rule.
  • Set avoidEscape to true for ESLint's @stylistic/quotes rule to match Prettier's formatting behavior when dealing with strings with double quote characters inside (e.g., '"foo"="bar"').

Other changes:

  • Set ignoreRestSiblings to true for ESLint's @typescript-eslint/no-unused-vars rule to prevent false positives in situations like this:
    const { foo, ...rest } = obj; // foo is unused
    We used to put the eslint-disable comments in such cases earlier because removing foo would affect the behavior.
  • Some unneeded eslint-disable comments were removed or loosened.
  • Swap the eslint-config-preact and ../../.eslintrc.cjs extend entries in the ESLint config of web-awesome to prioritize the project settings over the ones in the preact preset. Otherwise, the plain no-unused-vars rule would be used instead of the TypeScript version. Some other rules like @stylistic/quotes would also be misconfigured with regard to the project scope.

@baev baev merged commit 8b41665 into main Dec 19, 2024
@baev baev deleted the prettier-eslint-interop branch December 19, 2024 10:57
Viperwow added a commit that referenced this pull request Apr 18, 2025
- Add `retriesCounter` to the `plugin-awesome`
- Add `retriesCount` to the `web-awesome`
epszaw pushed a commit that referenced this pull request Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants