A standardized ESLint configuration package for IWF projects. Built on top of @antfu/eslint-config, it provides an opinionated, pre-configured setup optimized for TypeScript and React applications.
The package provides two configs:
- Standard TypeScript (
iwfStandardTs) — Full config with TypeScript strict checking, React, and all style rules. Use this for TypeScript projects. - Standard JavaScript (
iwfStandardJs) — Base config with React and style rules, without TypeScript. Use this for JS-only projects.
The TypeScript config extends the JavaScript one, so all JS/React rules are included automatically.
Both configs build on @antfu/eslint-config with the following customizations:
- Semicolons: Required at statement ends
- Curly braces: Required for all control statements
- Arrow functions: Parentheses around single parameters
- Max line length: 120 characters (exceptions for comments, strings, and URLs)
- Object spacing: No spaces inside braces (
{foo: bar}) - Quote style: Single quotes, with object properties quoted only when required
- Strict type checking enabled with project-based tsconfig detection
- Allows promises in event handlers (e.g.,
onClick) - Relaxed
anytype restrictions for third-party library interoperability
- Full React support with hooks linting
- Allows common child manipulation patterns (
cloneElement,children.map, etc.) - Const declarations allowed for components
- JSONC, YAML, and Markdown linting disabled
- Node.js 18 or higher
- pnpm, npm, or yarn
pnpm add -D @iwf-web/eslint-coding-standardOr with npm:
npm install -D @iwf-web/eslint-coding-standardCreate an eslint.config.js (or eslint.config.ts) file in your project root:
import { iwfStandardTs } from '@iwf-web/eslint-coding-standard';
export default iwfStandardTs();import { iwfStandardJs } from '@iwf-web/eslint-coding-standard';
export default iwfStandardJs();Each config is also available as a direct subpath import:
import { iwfStandardTs } from '@iwf-web/eslint-coding-standard/standard-ts';
import { iwfStandardJs } from '@iwf-web/eslint-coding-standard/standard-js';You can pass options to override the default configuration:
import { iwfStandardTs } from '@iwf-web/eslint-coding-standard';
export default iwfStandardTs({
typescript: {
tsconfigPath: './tsconfig.app.json',
},
});You can append additional ESLint flat config objects:
import { iwfStandardTs } from '@iwf-web/eslint-coding-standard';
export default iwfStandardTs(
{},
{
rules: {
'no-console': 'warn',
},
},
);Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project uses Conventional Commits for automated releases and changelog generation.
We use SemVer for versioning. For available versions, see the tags on this repository.
All authors can be found in the AUTHORS.md file.
Contributors can be found in the CONTRIBUTORS.md file.
See also the full list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.txt file for details.
A list of used libraries and code with their licenses can be found in the ACKNOWLEDGMENTS.md file.