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

[WIP] aksel stylelint #1973

Merged
merged 78 commits into from
May 31, 2023
Merged

[WIP] aksel stylelint #1973

merged 78 commits into from
May 31, 2023

Conversation

JulianNymark
Copy link
Contributor

@JulianNymark JulianNymark commented May 10, 2023

@JulianNymark JulianNymark requested a review from KenAJoh May 10, 2023 13:56
@changeset-bot
Copy link

changeset-bot bot commented May 10, 2023

🦋 Changeset detected

Latest commit: b2a0971

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@navikt/aksel-stylelint Minor
@navikt/ds-react Minor
@navikt/ds-css Minor
@navikt/ds-tokens Minor
@navikt/ds-tailwind Minor
@navikt/ds-css-internal Minor
@navikt/ds-react-internal Minor
@navikt/ds-codemod Minor
@navikt/aksel-icons Minor
@navikt/aksel Minor
@navikt/ds-icons Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JulianNymark
Copy link
Contributor Author

something is up with stylelint plugin definition, was hoping we could wrap all our rules in one nice plugin, but it might have to become a large list of rules in the main package.json (under "stylelint" section)

@github-actions
Copy link
Contributor

github-actions bot commented May 10, 2023

9900fae1f | 45 komponenter | 266 stories

@KenAJoh
Copy link
Collaborator

KenAJoh commented May 10, 2023

Its alive! 🧟

@macbruker
Copy link
Contributor

Hvordan skiller dette seg fra plugins som stylelint-value-no-unknown-custom-properties ?

@JulianNymark
Copy link
Contributor Author

JulianNymark commented May 16, 2023

@macbruker

Hvordan skiller dette seg fra plugins som stylelint-value-no-unknown-custom-properties ?

Hei, den regelen gir en del overlap og er mer generisk i de tilfeller man bare refererer til en token som ikke finnes i det hele tatt, men den kan I de tilfeller for tokens man definerer og bruker en token selv sjekke om du har en skrivefeil eller av en eller annen grunn refererer til en design system token som ikke finnes (selv om selve tokenen finnes). Dette skjer med feks override + bruk (skjermbilde under).

image

I tillegg til referanser, så sjekker den navn av tokens når man overrider (re-definerer) en token.

/*...*/
  --a-illegal-token: 5px;
/*...*/

@JulianNymark
Copy link
Contributor Author

JulianNymark commented May 23, 2023

Need to test manual upload to NPM (and dload + use).

before merge:

  • remove lint:css script
  • remove TESTLINTER.css
  • disable / ignore our own rules (do not run on design system itself?)
  • changeset file (huddle on this + versions, are they needed in reality?)

this commit is a good "base" for developing future stylelint rules
Copy link
Collaborator

@KenAJoh KenAJoh left a comment

Choose a reason for hiding this comment

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

LGTM 🚢 🇮🇹

@navikt/aksel-stylelint/package.json Outdated Show resolved Hide resolved
@navikt/aksel-stylelint/package.json Show resolved Hide resolved
@navikt/aksel-stylelint/src/recommended.ts Outdated Show resolved Hide resolved
@navikt/aksel-stylelint/package.json Outdated Show resolved Hide resolved
@JulianNymark JulianNymark merged commit 61c4114 into main May 31, 2023
@JulianNymark JulianNymark deleted the aksel-linting branch May 31, 2023 12:22
@github-actions github-actions bot mentioned this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants