@kyneth-app/eslint-config
v1.0.2
Published
Shared ESLint configuration for Kyneth projects
Maintainers
Readme
@kyneth-app/eslint-config
Shared ESLint configuration for Kyneth projects.
This package provides a consistent code style and linting rules across all Kyneth projects.
Features
- Built on top of @nuxt/eslint-config
- Stylistic rules for consistent code formatting
- Import ordering and organization rules
- Support for TypeScript and Vue files
- Customizable directory configuration
Installation
npm install --save-dev @kyneth-app/eslint-configPeer Dependencies
Make sure you have the following peer dependencies installed:
npm install --save-dev eslint @nuxt/eslint-config @stylistic/eslint-plugin eslint-plugin-import-xUsage
Basic Usage
Create an eslint.config.mjs file in your project root:
import kynethConfig from '@kyneth-app/eslint-config'
export default kynethConfigAdvanced Usage
For projects with custom directory structures, use the configuration function:
import { createKynethEslintConfig } from '@kyneth-app/eslint-config'
export default createKynethEslintConfig({
dirs: ['./playground', './custom-dir']
})Configuration Details
Stylistic Rules
- Indentation: 2 spaces
- Quotes: Single quotes (with escape avoidance)
- Semicolons: Never
- Comma Dangle: Always for multiline
- Arrow Parens: Only when needed
- Brace Style: 1tbs (one true brace style)
- Object Spacing: Always add spaces inside curly braces
- Array Spacing: Never add spaces inside brackets
Import Rules
Imports are automatically organized in the following order:
- Node.js built-in modules
- External packages
- Internal modules
- Parent/sibling/index imports
- Type imports
Special path patterns:
#imports(Nuxt auto-imports)@/**(project aliases)~/**(project aliases)
Additional import rules:
- Imports must be at the top of the file
- Newline required after imports
- No duplicate imports
- Alphabetically sorted within groups
Development
Prerequisites
- Node.js 18+
- npm or bun
Setup
# Install dependencies
npm install
# Or using bun
bun installLicense
MIT
