@planfredapp/eslint-config

Shared ESLint 10 flat configurations for Planfred projects
24,049
Install
npm install @planfredapp/eslint-config
Latest Version:1.2.15
License:MIT
Last Updated:Sep 24, 2026
Links: npm
Maintainer: planfred-admin

@planfredapp/eslint-config

View package on npm

npm version License: MIT

Shared ESLint 10 flat configs used in Planfred projects.

The package ships its plugins and parsers as dependencies. In consuming projects, eslint is the only required peer dependency.

Requirements

  • Node >=26
  • eslint >= 10
  • An ESM flat config file such as eslint.config.js or eslint.config.mjs

Installation

pnpm add -D eslint @planfredapp/eslint-config
# or
npm install --save-dev eslint @planfredapp/eslint-config

Available Configs

Config Import Path What It Adds
Base @planfredapp/eslint-config or @planfredapp/eslint-config/base @eslint/js, import rules, promise rules, Node rules, stylistic rules, browser and Node globals
Vue @planfredapp/eslint-config/vue Base config, eslint-plugin-vue recommended flat config, Vue-specific style and correctness rules
Cypress @planfredapp/eslint-config/cypress Base config, typescript-eslint recommended rules, Cypress globals, .only() protection
Test @planfredapp/eslint-config/test Base config, Vitest recommended rules, test globals, .only() protection

Every specialized entrypoint already includes the complete base config. Use the base entrypoint by itself for plain JavaScript, or select a specialized entrypoint when it applies to the whole project.

Vue-Specific Assumptions

The Vue config contains a few project-structure assumptions:

  • src/**/* must use @ imports instead of relative imports
  • src/components/**/* enforces component/file-name matching
  • The config is intended for Vue 3 single-file components

Usage

Use the entrypoint that matches the project you are linting.

Base

import config from '@planfredapp/eslint-config'

export default [
  ...config,
]

Vue

import config from '@planfredapp/eslint-config/vue'

export default [
  ...config,
]

Cypress

import config from '@planfredapp/eslint-config/cypress'

export default [
  ...config,
]

Vitest

import config from '@planfredapp/eslint-config/test'

export default [
  ...config,
]

Customizing

Append your own config objects after the shared config:

import vueConfig from '@planfredapp/eslint-config/vue'

export default [
  ...vueConfig,
  {
    ignores: [
      'dist/**',
      'coverage/**',
    ],
  },
  {
    rules: {
      'no-console': 'warn',
    },
  },
]

If one root eslint.config.js combines multiple specialized configs, apply the base config once and scope only each specialized config's additional entries:

import baseConfig from '@planfredapp/eslint-config'
import cypressConfig from '@planfredapp/eslint-config/cypress'
import testConfig from '@planfredapp/eslint-config/test'

const withoutBase = config => config.slice(baseConfig.length)
const scope = (config, files) => config.map(entry => ({
  ...entry,
  files,
}))

export default [
  ...baseConfig,
  ...scope(withoutBase(cypressConfig), [ 'cypress/**/*.{js,ts}' ]),
  ...scope(withoutBase(testConfig), [ 'test/**/*.{js,ts}' ]),
]

This avoids applying the base entries more than once. The specialized entrypoints intentionally begin with the same base config entries.

What The Base Config Enforces

  • 2-space indentation
  • Single quotes
  • No semicolons
  • Trailing commas for multiline arrays, objects, imports, exports, and function params
  • Blank lines between most statements
  • Import ordering with grouped and alphabetized imports
  • no-var, prefer-const, and a broad set of core correctness rules
  • Promise executor parameters named resolve and reject

The Vue config also enforces @/ imports inside src/ through the bundled no-relative-import-paths rule and provides an autofix for matching relative imports.

Package Contents

The npm package contains the four public config entrypoints plus the two internal custom-rule modules they use. Repository-only ESLint and Vitest config files are excluded from the published tarball.

Development

pnpm lint
pnpm vitest run test/<relevant-spec>.test.js

Run the complete test suite through GitHub Actions. More details are in TESTING.md. Release history is in CHANGELOG.md.

License

MIT

Related Packages

@somosyampi/eslint-config

Pacote de padronização de código padrão para os projetos Yampi usando Node.js

2,164
@tresinternet/eslint-config-vue3

Opinionated ESLint config for consistent, clean, auto-sorted code in TRES Vue3 a...

2,631
eslint-config-light-vue3

开箱即用的 Eslint 配置

19,634
@so1ve/eslint-config-vue

Ray's eslint config for vue.

18,733 29
@singularit/eslint-config-vue

@singularit/eslint-config-vue

16,863

Version History

Version Released License
1.2.15 MIT
1.2.12 MIT
1.2.1 MIT
1.2.0 MIT
1.1.3 MIT