This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is @iwf-web/eslint-coding-standard, an npm package providing standardized ESLint configurations for IWF projects. It wraps @antfu/eslint-config with IWF-specific customizations for TypeScript and React.
# Build the package (transpile to ESM + generate .d.mts types)
pnpm prepack
# Lint the codebase
pnpm eslint .
# Type check
pnpm ts:checkNote: Tests are not yet implemented.
The package exports two configs from separate entry points:
iwfWebStandardTs(src/standard-ts.ts) — Full config with TypeScript strict checking, React, and all style rules. Imports and extends the JS config.iwfWebStandardJs(src/standard-js.ts) — Base config with React and style rules, without TypeScript.src/index.ts— Barrel re-export of both configs.
standard-js.ts also exports baseOptions and baseRules constants, which standard-ts.ts imports to extend with TS-specific rules.
// TypeScript project
import { iwfWebStandardTs } from '@iwf-web/eslint-coding-standard';
export default iwfWebStandardTs();
// JavaScript-only project
import { iwfWebStandardJs } from '@iwf-web/eslint-coding-standard';
export default iwfWebStandardJs();
// Subpath imports also available
import { iwfWebStandardTs } from '@iwf-web/eslint-coding-standard/standard-ts';Both functions accept (options?, ...userConfigs) — options override antfu() defaults, userConfigs are additional ESLint flat config objects appended after the IWF rules.
- Semicolons required
- Curly braces required for all control statements
- 120 character line length (warning)
- Single quotes, 2-space indentation
- No spaces inside object braces:
{foo: bar} - Arrow function parameters always wrapped in parentheses
- tsdown: Builds ESM output to
dist/with TypeScript declarations. Entry points:src/index.ts,src/standard-js.ts,src/standard-ts.ts. Theexports: trueoption auto-updates package.json exports. - pnpm: Required package manager (version locked)
- Conventional Commits: Used for automated releases via release-please