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

add linter for css variable names #176769

Merged
merged 1 commit into from
Mar 10, 2023
Merged

add linter for css variable names #176769

merged 1 commit into from
Mar 10, 2023

Conversation

aeschli
Copy link
Contributor

@aeschli aeschli commented Mar 10, 2023

Add a linter that checks that all used variable names that appear in css files are known.

The linter is part of hygiene or can be run with yarn stylelint

All known variables are in a file vscode-known-variables.json. To validate that vscode-known-variables.json is up-to-date, run ./scripts/test-documentation (that test also verifies that all color variables are documented)

This linter just uses regexp on line content, it doesn't understand CSS (in particular comment tokens). In a a follow up PR I have a solution that's based on stylelint.

The PR also fixes some wrongly named variables.

@aeschli aeschli self-assigned this Mar 10, 2023
@aeschli aeschli enabled auto-merge (squash) March 10, 2023 12:37
@VSCodeTriageBot VSCodeTriageBot added this to the March 2023 milestone Mar 10, 2023
@aeschli
Copy link
Contributor Author

aeschli commented Mar 10, 2023

@hediet in the merge editor css, I removed references to colors that do not exist.

.monaco-workbench .merge-editor .merge-editor-block:not(.handled) {
	background-color: var(--vscode-mergeEditor-conflict-unhandledUnfocused-background);
}
.monaco-workbench .merge-editor .merge-editor-block.handled:not(.focused).conflicting {
	background-color: var(--vscode-mergeEditor-conflict-handledUnfocused-background);
}
.monaco-workbench .merge-editor .merge-editor-block.handled.focused.conflicting {
	background-color: var(--vscode-mergeEditor-conflict-handledFocused-background);
}

Please decide if you want to bring them back and add color definitions

@connor4312 Same for the testing.css: --vscode-testingColorRunAction is not a color (yet)

@aeschli aeschli merged commit 780b2f5 into main Mar 10, 2023
@aeschli aeschli deleted the aeschli/causal-ladybug-548 branch March 10, 2023 15:33
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants