
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@lobehub/eslint-config
Advanced tools
@next/eslint-plugin-next)simple-import-sortperfectionistpnpm add -D @lobehub/eslint-config eslint typescript
Create eslint.config.js (or eslint.config.mjs) in your project root:
import { defineConfig } from '@lobehub/eslint-config';
export default defineConfig();
import { defineConfig } from '@lobehub/eslint-config';
export default defineConfig({
react: 'next',
next: true,
});
import { defineConfig } from '@lobehub/eslint-config';
export default defineConfig({
react: 'expo',
reactNative: true,
});
import { defineConfig } from '@lobehub/eslint-config';
export default defineConfig({
typescript: 'strict',
typeChecked: true,
});
import { defineConfig } from '@lobehub/eslint-config';
export default defineConfig({
parserOptions: {
emitDecoratorMetadata: true,
experimentalDecorators: true,
},
});
import { defineConfig } from '@lobehub/eslint-config';
export default defineConfig({
// TypeScript support: true | false | 'strict'
typescript: true,
// Enable type-aware rules (requires tsconfig)
typeChecked: false,
// Custom tsconfig path
tsconfigPath: './tsconfig.json',
// React support: true | false | 'next' | 'remix' | 'vite' | 'expo'
react: false,
// React Native support
reactNative: false,
// React Compiler rules
reactCompiler: false,
// Accessibility rules (requires react)
a11y: false,
// Import sorting
sortImports: true,
// Interface and enum key sorting
sortKeys: true,
// Stylistic rules (jsx-sort-props, etc.)
stylistic: true,
// Regexp optimization rules
regexp: true,
// Additional ignore patterns
ignores: ['**/dist/**'],
});
Use rest parameters to add custom configurations with higher priority:
import { defineConfig } from '@lobehub/eslint-config';
export default defineConfig(
{ react: 'next' },
// Global rule overrides
{
rules: {
'no-console': 'warn',
},
},
// File-specific overrides
{
files: ['**/test/**', '**/*.test.ts', '**/*.spec.ts'],
rules: {
'no-console': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['**/scripts/**'],
rules: {
'unicorn/no-process-exit': 'off',
},
},
);
import { defineConfig } from '@lobehub/eslint-config';
export default defineConfig(
{
react: 'next',
typescript: 'strict',
},
// Relax rules for test files
{
files: ['**/*.test.ts', '**/*.test.tsx', '**/test/**'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
// Relax rules for scripts
{
files: ['scripts/**'],
rules: {
'no-console': 'off',
'unicorn/no-process-exit': 'off',
},
},
// Relax rules for config files
{
files: ['*.config.ts', '*.config.js'],
rules: {
'unicorn/no-anonymous-default-export': 'off',
},
},
);
| Option | Type | Default | Description |
|---|---|---|---|
typescript | boolean | 'strict' | true | Enable TypeScript rules |
typeChecked | boolean | false | Enable type-aware rules |
tsconfigPath | string | string[] | - | Custom tsconfig path |
parserOptions | ParserOptions | - | TypeScript parser options |
react | boolean | 'next' | 'remix' | 'vite' | 'expo' | false | Enable React rules |
reactNative | boolean | false | Enable React Native rules |
reactCompiler | boolean | false | Enable React Compiler rules |
next | boolean | false | Enable Next.js ESLint rules |
a11y | boolean | false | Enable accessibility rules |
sortImports | boolean | true | Enable import sorting |
sortKeys | boolean | true | Enable interface/enum/jsx sorting |
stylistic | boolean | true | Enable stylistic rules |
regexp | boolean | true | Enable regexp rules |
ignores | string[] | [] | Additional ignore patterns |
function defineConfig(options?: Options, ...configs: FlatConfig[]): FlatConfigArray;
options - Configuration options (see table above)...configs - Additional flat configs to append (highest priority)MIT © LobeHub
FAQs
ESLint Flat Config configuration for LobeHub projects
We found that @lobehub/eslint-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.