Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@nodecfdi/eslint-config

nodecfdi182MIT3.5.1TypeScript support: included

Configuración base de Eslint para proyectos NodeCfdi

eslint, eslint_config, nodecfdi, shared, config

readme

@nodecfdi/eslint-config

Source Code Discord Latest Version Software License Total Downloads

La libreria @nodecfdi/eslint-config exporta la configuración base para eslint usada en los proyectos de NodeCfdi.

:us: The documentation of this project is in spanish as this is the natural language for intended audience.

:mexico: La documentación del proyecto está en español porque ese es el lenguaje principal de los usuarios.

[!WARNING] This package is native ESM and no longer provides a CommonJS export. If your project uses CommonJS, you will have to convert to ESM. Please don't open issues for questions regarding CommonJS / ESM.

Instalación

NPM

npm i -D eslint @nodecfdi/eslint-config

Yarn

yarn add -D eslint @nodecfdi/eslint-config

PNPM

pnpm add -D eslint @nodecfdi/eslint-config

Uso básico

Para habilitar está configuración crea un archivo eslint.config.js en el root del proyecto y copia y pega el siguiente contenido:

// @ts-check
import nodecfdiConfig from '@nodecfdi/eslint-config';

const { defineConfig } = nodecfdiConfig(import.meta.dirname);

export default defineConfig(); // Puedes agregar mas reglas o bloques de configuracion dentro de esta funcion

[!NOTE]
Por defecto tiene habilitado las siguientes opciones: projectService -> true, sonarjs -> true

Si deseas aplicar algun ajuste puedes y/o personalización puedes hacerlo de la siguiente manera:

// @ts-check
import nodecfdiConfig from '@nodecfdi/eslint-config';

const { defineConfig } = nodecfdiConfig(import.meta.dirname, {
  vitest: true,
  adonisjs: true,
  sonarjs: true,
  n: true,
});

export default defineConfig(); // Puedes agregar mas reglas o bloques de configuracion dentro de esta funcion

Ajustes y personalizaciones

type NodecfdiSettings = {
  /**
   * Vitest support.
   */
  vitest?: boolean;
  /**
   * AdonisJS support.
   */
  adonisjs?: boolean;
  /**
   * Vue3 Support.
   */
  vue?:
    | boolean
    | {
        globalComponentsPatterns?: string[];
        globalPropertiesPatterns?: string[];
      };
  /**
   * SonarJS support
   */
  sonarjs?: boolean;
  /**
   * N support
   */
  n?: boolean;
  /**
   * NX support
   */
  nx?: boolean;
  /**
   * Nuxt support
   */
  nuxt?: boolean;
  /**
   * Typescript eslint project service option
   */
  projectService?: boolean | ProjectServiceOptions;
  /**
   * This setting apply some ignore patterns to the whole config.
   */
  ignores?: {
    /**
     * Some commonly ignored folders.
     */
    recommended?: boolean;
    /**
     * With this setting, Nodecfdi will ignore all the files that are currently ignored by git. Chances are that if you are ignoring a file in git, you don't want to lint it, which usually is the case with temporary and autogenerated files.
     */
    inheritedFromGitignore?: boolean;
    /**
     * Include additional ignore files paths or regex paths to ignore on current eslint config
     */
    additional?: string[];
  };
};

Soporte

Puedes obtener soporte abriendo un ticket en Github.

Compatibilidad

Esta librería se mantendrá compatible con al menos la versión con soporte activo de Node más reciente y soporte activo de Typescript más reciente.

También utilizamos Versionado Semántico 2.0.0 por lo que puedes usar esta librería sin temor a romper tu aplicación.

Contribuciones

Las contribuciones con bienvenidas. Por favor lee CONTRIBUTING para más detalles y recuerda revisar el archivo CHANGELOG.

The @nodecfdi/eslint-config library is copyright © NodeCfdi and licensed for use under the MIT License (MIT). Please see LICENSE for more information.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v3.5.1

