@planfredapp/eslint-config
| Install | |
|---|---|
npm install @planfredapp/eslint-config |
|
| Latest Version: | 1.2.15 |
| License: | MIT |
| Last Updated: | Sep 24, 2026 |
| Links: | npm |
@planfredapp/eslint-config
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.jsoreslint.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 importssrc/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
resolveandreject
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
Related Packages
Pacote de padronização de código padrão para os projetos Yampi usando Node.js
Opinionated ESLint config for consistent, clean, auto-sorted code in TRES Vue3 a...
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 | |
| 1.1.2 | MIT | |
| 1.1.0 | MIT | |
| 1.0.60 | MIT | |
| 1.0.59 | MIT | |
| 1.0.57 | MIT | |
| 1.0.55 | MIT | |
| 1.0.53 | MIT | |
| 1.0.52 | MIT | |
| 1.0.51 | MIT | |
| 1.0.50 | MIT | |
| 1.0.49 | MIT | |
| 1.0.48 | MIT | |
| 1.0.47 | MIT | |
| 1.0.46 | MIT | |
| 1.0.45 | MIT | |
| 1.0.44 | MIT | |
| 1.0.42 | MIT | |
| 1.0.41 | MIT | |
| 1.0.34 | MIT | |
| 1.0.26 | MIT | |
| 1.0.25 | MIT | |
| 1.0.17 | MIT | |
| 1.0.16 | MIT | |
| 1.0.15 | MIT | |
| 1.0.14 | MIT |
Showing the latest 30 of 32. See every release on npm