Skip to content

mskelton/eslint-config

Repository files navigation

@mskelton/eslint-config

Build status package version semantic-release

Simple and sensible ESLint config.

Description

This package contains a simple and sensible ESLint config that you can use to get up and running. It uses the TypeScript ESLint and Prettier.

Installation

npm install -D @mskelton/eslint-config eslint

Usage

In your eslint.config.mjs file, add the following content including the configs you want for your project.

import mskelton from "@mskelton/eslint-config"

/** @type {import('eslint').Linter.Config[]} */
export default [
  ...mskelton.recommended,
  mskelton.react,
  {
    ...mskelton.playwright,
    files: ["test/**/*.spec.ts"],
  },
  {
    ...mskelton.vitest,
    files: ["**/__tests__/**/*.{spec,test}.{js,jsx,cjs,mjs,ts,tsx,cts,mts}"],
  },
  {
    ...mskelton.jest,
    files: ["**/__tests__/**/*.{spec,test}.{js,jsx,cjs,mjs,ts,tsx,cts,mts}"],
  },
]