Commits

  • fix: :adhesive_bandage: resolve missing rules and overrides for better completion 8e7628f
  • chore: :arrow_up: update dependencies 6c9d1b5

v3.5.0 - 2025-07-10

Commits

  • feat: :sparkles: add support to nuxt and nx configs 2968271
  • chore(release): :tada: 3.5.0 31c976b
  • chore: :construction: ignore tsconfig 30daaa3

v3.5.0-0 - 2025-07-08

Commits

  • chore: :construction: add new config for config async based on selection 992d728
  • refactor: :recycle: apply performance and good parser set on typescript and vue 737de8f
  • chore: :arrow_up: update dependencies and new export config async 4d1c411

v3.4.1 - 2025-06-26

Commits

  • chore(release): :tada: 3.4.1 f2c8103
  • chore: :arrow_up: update dependencies c644101
  • fix: :bug: resolve issues on old rules of import-x 9df4b13

v3.4.0 - 2025-06-23

Commits

  • refactor: :recycle: change import-x for import for recent slow performance with import-x 32caddf
  • chore(release): :tada: 3.4.0 60b4bb3
  • refactor: :recycle: remove only type dependency and use composable type 2463213

v3.3.1 - 2025-06-23

Commits

  • chore: :arrow_up: update dependencies bb3439c
  • chore(release): :tada: 3.3.1 ba4ca84

v3.3.0 - 2025-05-28

Commits

  • chore: :arrow_up: update dependencies bf8f067
  • refactor: :recycle: move from latest change on stylistic plugin 23c7ffd
  • chore(release): :tada: 3.3.0 61dd65b

v3.2.1 - 2025-05-05

Commits

  • chore: :arrow_up: - update dependencies b120c76
  • chore(release): :tada: 3.2.1 5139ac9

v3.2.0 - 2025-04-09

Commits

  • chore: :arrow_up: - upgrade dependencies a497ec0
  • chore(release): :tada: 3.2.0 2cff48a
  • style: :lipstick: - apply missing format ebe1fd6

v3.1.1 - 2025-03-24

Commits

  • chore: :arrow_up: update dependencies 65c1913
  • chore(release): :tada: 3.1.1 2e9edea

v3.1.0 - 2025-03-10

Commits

  • chore: :arrow_up: update dependencies 481e2f7
  • chore(release): :tada: 3.1.0 e129a01
  • fix: :bug: resolve rules overlapped and bad for duplicate ebeaedf

v3.0.0 - 2025-02-26

Commits

  • chore: :arrow_up: update dependencies and remove unused 41354fc
  • refactor: :construction: update configs for latest updates and remove unused and depracateds 73e8883
  • refactor: :boom: remove regexp and security plugins, better usage using sonarjs bc4c468

v2.4.4 - 2025-02-11

Commits

  • chore: :arrow_up: update dependencies 36fb405
  • chore(release): :tada: 2.4.4 e46aec6

v2.4.3 - 2025-01-26

Commits

  • chore: :arrow_up: update dependencies 30705f7
  • chore(release): :tada: 2.4.3 bdcf689
  • fix: :bug: resolve sonarjs errors incompatible and redundant rule 420fab4

v2.4.2 - 2024-12-23

Commits

  • chore: :arrow_up: update dependencies for maintenance 7576d78
  • chore(release): :tada: 2.4.2 7a99dfc
  • refactor: :recycle: add missing ignore entry and disable missing duplicate typescript rule 9da653e

v2.4.1 - 2024-12-13

Commits

  • chore(release): :tada: 2.4.1 81cb20b
  • chore: :arrow_up: update dependencies 313d11e
  • fix: :bug: resolve no hardcoded passwords and change delete sonar on rules 6c4e0be

v2.4.0 - 2024-12-07

Commits

  • refactor: :recycle: remove usage of imports package json alias 8f5c691
  • build: :construction: change from tshy to tsup for better generation lib and support to tree shake c9d54f6
  • chore(release): :tada: 2.4.0 ce3ecf1

