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-polaris ] Explore secondary option structure #7814

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
dde827d
Initial README restructure
aaronccasanova Nov 10, 2022
17b51cc
Initial README restructure
aaronccasanova Nov 10, 2022
b203b5a
[stylelint-polaris] Categorize coverage rules (#7617)
chloerice Nov 11, 2022
ea15796
Consolidate `stylelint-polaris` configs (#7700)
aaronccasanova Nov 15, 2022
72a60f3
Merge branch 'stylelint-polaris-v5' of https://github.com/shopify/pol…
aaronccasanova Nov 15, 2022
424839c
Remove Stylelint patches and upgrade version to `^14.15.0` (#7719)
aaronccasanova Nov 15, 2022
debf9c5
Merge branch 'stylelint-polaris-v5' of https://github.com/shopify/pol…
aaronccasanova Nov 15, 2022
41cd2ac
add customSyntax SCSS
chloerice Nov 17, 2022
02ca14c
Merge branch 'stylelint-polaris-v5' of https://github.com/shopify/pol…
aaronccasanova Nov 17, 2022
9843c80
Remove custom disable comment logic in favor of built-in Stylelint co…
aaronccasanova Nov 17, 2022
e35fc4e
Merge remote-tracking branch 'origin/main' into stylelint-polaris-v5
chloerice Nov 18, 2022
2ce801c
[stylelint-polaris] PoC for custom messages
chloerice Nov 10, 2022
10dd6f8
Update coverage plugin to use customMessages and ruleMetadata
chloerice Nov 16, 2022
2ef530d
Add coverage plugin documentation
chloerice Nov 21, 2022
98c909f
Add coverage rule custom messages
chloerice Nov 21, 2022
fb90e2e
clean up config (add z-index category, add comments, map categories t…
chloerice Nov 22, 2022
3575833
Add rule metadata
chloerice Nov 22, 2022
f8ed8e8
fix VSCode metadata URL only being hyperlinked for 1 rule at a time
chloerice Nov 22, 2022
efbc3ad
fix up custom messages (WIP)
chloerice Nov 22, 2022
8accaa3
[stylelint-polaris] Move README content to package root
chloerice Nov 30, 2022
0ef0cf4
[stylelint-polaris] Reconfigure categorized rules with secondary opti…
chloerice Nov 30, 2022
a7d3221
Remove stylelint rule name from custom message drafts
chloerice Dec 1, 2022
d5207f7
WIP stash
chloerice Dec 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/purple-knives-enjoy.md
@@ -0,0 +1,5 @@
---
'@shopify/stylelint-polaris': minor
---

Categorize coverage rules
21 changes: 7 additions & 14 deletions .stylelintrc.js
@@ -1,27 +1,20 @@
/** @type {import('stylelint').Config} */
module.exports = {
extends: ['@shopify/stylelint-plugin/prettier', './stylelint-polaris'],
// Disabling @shopify/stylelint-plugin/configs/core no-unknown-animations as styelint
// is not aware of global Polaris keyframes
extends: [/*'@shopify/stylelint-plugin/prettier', */ './stylelint-polaris'],
// Disabling @shopify/stylelint-plugin/configs/core no-unknown-animations as stylelint is not aware of global Polaris keyframes
// TODO: create custom plugin to ensure animation-names match Polaris keyframe names
customSyntax: 'postcss-scss',
rules: {
'no-unknown-animations': undefined,
'no-unknown-animations': null,
'value-keyword-case': ['lower', {camelCaseSvgKeywords: true}],
},
overrides: [
{
files: ['polaris-react/**/*.{css,scss}'],
extends: [
'@shopify/stylelint-plugin/prettier',
'./stylelint-polaris/configs/internal',
],
},
{
files: ['polaris-migrator/**/tests/*.{css,scss}'],
rules: {
'comment-empty-line-before': undefined,
'declaration-property-value-disallowed-list': undefined,
'function-disallowed-list': undefined,
'comment-empty-line-before': null,
'declaration-property-value-disallowed-list': null,
'function-disallowed-list': null,
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -79,7 +79,7 @@
"rollup": "^2.70.2",
"rollup-plugin-node-externals": "^4.0.0",
"size-limit": "^5.0.3",
"stylelint": "^14.1.0",
"stylelint": "^14.15.0",
"ts-node": "^10.7.0",
"turbo": "^1.2.8",
"typescript": "^4.6.3"
Expand Down
@@ -1,13 +1,12 @@
@import '../../../../styles/common';

.ContextualSaveBar {
// Used to apply dark theme to action buttons
/* stylelint-disable stylelint-polaris/custom-properties-allowed-list */
/* stylelint-disable -- polaris: Used to apply dark theme to action buttons */
--p-surface: var(--p-surface-dark);
--p-text: var(--p-text-on-dark);
--p-action-secondary-hovered: var(--p-action-secondary-hovered-dark);
--p-action-secondary-pressed: var(--p-action-secondary-pressed-dark);
/* stylelint-enable stylelint-polaris/custom-properties-allowed-list */
/* stylelint-enable */
display: flex;
height: $top-bar-height;
background: var(--p-surface-dark);
Expand Down