Skip to content

gcoguiec/eslint-config

@gcoguiec/eslint-config

A few reusable ESLint configurations.

CI Status License


Table of Contents

Getting Started

ECMAScript

Install

pnpm add -D eslint eslint-plugin-import-x tslib eslint-plugin-perfectionist eslint-config-prettier @gcoguiec/eslint-config

Register the configuration with eslint

// eslint.config.js
import { ecmascript } from '@gcoguiec/eslint-config';

export default [...(await ecmascript())];

TypeScript

Install

pnpm add -D eslint eslint-plugin-import-x tslib eslint-plugin-perfectionist eslint-config-prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser @gcoguiec/eslint-config

Register the configuration with eslint

// eslint.config.js
import { typescript } from '@gcoguiec/eslint-config';

export default [...(await typescript())];

Vue

Install

pnpm add -D eslint eslint-plugin-import-x tslib eslint-plugin-perfectionist eslint-config-prettier eslint-plugin-vue @gcoguiec/eslint-config

Install (TypeScript only)

pnpm add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser

Register the configuration with eslint

// eslint.config.js
import { vue } from '@gcoguiec/eslint-config';

// ECMAScript
export default [...(await vue())];

// TypeScript
export default [...(await vue({ typescript: true }))];

Additional Configurations

Vitest

Install

pnpm add -D eslint-plugin-vitest

Register the configuration with eslint

// eslint.config.js
import { ecmascript, typescript, vitest } from '@gcoguiec/eslint-config';

// ECMAScript
export default [
  ...(await ecmascript()),
  ...(await vitest())
];

// TypeScript
export default [
  ...(await typescript()),
  ...(await vitest({ typescript: true }))
];

License

This project is licensed under BSD 2-Clause.