v2.3.7 - 2024-11-30

Commits

  • chore: :arrow_up: update dependencies 84fcb10
  • chore(release): :tada: 2.3.7 fdcb872
  • fix: :bug: resolve problem with no param reasign its falsy valus 43e90d5

v2.3.6 - 2024-11-26

Commits

  • chore(release): :tada: 2.3.6 685f5a3
  • fix: :bug: resolve breaking and missing rules for adonisjs and unicorn c7cabef
  • chore: :arrow_up: update dependencies 38061cc

v2.3.5 - 2024-11-25

Commits

  • chore(release): :tada: 2.3.5 7c3f12e
  • chore: :arrow_up: update dependencies 131e053
  • fix: :bug: resolve correct flat config type f86e473

v2.3.4 - 2024-11-20

Commits

  • chore(release): :tada: 2.3.4 2656c71
  • fix: :bug: resolve component name in template casing for Head and Link components 1f55af6

v2.3.3 - 2024-11-20

Commits

  • chore(release): :tada: 2.3.3 ca07ab4
  • chore: :arrow_up: update dependencies f5594ba
  • fix: :bug: resolve component name in template casing for packages not only registeredComponents 60a9ad4

v2.3.2 - 2024-11-18

Commits

  • chore(release): :tada: 2.3.2 2e6aa5a
  • fix: :bug: resolve problem with sonarjs and latest eslint version 4daa7fb

v2.3.1 - 2024-11-18

Commits

  • chore: :arrow_up: update dependencies and resolved problems with typescript-eslint config ab84d25
  • chore(release): :tada: 2.3.1 fc6deab
  • docs: :memo: update readme with latest changes 6e9b406

v2.3.0 - 2024-11-17

Commits

  • feat: :sparkles: add new node config for support node config using n plugin fd1f3b4
  • chore: :arrow_up: update dependencies 3f38ad4
  • feat: :sparkles: add vue extended config for not standard rules like a undef components a1e46b5

v2.2.3 - 2024-11-03

Commits

  • chore(release): :tada: 2.2.3 203e5f2
  • chore: :arrow_up: update dependencies 7fcc62f
  • perf: :construction: remove duplicate rule handle with sonarjs b0b2add

v2.2.2 - 2024-10-30

Commits

  • chore: :arrow_up: update dependencies 9fc9690
  • chore(release): :tada: 2.2.2 57f6b25

v2.2.1 - 2024-10-21

Commits

  • chore: :arrow_up: update dependencies and handle resolutions for peers 98eb053
  • chore(release): :tada: 2.2.1 deccdf4
  • fix: :construction: resolve how to handle eslint and adonisjs rules for paths 017ff40

v2.2.0 - 2024-10-17

Commits

  • chore(release): :tada: 2.2.0 f455147
  • refactor: :recycle: add expected output for release version script fb45bef
  • style: :lipstick: resolve rules for adonisjs and sonarjs problems 5b33e47

v2.1.3 - 2024-10-16

Commits

  • perf: :wrench: update configs for better handle with latest sonarjs and adonis 26d0709
  • chore(release): :tada: 2.1.3 7069d38
  • chore: :construction: update pnpm package manager 1a7a2c6

v2.1.2 - 2024-10-14

Commits

  • chore: :arrow_up: update dependencies and try resolve problem with sonarjs peers 2f8bf51
  • chore(release): :tada: 2.1.2 1416fba
  • chore: :arrow_up: update dependencies c54376c

v2.1.1 - 2024-10-09

Commits

  • chore(release): :tada: 2.1.1 5c6aaf9
  • fix: :bug: fix disable typeChecked in js files only need in ts 27cec5a

v2.1.1-0 - 2024-10-08

Commits

  • chore(release): :tada: 2.1.1-0 39831ef
  • perf: :zap: try setting override for remove warns on projects with sonarjs bb2d4ee
  • fix: :bug: resolve problem with handle resolutions for typescript config 3de1f00

