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

Enhance validate-token plugin of stylelint-bezier #2467

Open
yangwooseong opened this issue Oct 29, 2024 · 1 comment
Open

Enhance validate-token plugin of stylelint-bezier #2467

yangwooseong opened this issue Oct 29, 2024 · 1 comment
Labels
good first issue Issue that good for newcomers stylelint-bezier Issue of PR related to stylelint-bezier

Comments

@yangwooseong
Copy link
Collaborator

yangwooseong commented Oct 29, 2024

Description

validate-token 플러그인을 개선합니다.

Reasons for suggestion

현재 css variable에 기본값을 넣으면 린트에 걸리고 있습니다. bezier-token 을 사용하는지 아닌지를 검사하는 것이 목적이기 때문에 기본값 사용을 허용해야 합니다.

Proposed solution

  1. css variable 안에 기본값을 포함하는 것을 허용합니다. 지금은 아래처럼 기본값을 넣으면 린트에 걸립니다.
image
  1. 에러 메시지에 ignorePrefix에 대한 정보를 추가합니다. 위 예의 경우는
    Invalid token: "token-name". Use tokens from @channel.io/bezier-tokens, or add some prefix to "ignorePrefix" of plugin option. (bezier/validate-token)Stylelint(bezier/validate-token) 정도라면 좋을 것 같습니다.

  2. 테스트 코드를 추가해서 체크가 통과하는 경우와 실패하는 경우를 명확히 알게 합니다. bezier-token을 import 하고 있지만 validate(value, option, tokens) 같은 함수를 분리한다면 충분히 테스트 코드 작성이 가능할 것 같습니다.

References

No response

@yangwooseong yangwooseong added the stylelint-bezier Issue of PR related to stylelint-bezier label Oct 29, 2024
Copy link

channeltalk bot commented Oct 29, 2024

@yangwooseong yangwooseong added the good first issue Issue that good for newcomers label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issue that good for newcomers stylelint-bezier Issue of PR related to stylelint-bezier
Projects
None yet
Development

No branches or pull requests

1 participant