Gathering detailed insights and metrics for @poupe/eslint-config
Gathering detailed insights and metrics for @poupe/eslint-config
Gathering detailed insights and metrics for @poupe/eslint-config
Gathering detailed insights and metrics for @poupe/eslint-config
npm install @poupe/eslint-config
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (89.45%)
JavaScript (10.55%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
408 Commits
1 Forks
1 Watchers
16 Branches
1 Contributors
Updated on Jul 03, 2025
Latest Version
0.7.12
Package Id
@poupe/eslint-config@0.7.12
Unpacked Size
77.87 kB
Size
21.11 kB
File Count
18
NPM Version
11.4.1
Node Version
22.16.0
Published on
Jul 02, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
15
@poupe/eslint-config
Sharable ESLint configuration preset for Poupe UI projects with TypeScript, Vue.js, and Tailwind CSS support.
✅ Includes:
[!NOTE] This preset uses the new ESLint flat config format and requires ESLint v9+ and Node.js v18.20.8+.
Install dependencies:
1pnpm install -D eslint typescript @poupe/eslint-config
Create eslint.config.mjs
in your project root:
1// @ts-check 2import poupeConfig from '@poupe/eslint-config'; 3 4export default poupeConfig;
For Nuxt.js applications (with @nuxt/eslint):
1// @ts-check 2import { forNuxt } from '@poupe/eslint-config/nuxt'; 3import withNuxt from './.nuxt/eslint.config.mjs'; 4 5export default withNuxt(...forNuxt({ 6 rules: { 7 // custom rule overrides 8 }, 9}));
For Nuxt modules (with @nuxt/eslint-config):
1// @ts-check
2import { createConfigForNuxt } from '@nuxt/eslint-config/flat';
3import { forNuxtModules } from '@poupe/eslint-config/nuxt';
4
5export default createConfigForNuxt({
6 features: {
7 tooling: true, // Enables rules for module authors
8 stylistic: true, // Enables formatting rules
9 },
10}, ...forNuxtModules());
Custom configuration:
1// @ts-check 2import { defineConfig } from '@poupe/eslint-config'; 3 4export default defineConfig({ 5 rules: { 6 // rule overrides 7 }, 8});
This configuration includes advanced CSS linting with Tailwind CSS v4 syntax support. The CSS configuration uses an intelligent filtering system that:
@eslint/css
filename-case
from unicorn)The filtering system categorizes plugins and rules to ensure only appropriate rules apply to CSS files. See AGENT.md for implementation details.
This configuration automatically lints the following file types:
.js
, .mjs
, .cjs
.ts
, .tsx
.vue
(Single File Components).json
, .jsonc
, package.json
.md
.css
(with Tailwind CSS v4 syntax support)This package uses its own ESLint configuration for validation, ensuring quality and serving as a real-world test case.
This configuration includes eslint-plugin-perfectionist
which automatically
organizes your imports and exports. The sorting happens automatically when you
run eslint --fix
or save files with ESLint auto-fix enabled in your editor:
1// Before 2import { z } from 'zod'; 3import React from 'react'; 4import { useState, useEffect } from 'react'; 5import { Button } from './components/Button'; 6import axios from 'axios'; 7import type { User } from '../types'; 8import { config } from './config'; 9 10// After (automatically fixed by ESLint) 11import type { User } from '../types'; 12 13import axios from 'axios'; 14import React from 'react'; 15import { z } from 'zod'; 16 17import { config } from './config'; 18import { Button } from './components/Button'; 19import { useEffect, useState } from 'react';
The configuration also includes automatic sorting of TypeScript union types with
perfectionist/sort-union-types
. Union members are sorted in natural order,
and you can use comments to create logical groups:
1// Before 2type Status = 'error' | 'loading' | 'success' | 'idle'; 3 4// After (automatically fixed by ESLint) 5type Status = 'error' | 'idle' | 'loading' | 'success'; 6 7// With comment-based grouping 8type Status = 9 // Active states 10 | 'loading' 11 | 'processing' 12 // Inactive states 13 | 'error' 14 | 'idle' 15 | 'success';
1// @ts-check
2import { defineConfig } from '@poupe/eslint-config';
3
4export default defineConfig({
5 rules: {
6 // Disable specific rules
7 'unicorn/filename-case': 'off',
8
9 // Customize rule severity and options
10 '@typescript-eslint/no-unused-vars': ['warn', {
11 argsIgnorePattern: '^_',
12 varsIgnorePattern: '^_',
13 }],
14 },
15});
1// @ts-check
2import { configs, withConfig } from '@poupe/eslint-config';
3
4// Import only specific configurations
5export default withConfig(
6 configs.javascript,
7 configs.typescript,
8 configs.stylistic,
9 configs.vue,
10 // Add custom overrides
11 {
12 rules: {
13 'vue/multi-word-component-names': 'off',
14 },
15 },
16);
In addition to the rules from included plugins, this configuration adds these custom rules:
import type
)@ts-
comment directivesdefineEmits
and defineProps
type declarationsv-model
usage patternsi
, j
, k
as loop counters and array indicesparseInt
If you're migrating from a legacy .eslintrc
configuration:
Remove old config files: Delete .eslintrc
, .eslintrc.js
,
.eslintrc.json
, etc.
Update dependencies:
1pnpm remove eslint-config-* eslint-plugin-* 2pnpm install -D eslint@^9 typescript @poupe/eslint-config
Create new config: Add eslint.config.mjs
as shown in Getting Started
Update scripts: ESLint v9 automatically finds eslint.config.mjs
1{ 2 "scripts": { 3 "lint": "eslint .", 4 "lint:fix": "eslint . --fix" 5 } 6}
Handle breaking changes:
files
instead of overrides
)The examples/
directory contains working examples demonstrating how to use
this ESLint configuration in different scenarios:
This project uses pnpm workspaces. You can run commands on all examples:
1# Install dependencies for all workspaces 2pnpm install 3 4# Lint all examples 5pnpm -r --filter "./examples/*" lint 6 7# Fix lint issues in all examples 8pnpm -r --filter "./examples/*" lint:fix 9 10# Run a specific example 11pnpm --filter "@poupe/eslint-config-playground-standard" lint
Ensure you've installed the package and are using the correct import path:
1pnpm install -D @poupe/eslint-config
For Nuxt applications, make sure to use the appropriate helper:
forNuxt()
for Nuxt applicationsforNuxtModules()
for Nuxt module developmentThis should not happen with the default configuration. If it does, ensure you're using the latest version and report an issue.
These warnings help the CSS filtering system learn about new rules. They're informational and don't affect functionality.
To debug ESLint configuration issues:
1# Show resolved configuration for a specific file 2eslint --print-config path/to/file.js 3 4# Enable ESLint debug output 5DEBUG=eslint:* eslint . 6 7# Debug specific aspects 8DEBUG=eslint:eslint eslint .
For AI assistants working with this codebase, refer to AGENT.md for detailed guidance and conventions.
1src/ 2├── configs/ # Individual ESLint rule configurations 3├── core/ # Core utilities and type definitions 4├── config.ts # Main configuration builder 5├── configs.ts # Configuration presets 6├── index.ts # Main entry point 7└── nuxt.ts # Nuxt-specific configurations
src/configs/
pnpm build
to compile the packagepnpm lint
(self-linting)pnpm -r --filter "./examples/*" lint
MIT
No vulnerabilities found.
No security vulnerabilities found.