v2.1.0 - 2024-10-08

Commits

  • feat: :sparkles: add support to sonarjs rules with module activate option, not default applied b2e7e65
  • style: :rotating_light: apply lint issues fix and small refactoring b44ca74
  • chore(release): :tada: 2.1.0 45983bd

v2.0.6 - 2024-10-03

Commits

  • chore(release): :tada: 2.0.6 55f9aaa
  • chore: :arrow_up: update dependencies fe72c7d
  • perf: :construction_worker: disable rule for import-x, is same like a typescript rules, duplicity 3affa2c

v2.0.5 - 2024-10-01

Commits

  • chore: :construction: update rules and config for import and default typescript service be18898
  • chore(release): :tada: 2.0.5 d5313d9
  • chore: :arrow_up: update dependencies 2da6d37

v2.0.4 - 2024-09-25

Commits

  • chore(release): :tada: 2.0.4 5b4f778
  • chore: :arrow_up: upgrade dependencies 7a22fd1
  • fix: :bug: apply resolution of override rule for adonis controllers 305fdbe

v2.0.3 - 2024-09-17

Commits

  • chore(release): :tada: 2.0.3 0d95dce
  • chore: :arrow_up: update dependencies 93224de
  • fix: :bug: resolve problem with relationships in lucid adonis c7d1f61

v2.0.2 - 2024-09-09

Commits

  • chore(release): :tada: 2.0.2 cb5d31e
  • chore: :arrow_up: update dependencies and apply recent files to dependencies libs a508944

v2.0.1 - 2024-09-04

Commits

  • chore(release): :tada: 2.0.1 fb72c24
  • fix: :bug: resolve problem with missing typescript resolver in plugin eslint-import-x 250b55c

v2.0.0 - 2024-09-03

Commits

  • refactor: :fire: move rules overrides off to overrides config and added after all configs rules c021c18
  • chore(release): :tada: 2.0.0 df28296
  • fix: :bug: resolve order for override default recommended eslint config apply 256e8bf

v2.0.0-2 - 2024-09-03

Commits

  • fix: :bug: resolve problem with handle default project files and projectService 0a49817
  • chore(release): :tada: 2.0.0-2 4a213a8

v2.0.0-1 - 2024-09-03

Commits

  • fix: :bug: resolve problem with rules and optional option for nodecfdi config b5d202b
  • fix: :bug: resolve allow types consistent. typescript definition types 92ea2fb
  • chore(release): :tada: 2.0.0-1 f092f28

v2.0.0-0 - 2024-09-03

Commits

  • chore: :truck: move package eslint-config for independent repository c5a26a4
  • feat: :sparkles: add full support to eslint v9 5b89f30
  • docs: :memo: add missing readme update for latest release 3b54c71

1.10.4

Patch Changes

  • resolve build dist files

1.10.3

Patch Changes - Resolve problem unicor and sonarjs

  • resolve break rules unicorn and sonarjs

1.10.2

Patch Changes - Resolve problem with canonical and sonarjs

  • clean code
  • resolve problem with sonarjs and canonical config
  • update dependencies

1.10.1

Patch Changes

  • fix: resolve handle typecheck for none js

1.10.0

Minor Changes - Support to projectService tseslint

  • add support to use tseslint project service
  • update rules for adonis
  • update rules for tests files (vitest and ignores)
  • update dependencies

1.9.3

Patch Changes - Update rules for adonis and typescript

  • update rules for adonisjs and typescript
  • update dependencies
  • maintenance code

1.9.2

Patch Changes - Ignore references on adonis inertia

  • update config for typescript
  • update adonis rules
  • update dependencies

1.9.1

Patch Changes - Better support on vue files and vite

  • provide better handling vue configuration
  • revert ignore vite config and dts on vite projects
  • update dependencies

1.9.0

Minor Changes - Support to filename PascalCase on vue files

  • ignore vite config and dts of vite projects
  • support to pascal case on vue files
  • update dependencies

1.8.1

Patch Changes - Resolve problem with plugin import

  • update rule extensions for support with imports in package.json file
  • update dependencies

1.8.0

Minor Changes - Support to vue block order

  • add support to eslint vue block order
  • update rules of import-x, ignore package librarys
  • update dependencies

1.7.1

Patch Changes - Update dependencies

  • minor update code (maintenance)
  • update dependencies

1.7.0

Minor Changes - Add new config overrides

  • add new config overrides
  • update rules for adonis
  • update rules for vue
  • update handle types for latest update dependencies
  • update dependencies

1.6.7

Patch Changes - Update rules review 13

  • update rules for unicorn
  • update rules for adonisjs config disable sonarjs rule for seeders
  • update dependencies

1.6.6

Patch Changes - Fix rule stylistic

  • fix quote rule stylistic break with prettier
  • remove unnecesary exports of types

1.6.5

Patch Changes - Update rules review 12

  • update docs files for latest changes in organization
  • remove usage of plugin tsdoc, breaks rules with jsdoc
  • update rules for stylistic add rules for better quotes
  • update rules for typescript add rules for types
  • update rules for adonisjs config remove declaration of types
  • update dependencies

1.6.4

Patch Changes - Update rules review 11

  • update config languageOptions for unicorn config
  • update rules for vue config
  • update rules for adonisjs config
  • update usage of flat recommended eslint config in vue-accessibility
  • update types for vue-accessibility last release
  • update dependencies

1.6.3

Patch Changes - Update rules review 10

  • update correct typess for eslint-plugin-sort-imports
  • update rules for adonisjs config
  • update dependencies

1.6.2

Patch Changes - Update rules adonisjs

  • update rules for adonisjs config
  • update dependencies

1.6.1

Patch Changes - Update dependencies and rules

  • update rules for adonisjs config
  • update rules for stylistic config
  • update dependencies
  • remove unused module declaration

1.6.0

Minor Changes - Fix types, typos and rules

  • prepare for latest version eslint 9
  • added correct type export and scaffold of lib
  • refactor code for better wrapper configs
  • update rules for adonisjs
  • update rules review 8
  • update dependencies

1.5.5

Patch Changes - Refactoring plugin import

  • move from eslint-plugin-import to use eslint-plugin-import-x
  • update dependencies
  • move tsconfig
  • update rules review 7

1.5.4

Patch Changes - Fix plugin import and review 6 in rules

  • resolve import problems and review 6 in rules
  • update dependencies
  • update rules review 6
  • small refactoring code

1.5.3

Patch Changes - Fix plugin import

  • solve problem with import extensions
  • refactor on stylistic plugins with class members
  • small refactoring

1.5.2

Patch Changes - Fix import plugin vue support

  • fix vue import extension always

1.5.1

Patch Changes - Fix latest vue support

  • fix supported files vue for anothers plugins
  • update rules five review
  • small refactoring code

1.5.0

Minor Changes - Add Vue Accessibility Plugin

  • add vue accessibility plugin
  • fix supported files with vue support
  • update rules four review
  • update dependencies

1.4.1

Patch Changes - Fix correct usage of config vue3

  • fix correct flat config of vue3
  • fix correct module type vue3

1.4.0

Minor Changes - Support to vue and adonisjs projects

  • update stylistic rules
  • update types
  • add support to vue config
  • add support to adonisjs config
  • update dependencies

1.3.0

Minor Changes - Update rules third review

  • update rules
  • add security plugin
  • update dependencies

1.2.0

Minor Changes - Update rules second review

  • update rules and added support to bundlers
  • apply update dependencies

1.1.0

Minor Changes - Update rules first review

  • update rules and remove rules for better lint
  • add setting ignore additional for better ignore files

1.0.0

Major - Initial version

  • first release version