Package Exports
- @lskjs/eslint-config
- @lskjs/eslint-config/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lskjs/eslint-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
☂️ LSK.js – ESLint Config Preset
Part of @lskjs/presets monorepo
ESLint configuration for LSK.js projects with TypeScript, React & Prettier support
🎯 Comprehensive: Based on Airbnb style guide
💎 TypeScript: Full TypeScript support with type-aware linting
⚛️ React: React & JSX best practices
🎨 Prettier: Integrated Prettier formatting
📦 Zero Config: Works out of the box
🔧 Customizable: Easy to extend and override
📦 Installation
npm install --save-dev @lskjs/eslint-config eslint
# or
pnpm add --save-dev @lskjs/eslint-config eslint
# or
yarn add --dev @lskjs/eslint-config eslint🚀 Usage
Default Configuration
Add to your .eslintrc.js:
module.exports = {
extends: '@lskjs/eslint-config'
};Or in package.json:
{
"eslintConfig": {
"extends": "@lskjs/eslint-config"
}
}Strict Configuration
For stricter linting rules:
module.exports = {
extends: '@lskjs/eslint-config/strict'
};JavaScript Only
module.exports = {
extends: '@lskjs/eslint-config/js'
};TypeScript
module.exports = {
extends: '@lskjs/eslint-config/ts'
};React
module.exports = {
extends: '@lskjs/eslint-config/react'
};Next.js
module.exports = {
extends: '@lskjs/eslint-config/nextjs'
};Prettier
For Prettier configuration:
{
"prettier": "@lskjs/eslint-config/prettier"
}✨ Features
Base Configuration Includes
- Airbnb style guide
- Prettier integration
- Import resolver with TypeScript support
- JSON linting support
TypeScript Features
- Type-aware linting rules
- Import resolution for
.tsand.tsxfiles - Strict type checking recommendations
React Features
- JSX best practices
- Hooks rules
- Accessibility (a11y) checks
🎨 Prettier Configuration
The package includes a Prettier configuration that works seamlessly with ESLint:
- Print Width: 100 characters
- Tab Width: 2 spaces
- Semicolons: Always
- Single Quotes: Yes
- Trailing Commas: ES5
📁 Available Configurations
@lskjs/eslint-config- Default (relaxed)@lskjs/eslint-config/strict- Strict rules@lskjs/eslint-config/nostrict- Non-strict rules@lskjs/eslint-config/js- JavaScript only@lskjs/eslint-config/ts- TypeScript@lskjs/eslint-config/react- React@lskjs/eslint-config/nextjs- Next.js@lskjs/eslint-config/prettier- Prettier config
🔧 Customization
You can override any rules:
module.exports = {
extends: '@lskjs/eslint-config',
rules: {
'no-console': 'warn',
'react/prop-types': 'off'
}
};🔗 Links
📝 License
MIT © Igor Suvorov
@lskjs/presets - Unified configuration for LSK.js projects 🎯