@nbry/eslint-config-typescript
v1.0.0
Published
ESLint shareable config for TypeScript projects
Maintainers
Readme
@nbry/eslint-config-typescript
ESLint shareable config for TypeScript projects with opinionated best practices.
Installation
npm install --save-dev @nbry/eslint-config-typescript eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin typescriptor with yarn:
yarn add -D @nbry/eslint-config-typescript eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin typescriptUsage
Add this to your .eslintrc.js or .eslintrc.json:
.eslintrc.js
module.exports = {
extends: ['@nbry/eslint-config-typescript'],
};.eslintrc.json
{
"extends": ["@nbry/eslint-config-typescript"]
}ESLint 9+ (Flat Config)
import nbryConfig from '@nbry/eslint-config-typescript';
export default [
nbryConfig,
// your overrides
];Requirements
- Node.js >= 14
- TypeScript >= 4.0.0
- ESLint >= 8.0.0
- A
tsconfig.jsonfile in your project root
What's Included
This config includes:
- TypeScript ESLint parser and recommended rules
- Type-aware linting rules
- Best practices for async/await
- Consistent code style enforcement
- Unused variable detection (with underscore prefix support)
Rules Highlights
- ✅ Enforces type-safe Promise handling
- ✅ Requires explicit type imports
- ✅ Warns on
anyusage - ✅ Enforces consistent interface definitions
- ✅ Detects unused variables (allows
_prefix for intentionally unused)
Customization
You can override any rules in your own ESLint config:
module.exports = {
extends: ['@nbry/eslint-config-typescript'],
rules: {
'@typescript-eslint/no-explicit-any': 'error', // Make it stricter
'no-console': 'off', // Allow console.log
},
};License
MIT
