3.3.0 • Published 7 months ago

@nodecfdi/eslint-config v3.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

@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;
  /**
   * Node using n support
   */
  n?: 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.

Copyright and License

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

2.4.1

1 year ago

2.2.3

1 year ago

2.4.0

1 year ago

2.4.3

11 months ago

2.4.2

12 months ago

2.4.4

10 months ago

3.2.1

8 months ago

3.2.0

9 months ago

2.3.7

1 year ago

3.0.0

10 months ago

2.3.0

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.3.4

1 year ago

2.3.3

1 year ago

2.3.6

1 year ago

2.3.5

1 year ago

3.3.0

7 months ago

3.1.1

9 months ago

3.1.0

10 months ago

2.2.2

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.6

1 year ago

2.1.1-0

1 year ago

2.1.0

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.0-2

1 year ago

2.0.0-1

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

2.0.0-0

1 year ago

1.10.4

1 year ago

1.10.3

1 year ago

1.10.2

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.1

1 year ago

1.7.0

2 years ago

1.6.7

2 years ago

1.9.3

1 year ago

1.9.2

1 year ago

1.10.1

1 year ago

1.10.0

1 year ago

1.6.6

2 years ago

1.6.5

2 years ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago