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

Feat(eslint): Introduce ultimate ESLint configuration #37

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

literat
Copy link
Contributor

@literat literat commented Dec 9, 2021

  • integration of base eslint rules and prettier

In future this will be the main config used with most of the configuration and presets like React and Typescript.

  * integration of base eslint rules and prettier
@literat literat requested a review from a team as a code owner December 9, 2021 21:31
@literat literat self-assigned this Dec 9, 2021
@literat literat marked this pull request as draft December 9, 2021 21:31
@literat
Copy link
Contributor Author

literat commented Dec 9, 2021

There is and an incompatibility between eslint and prettier. We want to tell prettier not to format javascript files but we do not want to ignore them. If I ignore javascript files using .prettierignore, there will be ignored by this configuration as well.¨

However we want to format with prettier other files like markdown docs and readmes.

Possible solution is to enumerate file extensions which we want to format in script definition in package.json, like prettier --check 'src/**/*.{js,jsx,ts,tsx,scss}'.
Or in this case we blame again the printWidth option which must be same for entire project.

I am also suggesting that we should define different printWidth for different filetype, eg. 120 is fine for files like markdown, maybe html, but 80 is better for javascript, typescript and json. For some files may be better to use 100. I think that 120 do not suit for everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants