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.
This configuration extends @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 { iwf } from '@iwf-web/eslint-coding-standard';
export default iwf();You can pass options to override the default configuration:
import { iwf } from '@iwf-web/eslint-coding-standard';
export default iwf({
typescript: {
tsconfigPath: './tsconfig.app.json',
},
});You can append additional ESLint flat config objects:
import { iwf } from '@iwf-web/eslint-coding-standard';
export default iwf(
{},
{
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.