Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(eslint-plugin): correct rules.d.ts types to not rely on non-existent imports#9339

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg commentedJun 12, 2024
edited
Loading

PR Checklist

Overview

Removes dependencies fromrules.d.ts that don't exist, so it'll correctly type check for all consumers - even if they don'tskipLibCheck.

💖

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@JoshuaKGoldberg!

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 onhttps://opencollective.com/typescript-eslint.

@JoshuaKGoldbergJoshuaKGoldberg added this to the8.0.0 milestoneJun 12, 2024
@netlifyNetlify
Copy link

netlifybot commentedJun 12, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitb3d2b25
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/668009fd38fb8800084ea8cf
😎 Deploy Previewhttps://deploy-preview-9339--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: 100 (no change 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 yourNetlify site configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedJun 12, 2024
edited
Loading

☁️ Nx Cloud Report

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

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 32 targets

Sent with 💌 fromNxCloud.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I don'tlove this copy & pasting of types between files. But we don't publish.d.ts files underdist/ for this package and don't publishsrc/.

My preference would be to start publishing.d.ts files to move towards a future where folks can strongly type individual rule options in theireslint.config.ts /// @ts-check'deslint.config.js. But that seems like a bigger change, with potential for serious package size increases, out of scope for this PR.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder what if we removeESLintPluginDocs andESLintPluginRuleModule frompackages/eslint-plugin/src/util/createRule.ts and import them frompackages/eslint-plugin/rules.d.ts instead? I don't see any reason why this could end badly 🙂

 import { ESLintUtils } from '@typescript-eslint/utils';-import type {-  RuleModuleWithMetaDocs,-  RuleRecommendation,-  RuleRecommendationAcrossConfigs,-} from '@typescript-eslint/utils/ts-eslint';--export interface ESLintPluginDocs {-  /**-   * Does the rule extend (or is it based off of) an ESLint code rule?-   * Alternately accepts the name of the base rule, in case the rule has been renamed.-   * This is only used for documentation purposes.-   */-  extendsBaseRule?: boolean | string;--  /**-   * If a string config name, which starting config this rule is enabled in.-   * If an object, which settings it has enabled in each of those configs.-   */-  recommended?: RuleRecommendation | RuleRecommendationAcrossConfigs<unknown[]>;--  /**-   * Does the rule require us to create a full TypeScript Program in order for it-   * to type-check code. This is only used for documentation purposes.-   */-  requiresTypeChecking?: boolean;-}+import { ESLintPluginDocs } from '../../rules'; export const createRule = ESLintUtils.RuleCreator<ESLintPluginDocs>(   name => `https://typescript-eslint.io/rules/${name}`, );-export type ESLintPluginRuleModule = RuleModuleWithMetaDocs<-  string,-  readonly unknown[],-  ESLintPluginDocs->;

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I am ... deeply amused at how much better of a solution this is. 😄

@JoshuaKGoldbergJoshuaKGoldberg changed the titlefix(eslint-plugin): use ./dist/util path in rules.d.tsfix(eslint-plugin): correct rules.d.ts types to not rely on non-existent importsJun 25, 2024
@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewJune 25, 2024 18:54
@JoshuaKGoldbergJoshuaKGoldberg requested a review froma teamJune 25, 2024 18:54
@JoshuaKGoldbergJoshuaKGoldberg mentioned this pull requestJun 26, 2024
3 tasks
Copy link
Member

@auvredauvred left a comment

Choose a reason for hiding this comment

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

👍

@auvredauvred merged commit7812072 intotypescript-eslint:v8Jun 29, 2024
62 of 63 checks passed
@JoshuaKGoldbergJoshuaKGoldberg deleted the eslint-plugin-rules-util-path branchJune 29, 2024 13:52
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJul 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher approved these changes

@auvredauvredauvred approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
8.0.0
Development

Successfully merging this pull request may close these issues.

3 participants
@JoshuaKGoldberg@bradzacher@auvred

[8]ページ先頭

©2009-2025 Movatter.jp