npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

design-system-stylelint

v1.0.0

Published

디자인 시스템 유지를 위한 stylelint입니다.

Downloads

3

Readme

design-system-stylelint

디자인 시스템을 기준으로 하드코딩된 색상/폰트를 금지하는 Stylelint 플러그인입니다.

개발 의도

디자인 시스템을 바탕으로 개발하더라도, 새로운 컴포넌트를 만들거나 새로운 팀원이 합류할 때 컨벤션이 지켜지지 않는 경우가 있습니다.
이 문제를 줄이기 위해 하드코딩된 색상/폰트를 자동으로 잡아내는 린트 규칙을 만들었습니다.

( * 현재는 버전 1이기 때문에 규칙을 최소화하여 가장 기본적인 규칙만 명시하였습니다.)

설치

npm i -D design-system-stylelint stylelint postcss-styled-syntax

사용 방법

1) Stylelint 설정 파일 작성

stylelint.config.js (ESM):

export default {
  customSyntax: "postcss-styled-syntax",
  plugins: ["design-system-stylelint"],
  rules: {
    "design-system/no-hardcoded-color": [
      true,
      { themePath: "./src/styles/theme.ts" },
    ],
    "design-system/no-hardcoded-font": true,
  },
};

2) 실행

stylelint "**/*.{ts,tsx,css}"

package.json에 스크립트를 추가해도 됩니다.

{
  "scripts": {
    "designlint": "stylelint \"**/*.{ts,tsx,css}\""
  }
}

규칙 설명

design-system/no-hardcoded-color

하드코딩된 색상 값(예: #fff, rgb(0,0,0))을 금지합니다.
themePath 옵션으로 테마 토큰 파일 경로를 전달해야 합니다.

{
  "design-system/no-hardcoded-color": [
    true,
    { themePath: "./src/styles/theme.ts" }
  ]
}

design-system/no-hardcoded-font

하드코딩된 폰트 값(예: font-family: "Arial")을 금지합니다.

{
  "design-system/no-hardcoded-font": true
}

사용 예시

잘못된 예시 (경고 발생)

const Box = styled.div`
  color: #111;
  background: rgb(255, 255, 255);
  font-family: "Arial";
`;

올바른 예시 (토큰 사용)

const Box = styled.div`
  color: ${theme.colors.text.primary};
  background: ${theme.colors.background.default};
  font-family: ${theme.fonts.body};
`;

참고

  • themePath는 실제 프로젝트의 테마 파일 경로로 변경해야 합니다.