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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe missing reportedDisables and reportDescriptionlessDisables #4939

Merged
merged 4 commits into from Sep 25, 2020
Merged

Describe missing reportedDisables and reportDescriptionlessDisables #4939

merged 4 commits into from Sep 25, 2020

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Sep 14, 2020

This documentation change adds missing descriptions about:

Which issue, if any, is this issue related to?

Close #4912

Is there anything in the PR that needs further explanation?

In addition, this change unifies the labeling of the stylelint-disable comment for clarity.

If there are any weird phrases, please point them out to me. 馃檹

This documentation change adds missing descriptions about:

- the `reportedDisables` property in the returned data of Node.js API
- the `reportDescriptionlessDisables` option (flag)

Close #4912
@ybiquitous
Copy link
Member Author

NOTE: The following type definitions might help you understand the stylelint API spec:

export type StylelintOptions = {
config?: StylelintConfig;
configFile?: string;
configBasedir?: string;
configOverrides?: Object;
ignoreDisables?: boolean;
ignorePath?: string;
reportInvalidScopeDisables?: boolean;
reportNeedlessDisables?: boolean;
reportDescriptionlessDisables?: boolean;
syntax?: string;
customSyntax?: CustomSyntax;
fix?: boolean;
};

export type StylelintStandaloneReturnValue = {
results: Array<StylelintResult>;
errored: boolean;
output: any;
maxWarningsExceeded?: {
maxWarnings: number;
foundWarnings: number;
};
reportedDisables: StylelintDisableOptionsReport;
descriptionlessDisables?: StylelintDisableOptionsReport;
needlessDisables?: StylelintDisableOptionsReport;
invalidScopeDisables?: StylelintDisableOptionsReport;
};

@ybiquitous ybiquitous marked this pull request as ready for review September 14, 2020 16:03
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

Copy link
Member

@mattxwang mattxwang left a comment

Choose a reason for hiding this comment

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

LGTM, should improve DX 馃憤

@jeddy3 jeddy3 merged commit 248d83c into stylelint:master Sep 25, 2020
@ybiquitous ybiquitous deleted the describe-missing-options branch September 25, 2020 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Document reportDescriptionlessDisables flag
3 participants