@capitol.ai/eslint-config-base
v0.0.1
Published
Shareable ESLint and Prettier configuration
Downloads
12
Readme
ESLint and Prettier Configuration
A shareable ESLint and Prettier configuration for TypeScript and React projects.
Installation
npm install --save-dev @capitol.ai/eslint-config-baseUsage
In your project's .eslintrc.js:
module.exports = {
extends: ['@capitol.ai/eslint-config-base'],
};In your project's package.json:
{
"prettier": "@capitol.ai/eslint-config-base"
}Features
- TypeScript support with strict type checking
- React and React Hooks best practices
- Accessibility (a11y) rules
- Import sorting and organization
- Prettier integration
- Next.js core web vitals
- Modern JavaScript features
- Common best practices
Configuration Details
ESLint Rules
- TypeScript strict type checking
- React and React Hooks best practices
- JSX accessibility rules
- Import sorting and organization
- Prettier integration
- Next.js core web vitals optimization
Prettier Configuration
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"jsxBracketSameLine": false,
"jsxSingleQuote": true,
"printWidth": 80,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}Ignored Files
The following files are ignored by Prettier:
- Markdown files (*.md)
- Configuration files (*.json, *.yml, *.yaml)
- Lock files (package-lock.json, yarn.lock, pnpm-lock.yaml)
- Build directories (dist, build, .next)
- Dependencies (node_modules)
- Coverage reports (coverage)
License
MIT
