eslint-config-kelo-nextjs 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,10 @@ import tseslint from "typescript-eslint";
8
8
 
9
9
  import { baseSonarjsConfig } from "./sonarjs.mjs";
10
10
 
11
+ // Next.js 설정에서 react 플러그인을 등록한 블록의 files — react/* 룰은 이 범위에만 걸 수 있다.
12
+ const nextReactFiles = nextVitals.find((config) => config.plugins?.react)
13
+ ?.files ?? ["**/*.{js,jsx,mjs,ts,tsx,mts,cts}"];
14
+
11
15
  /**
12
16
  * Next.js 공용 ESLint 베이스. 블록 순서대로 뒤가 앞을 override.
13
17
  * 각 블록 의도는 인라인 주석 참조.
@@ -102,6 +106,14 @@ export const baseConfig = defineConfig([
102
106
  "@typescript-eslint/no-explicit-any": "warn", // any 명시 사용 시 경고 (완전 금지는 과도)
103
107
  // TODO/FIXME/HACK 추적 (warn, 차단하지 않음)
104
108
  "no-warning-comments": ["warn", { terms: ["TODO", "FIXME", "HACK"] }],
109
+ },
110
+ },
111
+
112
+ // [7] React 스타일 룰 — Next.js가 react 플러그인을 등록한 파일 범위에만 적용
113
+ // (`.cjs`는 범위 밖이라 files 없이 걸면 "Could not find plugin react"로 lint 전체가 실패)
114
+ {
115
+ files: nextReactFiles,
116
+ rules: {
105
117
  "react/function-component-definition": [
106
118
  // 컴포넌트 선언 스타일 통일
107
119
  "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-kelo-nextjs",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Kelo Next.js ESLint/Stylelint shareable config — architecture boundaries, domain purity, and quality rules",
5
5
  "type": "module",
6
6
  "license": "MIT",