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

Stylelint doesn't fail on @use & @forward #1441

Closed
olitharp-nci opened this issue Dec 12, 2023 · 0 comments · Fixed by #1515
Closed

Stylelint doesn't fail on @use & @forward #1441

olitharp-nci opened this issue Dec 12, 2023 · 0 comments · Fixed by #1515
Assignees

Comments

@olitharp-nci
Copy link
Contributor

Stylelint doesn't fail on @use & @forward

The following code should fail:

// https://github.com/NCIOCPL/ncids/blob/develop/packages/ncids-css/packages/usa-site-alert/_index.scss
@forward "../../internal-uswds/usa-site-alert/src/styles/usa-site-alert";
@forward "./internal/nci-slim";
@forward "./internal/nci-standard";
@forward "./internal/nci-emergency";
@forward "./internal/nci-info";
@forward "./internal/shared";
@forward "./internal/print";

// https://github.com/NCIOCPL/ncids/blob/develop/packages/ncids-css/packages/usa-site-alert/internal/_nci-emergency.scss
@use "uswds-core" as *;
@use "../../../internal-uswds/usa-site-alert/src/styles/usa-site-alert" as site-alert;

.usa-site-alert--nci-emergency {
	@extend .usa-site-alert--emergency;
	@include set-text-and-bg('emergency', 'disabled-light', 'white');

	.usa-alert {
		&__nci-button {
			&--close {
				@include set-text-and-bg('emergency', 'disabled-light', 'white');
			}

			&--toggle {
				@include set-text-and-bg('emergency', 'disabled-light', 'white');
			}
		}

		.usa-alert__body {
			.usa-alert__nci-list li::marker,
			.usa-link {
				@include set-text-from-bg('emergency', 'disabled-light', 'white');
			}
		}
	}
}

Issue found during the npm. If one of the @forward rules are changed to @import the line fails. My best guess is that there is a stylelint dependency that needed to be updated with #773, which got bumped with the npm install.

olitharp-nci added a commit that referenced this issue Dec 12, 2023
olitharp-nci added a commit that referenced this issue Dec 20, 2023
@olitharp-nci olitharp-nci self-assigned this Jan 3, 2024
olitharp-nci added a commit that referenced this issue Jan 3, 2024
olitharp-nci added a commit that referenced this issue Jan 19, 2024
olitharp-nci added a commit that referenced this issue Jan 19, 2024
bryanpizzillo pushed a commit that referenced this issue Feb 5, 2024
bryanpizzillo pushed a commit that referenced this issue Feb 5, 2024
bryanpizzillo pushed a commit that referenced this issue Feb 14, 2024
bryanpizzillo pushed a commit that referenced this issue Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant