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

chore: lint and typecheck top level #8880

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

abrahamguo
Copy link
Contributor

@abrahamguo abrahamguo commented Apr 7, 2024

PR Checklist

Overview

Ensure all files outside of packages are linted and typechecked.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @abrahamguo!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Apr 7, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit ec884d6
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/669d61c12c551c0008548e05
😎 Deploy Preview https://deploy-preview-8880--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97 (🟢 up 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@abrahamguo abrahamguo changed the title lint and typecheck top level chore: lint and typecheck top level Apr 7, 2024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of adding in "secondary" code paths, like having two ways of running linting or type checking &&d together. It'd be less code & complexity to get the "primary" (npx nx ...) commands working as expected.

Let's fine a way to include what's under .github/ and tools/ under nx. packages/repo-tools now exists, maybe that's a good place for some files?

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this!

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label May 26, 2024
@bradzacher bradzacher added documentation Documentation ("docs") that needs adding/updating repo maintenance things to do with maintenance of the repo, and not with code/docs and removed documentation Documentation ("docs") that needs adding/updating labels May 28, 2024
@abrahamguo
Copy link
Contributor Author

It turns out that wait-for-netlify became unused in #7730

@github-actions github-actions bot removed the awaiting response Issues waiting for a reply from the OP or another party label Jun 2, 2024
@JoshuaKGoldberg JoshuaKGoldberg removed the request for review from JamesHenry June 2, 2024 14:43
@abrahamguo
Copy link
Contributor Author

@JoshuaKGoldberg I've moved all scripts from .github and tools into packages/repo-tools.

However, let me know your thoughts about the remaining files which are still at the top level:

eslint.config.js
eslint.config.mjs
jest.config.base.js
typings/eslint-plugin-eslint-comments.d.ts
typings/eslint-plugin-eslint-plugin.d.ts
typings/eslint-plugin-import.d.ts
typings/eslint-plugin-jsdoc.d.ts
typings/eslint-plugin-jest.d.ts
typings/eslint-plugin-jsx-a11y.d.ts
typings/eslint-plugin-react-hooks.d.ts
typings/eslint-plugin-react.d.ts
knip.ts
typings/eslint-plugin-simple-import-sort.d.ts
typings/eslint-plugin-unicorn.d.ts
typings/eslint__eslintrc.d.ts
typings/eslint__js.d.ts

@@ -40,21 +40,19 @@
"lint-markdown-fix": "yarn lint-markdown --fix",
"lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
"lint-stylelint": "npx nx lint website stylelint",
"lint": "npx nx lint eslint-plugin --skip-nx-cache && npx nx run-many --target=lint --parallel --exclude eslint-plugin",
"lint": "npx nx lint eslint-plugin --skip-nx-cache && npx nx run-many --target=lint --parallel --exclude eslint-plugin && eslint . --ignore-pattern=packages --cache",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still does the && strategy 😕. Surely there's got to be a way in Nx to set up a project to include root-level files, so the npx nx run-many --target=lint run would include them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, I can look into that

@JamesHenry
Copy link
Member

I can provide feedback tomorrow, in all day planning meetings today

Copy link
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just adding a blocker until I can look tomorrow

@JoshuaKGoldberg
Copy link
Member

👋 @JamesHenry is this still something you want to look at?

@JamesHenry
Copy link
Member

@abrahamguo I have just updated the repo to use nx latest (19.4.0) and am pulling down your branch now to look at it. I will update the merge conflicts

@JoshuaKGoldberg
Copy link
Member

👋 @abrahamguo just checking in, are you still waiting on us for anything?

We're hoping to close out v8 tasks soon, so we're going to start applying more time pressure on this and other PRs that address issues in the v8 milestone. Just a heads up. 🙂

@abrahamguo
Copy link
Contributor Author

I'm not very familiar with nx, so I'll need to do some research on how to set up a new nx project for the root files.
I'll see if I can look at this sometime in the next week, unless you want to say "linting the root-level files without nx is good enough for now".
However, how does this PR relate to anything happening for v8?

@JamesHenry
Copy link
Member

@JoshuaKGoldberg this is my fault I didn’t get to push up my updates before my vacation without my laptop. I return on Friday evening so will get to it this weekend or latest beginning of next week.

thank you @abrahamguo for your patience and understanding

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.45%. Comparing base (863eb86) to head (ec884d6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8880   +/-   ##
=======================================
  Coverage   88.45%   88.45%           
=======================================
  Files         422      422           
  Lines       14694    14694           
  Branches     4299     4299           
=======================================
  Hits        12997    12997           
  Misses       1372     1372           
  Partials      325      325           
Flag Coverage Δ
unittest 88.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@JoshuaKGoldberg
Copy link
Member

However, how does this PR relate to anything happening for v8?

Heh, the chain is a bit convoluted. It's blocking #8196, which we're considering something we should do internally as a form of validation before launching v8 as stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo: files outside of packages are not being linted or typechecked
5 participants