Skip to main content

lint-check

Run lint on affected packages, parse errors, and auto-fix common issues (design tokens, React.FC, SSR safety, import restrictions)

소스 정보

저장소
microsoft/fluentui
최근 소스 활동
2026년 4월 20일 14:10
감지된 SKILL.md 언어
영어
스타
20,324
포크
2,947

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
lint-check
description
Run lint on affected packages, parse errors, and auto-fix common issues (design tokens, React.FC, SSR safety, import restrictions)
disable-model-invocation
true
argument-hint
[package-name]
allowed-tools
Bash Read Edit Grep Glob
# Lint Check and Auto-Fix Run linting and fix common issues for Fluent UI packages. ## Steps 1. **Determine scope.** If `$ARGUMENTS` is provided, lint that specific package. Otherwise, lint affected packages: ```bash # Specific package yarn nx run @fluentui/$ARGUMENTS:lint # Or affected packages yarn nx affected -t lint ``` 2. **Parse the output** and categorize errors by the custom Fluent UI ESLint rules: | Rule | What it catches | How to fix | | --------------------------------------- | ------------------------------------------- | ----------------------------------------------------- | | `@fluentui/ban-context-export` | Context exported from wrong layer | Move to `react-shared-contexts` package | | `@fluentui/ban-instanceof-html-element` | `instanceof HTMLElement` (breaks iframes) | Use element.tagName or feature detection | | `@fluentui/no-global-react` | `React.FC`, `React.useState` etc. | Use named imports: `import { useState } from 'react'` | | `@fluentui/no-restricted-imports` | Banned import paths | Use the allowed import path from the error message | | `@fluentui/no-context-default-value` | Context created without `undefined` default | Use `createContext(undefined)` and add a guard hook | 3. **Auto-fix** any issues found by editing the source files directly. For each fix: - Read the file - Apply the fix - Verify the fix by re-running lint on that specific file 4. **Report** a summary of what was found and fixed. ## References - ESLint plugin source: `packages/eslint-plugin/src/rules/` - Design tokens guide: [docs/architecture/design-tokens.md](docs/architecture/design-tokens.md) - Component patterns: [docs/architecture/component-patterns.md](docs/architecture/component-patterns.md)
GitHub에서 보기