Skip to content

build: Convert utils, apm, angular, gatsby, ember to eslint #2804

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 12 commits into from
Aug 11, 2020

Conversation

AbhiPrasad
Copy link
Member

  • build: Switch @sentry/utils to using eslint
  • build: Switch @sentry/apm to using eslint
  • build: Switch @sentry/angular to using eslint
  • build: Switch @sentry/gatsby to using eslint
  • build: Switch @sentry/ember to using eslint (Basically already was using eslint)

Also updated so that lint would update cache - that should further reduce lint times (we can also store cache in github actions -> reduce CI time even more). It stores all the cache files in a top level folder called eslintcache.

Added some new rules:

// Prefer for-of loop over for loop if index is only used to access array
'@typescript-eslint/prefer-for-of': 'error',

// Make sure all expressions are used. Turned off in tests
// Must disable base rule to prevent false positives
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'error',

// Make sure Promises are handled appropriately
'@typescript-eslint/no-floating-promises': 'error',

// Do not use deprecated methods
'deprecation/deprecation': 'error',

What is left:

packages/integrations/**/*
packages/node/**/*
packages/react/**/*
packages/tracing/**/*
packages/typescript/**/*

@AbhiPrasad AbhiPrasad requested a review from HazAT August 10, 2020 18:42
@github-actions
Copy link
Contributor

github-actions bot commented Aug 10, 2020

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 17.65 KB (-0.01% 🔽)
@sentry/browser - Webpack 18.41 KB (0%)
@sentry/react - Webpack 18.41 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 22.64 KB (-0.01% 🔽)

@getsentry-bot
Copy link
Contributor

getsentry-bot commented Aug 10, 2020

Fails
🚫 Fatal error linting packages/ember/addon/index.ts with eslint.
Warnings
⚠️ Please add a changelog entry for your changes.
Messages
📖

@sentry/browser bundle gzip'ed minified size: (ES5: 17.249 kB) (ES6: 16.3477 kB)

📖 ✅ TSLint passed

Generated by 🚫 dangerJS against cf4b5e6

@kamilogorek
Copy link
Contributor

I went throught config files and they look good. As for the code part, if it lints, it lints ¯_(ツ)_/¯

@HazAT HazAT merged commit 6229e27 into master Aug 11, 2020
@HazAT HazAT deleted the abhi/eslint-part-3 branch August 11, 2020 09:44
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.

4 participants