@caspeco/eslint-config-ts
v5.1.0
Published
Caspeco ESLint configuration for TypeScript projects
Readme
@caspeco/eslint-config-ts
Caspeco ESLint configuration for TypeScript projects.
Installation
npm install --save-dev @caspeco/eslint-config-tsUsage
Create an eslint.config.js file in your project root:
import config from "@caspeco/eslint-config-ts";
export default [{ ignores: ["dist/**/*", "build/**/*"] }, ...config];What's Included
This configuration includes:
- TypeScript ESLint - Using recommended-type-checked config
- No Barrel Files - Prevents barrel file usage (index files that just re-export)
- File Naming Conventions - Enforces kebab-case for files and folders
- Prettier Integration - Compatible with Prettier formatting
Peer Dependencies
This package requires the following peer dependencies (automatically installed by npm 7+):
@eslint/jseslinteslint-config-prettiereslint-plugin-check-fileeslint-plugin-no-barrel-filestypescript-eslint
See package.json for specific version requirements.
Plugins
typescript-eslint
Using recommended-type-checked config with project service enabled.
eslint-plugin-no-barrel-files
We opt out of using barrel files as they can:
- Slow down builds and tests
- Cause circular dependencies
- Make tree shaking more difficult
Note: We allow barrel files for libraries consumed as npm packages.
More information:
eslint-plugin-check-file
Enforces KEBAB_CASE for filenames and folders.
Why kebab-case?
- Cross-Platform Consistency: Avoids issues on case-insensitive systems (Windows, macOS) where
MyFile.jsandmyfile.jsare treated the same - Readability: Clear, natural separation of words with hyphens
- Predictability: Consistent file-naming pattern across the project
License
MIT
