Skip to content

Commit

Permalink
Modify config to have overrides that correspond to multiple file types (
Browse files Browse the repository at this point in the history
#368)

* Break out config file types

* Moving some primer plugins to scss

* Some cleanup after merge conflicts

* Some adjusting

* use cjs for local linting

* Ignore partial support

* Add pcss example

* Fixes for typescriptreact

* don't need duplicate file selectors

* Adding a module

* Ignore fixtures folder in tests

* Build after install

* Create real-goats-applaud.md

* Make cjs the default

* adjust testing
  • Loading branch information
jonrohan committed Apr 17, 2024
1 parent 78de604 commit 0ed9a47
Show file tree
Hide file tree
Showing 11 changed files with 959 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-goats-applaud.md
@@ -0,0 +1,5 @@
---
"@primer/stylelint-config": minor
---

Change config to accept multiple file types `.css, .scss, .modules.css, .tsx, .pcss`
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -12,7 +12,6 @@ jobs:
- uses: actions/setup-node@v3
- run: npm ci
- run: npm run test
- run: npm run test:stylelint
lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.json
@@ -1 +1 @@
{ "extends": ["./index"] }
{ "extends": ["./dist/index.cjs"], "cache": false }
144 changes: 144 additions & 0 deletions __tests__/__fixtures__/good/example.module.css
@@ -0,0 +1,144 @@
.header {
height: 264px;
overflow: hidden;
}

.gradient {
--offset: -500px;

position: absolute;
top: 0;
/* stylelint-disable-next-line primer/responsive-widths */
width: 1000px;
height: 800px;
}

.octicon {
display: inline-block;
}

.gradient-left {
/* stylelint-disable primer/no-undefined-vars */
top: var(--offset);
left: var(--offset);
/* stylelint-disable-next-line primer/colors */
background: radial-gradient(30% 70% at 50% 50%, rgb(130 80 223 / 0.2) 0%, rgb(130 80 223 / 0) 100%);
}

.gradient-right {
right: var(--offset);
/* stylelint-disable-next-line primer/colors */
background: radial-gradient(30% 70% at 50% 50%, rgb(9 107 222 / 0.3) 0%, rgb(9 107 222 / 0) 100%);
}

.header-background,
.header-copilot {
user-select: none;
}

.header-background {
top: -220px;
right: -110px;
height: 580px;
}

.header-copilot {
top: -35%;
right: 100px;
height: 146px;
}

.header-content {
position: relative;
z-index: 1;
}

.negative-margin {
/* stylelint-disable-next-line primer/spacing */
margin: -0.5rem;
}

.search-input {
max-width: 600px;
}

.marketplace-featured-grid,
.marketplace-list-grid {
display: grid;
gap: 1rem;
}

.marketplace-featured-grid {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
max-width: 100%;
}

.marketplace-list-grid {
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
max-width: 100%;
}

.marketplace-item {
box-shadow: var(--shadow-resting-small, var(--color-shadow-small));
}

.marketplace-item:hover,
.marketplace-item:focus-within {
background-color: var(--bgColor-muted, var(--color-canvas-subtle));
}

.marketplace-item:focus-within {
outline: 2px solid var(--fgColor-accent, var(--color-accent-fg));
}

.marketplace-item-link {
color: var(--fgColor-default, var(--color-fg-default));
}

.marketplace-item-link:hover {
color: inherit;
text-decoration: none;
}

.marketplace-item-link:focus {
outline: none;
}

.marketplace-item-link::before {
position: absolute;
cursor: pointer;
content: "";
inset: 0;
}

.marketplace-logo {
--container-size: var(--base-size-40);
--logo-size: var(--base-size-32);

display: grid;
place-items: center;
width: var(--container-size);
height: var(--container-size);
/* stylelint-disable-next-line primer/spacing */
padding: var(--space-xsmall);
}

.marketplace-logo--large {
--container-size: var(--base-size-96);
--logo-size: var(--base-size-80);
}

.marketplace-logo-img {
width: var(--logo-size);
height: var(--logo-size);
}

.details {
&[open] .down-icon {
display: none !important;
}

&:not([open]) .up-icon {
display: none !important;
}
}

0 comments on commit 0ed9a47

Please sign in to comment.