Skip to content

fix(dev): Fix linting for top-level scripts folder #4977

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

Merged
merged 3 commits into from
Apr 27, 2022

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Apr 26, 2022

This is a follow up to #4963, which aimed to fix linting for ts-node scripts. That PR worked for packages/*/scripts/*.ts, but turned out not to work for the top-level scripts/*.ts, because the glob for file matching in the eslint config override matched both sets of scripts, but the tsconfig being pointed at only worked for package-level scripts. This fixes that by pulling the package-level linting override into the package-level .eslintrc.js, thus allowing the top-level override to apply only to the top-level scripts folder. Also, in order not to have to muck with the main repo tsconfig in any future changes/fixes, both sets of scripts now point to a new, dev-specific tsconfig for their linting. Finally, it fixes linting errors in the top-level build:types:watch script which were brought to light by the newly-fixed linting.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 26, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.35 KB (-8.87% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 57.52 KB (-10.98% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.13 KB (-9.18% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 51.75 KB (-10.73% 🔽)
@sentry/browser - Webpack (gzipped + minified) 20.94 KB (-9.88% 🔽)
@sentry/browser - Webpack (minified) 72.5 KB (-11.28% 🔽)
@sentry/react - Webpack (gzipped + minified) 20.98 KB (-9.89% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.97 KB (-4.34% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.13 KB (-7.45% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 22.64 KB (-7.51% 🔽)

@lobsterkatie lobsterkatie force-pushed the kmclb-fix-top-level-script-linting branch 2 times, most recently from f876074 to 1032798 Compare April 26, 2022 08:11
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone Apr 26, 2022
@lobsterkatie lobsterkatie force-pushed the kmclb-fix-top-level-script-linting branch from f711cdf to 79e7cad Compare April 26, 2022 13:56
@lobsterkatie lobsterkatie force-pushed the kmclb-fix-top-level-script-linting branch from 79e7cad to 86372ce Compare April 26, 2022 16:07
@lobsterkatie lobsterkatie force-pushed the 7.x branch 2 times, most recently from 0040b0f to 299aeb3 Compare April 26, 2022 22:40
@lobsterkatie lobsterkatie force-pushed the kmclb-fix-top-level-script-linting branch from 86372ce to 6572ff9 Compare April 26, 2022 23:01
@lobsterkatie lobsterkatie marked this pull request as ready for review April 26, 2022 23:49
@lobsterkatie lobsterkatie merged commit a5c3808 into 7.x Apr 27, 2022
@lobsterkatie lobsterkatie deleted the kmclb-fix-top-level-script-linting branch April 27, 2022 07:28
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
This is a follow up to #4963, which aimed to fix linting for `ts-node` scripts. That PR worked for `packages/*/scripts/*.ts`, but turned out not to work for the top-level `scripts/*.ts`, because the glob for file matching in the eslint config override matched both sets of scripts, but the tsconfig being pointed at only worked for package-level scripts.  This fixes that by pulling the package-level linting override into the package-level `.eslintrc.js`, thus allowing the top-level override to apply only to the top-level scripts folder. Also, in order not to have to muck with the main repo `tsconfig` in any future changes/fixes, both sets of scripts now point to a new, dev-specific tsconfig for their linting. Finally, it fixes linting errors in the top-level `build:types:watch` script which were brought to light by the newly-fixed linting.
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.

2 participants