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(eslint): Turn on quotes rules #4671

Merged
merged 2 commits into from Mar 2, 2022
Merged

chore(eslint): Turn on quotes rules #4671

merged 2 commits into from Mar 2, 2022

Conversation

AbhiPrasad
Copy link
Member

Enforces the consistent use of either backticks, double, or single quotes.

https://eslint.org/docs/rules/quotes

Enforces single quotes - which matches our prettier conventions.

> Enforces the consistent use of either backticks, double, or single quotes.

https://eslint.org/docs/rules/quotes

Enforces single quotes - which matches our prettier conventions.
@AbhiPrasad AbhiPrasad requested review from a team, Lms24 and lobsterkatie and removed request for a team March 2, 2022 16:00
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

size-limit report

Path Base Size (fb5d4e6) Current Size Change
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.75 KB 19.74 KB -0.02% 🔽
@sentry/browser - ES5 CDN Bundle (minified) 63.3 KB 63.26 KB -0.08% 🔽
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.42 KB 18.41 KB -0.06% 🔽
@sentry/browser - ES6 CDN Bundle (minified) 56.44 KB 56.39 KB -0.09% 🔽
@sentry/browser - Webpack (gzipped + minified) 22.2 KB 22.19 KB -0.03% 🔽
@sentry/browser - Webpack (minified) 76.23 KB 76.18 KB -0.06% 🔽
@sentry/react - Webpack (gzipped + minified) 22.23 KB 22.22 KB -0.03% 🔽
@sentry/nextjs Client - Webpack (gzipped + minified) 46.39 KB 46.39 KB -0.02% 🔽
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.63 KB 26.63 KB -0.03% 🔽

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Seems like a good change to me!

@AbhiPrasad AbhiPrasad merged commit 889024a into master Mar 2, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-eslint-quote branch March 2, 2022 16:34
Copy link
Member

@lobsterkatie lobsterkatie left a comment

Choose a reason for hiding this comment

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

Does this make Prettier do the `...` -> '...' fix automatically, the way it does with "..." -> '...'? I think no, though, right? This just makes elsint get mad? If so, maybe https://github.com/prettier/prettier-eslint could be rigged to make prettier actually fix this.

P.S. Apparently GH can't handle backticks, even escaped ones, inside of backticks.

@AbhiPrasad
Copy link
Member Author

Does this make Prettier do the ... -> '...' fix automatically, the way it does with "..." -> '...'?

No it doesn't, but the nice thing is that eslint can auto-fix this.

Running yarn fix seemed to work without any problems - we can re-visit if there's a better solution in the future but I think this is fine for now.

@lobsterkatie
Copy link
Member

Just for posterity - actually, prettier does seem to auto-fix this when you save in VSCode. ¯\(ツ)

That said, the fact that every time I add a string to any file, it yells at me until I save and have it fix it (because I am in a forever-habit of using double quotes, which I can't seem to break) is less great, but...

Long run, in our copious free time, it'd be great if we could figure out how to solve the original problem (non-template strings using backticks) without making it as anxious about it as it now is.

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.

None yet

3 participants