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

feat(eslint-plugin): add config that disables type-aware linting #6470

Merged
merged 3 commits into from Feb 15, 2023

Conversation

bradzacher
Copy link
Member

PR Checklist

Overview

Builds on top of the new config tooling to generate a config that disables type-aware linting.

@bradzacher bradzacher added the enhancement New feature or request label Feb 15, 2023
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

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.

@nx-cloud
Copy link

nx-cloud bot commented Feb 15, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 2788df6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

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.

Looks like some unrelated null types got added in? Otherwise looks great!

docs/linting/Configurations.mdx Outdated Show resolved Hide resolved
program?: Program;
project?: string | string[] | true;
program?: Program | null;
project?: string | string[] | true | null;
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed for this PR?

It's also weird to me IMO to have null be an option only for some of these.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added null because it's an explicit value to set these to off that won't get weirdly merged by ESLint's cascading config. It also means the configs can be json-serialized without losing any data (undefined tells a json stringifier to omit the property).

It just means we can be sure these configs are robust.

I also considered using [], but IIRC ESLint's cascading config logic will merge arrays together. Which means that [] is the same as not specifying a value at all.

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Feb 15, 2023
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Feb 15, 2023
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.

Got it, thanks - this is great then. Yay! 🙌

@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #6470 (2788df6) into v6 (aa20f63) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##               v6    #6470      +/-   ##
==========================================
+ Coverage   87.10%   87.12%   +0.01%     
==========================================
  Files         362      362              
  Lines       12471    12473       +2     
  Branches     3688     3688              
==========================================
+ Hits        10863    10867       +4     
+ Misses       1261     1260       -1     
+ Partials      347      346       -1     
Flag Coverage Δ
unittest 87.12% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...-estree/src/parseSettings/getProjectConfigFiles.ts 100.00% <100.00%> (ø)
...ipt-estree/src/parseSettings/resolveProjectList.ts 95.34% <100.00%> (+4.23%) ⬆️

@bradzacher bradzacher merged commit 3b063cf into v6 Feb 15, 2023
@bradzacher bradzacher deleted the 6215-config-disable-type-aware branch February 15, 2023 03:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants