Skip to content

fix(dev): Correctly lint scripts typescript files #4963

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 1 commit into from
Apr 21, 2022

Conversation

lobsterkatie
Copy link
Member

Previously, we've had to tell eslint to ignore TS files in package-level scripts directories, because they weren't included by any existing TS eslint config. This fixes that, by adding them to both our main .eslintrc.js and (since that new entry needs a tsconfig to which to point) our main tsconfig.json.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.19 KB (+0.62% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 64.26 KB (-0.44% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.82 KB (+0.24% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 57.91 KB (-0.08% 🔽)
@sentry/browser - Webpack (gzipped + minified) 23.36 KB (+0.65% 🔺)
@sentry/browser - Webpack (minified) 81.14 KB (-1.59% 🔽)
@sentry/react - Webpack (gzipped + minified) 23.41 KB (+0.67% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.95 KB (-0.1% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.03 KB (+0.2% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.4 KB (-0.03% 🔽)

@lobsterkatie lobsterkatie merged commit ac7f186 into 7.x Apr 21, 2022
@lobsterkatie lobsterkatie deleted the kmclb-fix-scripts-eslint-config branch April 21, 2022 23:15
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone Apr 25, 2022
Lms24 pushed a commit that referenced this pull request Apr 26, 2022
Previously, we've had to tell eslint to ignore TS files in package-level `scripts` directories, because they weren't included by any existing TS eslint config. This fixes that, by adding them to both our main `.eslintrc.js` and (since that new entry needs a tsconfig to which to point) our main `tsconfig.json`.
lobsterkatie added a commit that referenced this pull request Apr 26, 2022
Previously, we've had to tell eslint to ignore TS files in package-level `scripts` directories, because they weren't included by any existing TS eslint config. This fixes that, by adding them to both our main `.eslintrc.js` and (since that new entry needs a tsconfig to which to point) our main `tsconfig.json`.
lobsterkatie added a commit that referenced this pull request Apr 26, 2022
Previously, we've had to tell eslint to ignore TS files in package-level `scripts` directories, because they weren't included by any existing TS eslint config. This fixes that, by adding them to both our main `.eslintrc.js` and (since that new entry needs a tsconfig to which to point) our main `tsconfig.json`.
lobsterkatie added a commit that referenced this pull request Apr 27, 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.
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
Previously, we've had to tell eslint to ignore TS files in package-level `scripts` directories, because they weren't included by any existing TS eslint config. This fixes that, by adding them to both our main `.eslintrc.js` and (since that new entry needs a tsconfig to which to point) our main `tsconfig.json`.
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