-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Enables eslint on the full repo and adds a rule for no only()
tests
#3659
Conversation
|
55333c2
to
4dc4ac3
Compare
!packages/astro/**/*.js | ||
!packages/astro/**/*.ts | ||
packages/astro/test/**/*.js | ||
**/*.d.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow all .js and .ts files, ignore .d.ts
packages/astro/test/**/*.js | ||
**/*.d.ts | ||
packages/**/dist/**/* | ||
packages/**/fixtures/**/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable all packages, but skip dist and test fixtures
**/*.d.ts | ||
packages/**/dist/**/* | ||
packages/**/fixtures/**/* | ||
packages/webapi/**/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webapi would need a much larger change to fix ~40 linter errors
@@ -54,9 +54,6 @@ jobs: | |||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |||
with: | |||
eslint: true | |||
eslint_args: --ignore-pattern test --ignore-pattern vendor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing eslint in CI to use the same .eslintignore and .eslintrc.cjs config files
const bundledCSSHREF = $('link[rel=stylesheet][href^=/assets/]').attr('href'); | ||
const bundledCSS = await fixture.readFile(bundledCSSHREF.replace(/^\/?/, '/')); | ||
expect(bundledCSS, 'includes used component classes').to.match(/\.bg-purple-600{/); | ||
const $md = cheerio.load(html); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was shadowing the $
variable shared by all other tests that were loading /index.html
@@ -1,4 +1,4 @@ | |||
import { resolve } from 'path'; | |||
import path from 'path'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolve
was being shadowed in promiseWithoutTimeout
calls
lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only()
PR I've ever wanted! Approved.
My apologies to @bholmesdev
…withastro#3659) * enabling eslint on the all packages and tests * enabling for all packages * TEMP: adding an only() test to verify it fails CI * using our eslint config and ignore in CI * removing the temporary .only() test * update lock file * lint: fixing new test with a no-shadow warning * chore: update lock file
Changes
only()
testsno-console
andno-shadow
errors)Example CI failure when a pull request had a
.only()
test 🎉Testing
N/A
Docs
N/A