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

ref(eslint): Update spaced-comment rule #4235

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Dec 3, 2021

This makes two changes to the spaced-comment rule in our global eslint config:

  • It allows comments to start with /// in addition to //, in order to allow the use of triple-slash directives.

  • In comments which start and end with /* and */, respectively, the basic form of the rule enforces there being a space after the opening token. With this change, it also enforces there being a space before the closing token. The one exception is jsdoc-style block comments, which are allowed to start and end with an extra asterisk.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2021

size-limit report

Path Base Size (3fef982) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 22.45 KB 22.45 KB +0.02% 🔺
@sentry/browser - Webpack 23.29 KB 23.29 KB 0%
@sentry/react - Webpack 23.32 KB 23.32 KB 0%
@sentry/nextjs Client - Webpack 47.98 KB 47.98 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.9 KB 29.9 KB +0.01% 🔺

@lobsterkatie lobsterkatie merged commit cefc919 into master Dec 6, 2021
@lobsterkatie lobsterkatie deleted the kmclb-eslint-allow-triple-slash branch December 6, 2021 14:20
onurtemizkan pushed a commit that referenced this pull request Dec 19, 2021
This makes two changes to the `spaced-comment` rule[1] in our global eslint config:

- It allows comments to start with `///` in addition to `//`, in order to allow the use of triple-slash directives[2].

- In comments which start and end with `/*` and `*/`, respectively,  the basic form of the rule enforces there being a space after the opening token. With this change, it also enforces there being a space before the closing token. The one exception is jsdoc-style block comments, which are allowed to start and end with an extra asterisk.

[1] https://eslint.org/docs/rules/spaced-comment
[2] https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html
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

2 participants