@empathyco/eslint-config
TypeScript icon, indicating that this package has built-in type declarations

1.10.7 • Public • Published

@empathyco/eslint-config

NPM Version code style

[!NOTE] The ESLint and Prettier dependencies are referenced in the package itself, so there is no needed to install them in your project.

Usage

Install

npm i -D @empathyco/eslint-config

ESLint config

Create eslint.config.mjs in your project root:

// eslint.config.mjs
import { empathyco } from '@empathyco/eslint-config'

export default empathyco()

Prettier config

Reference shared config file into package.json:

{
  "prettier": "@empathyco/eslint-config/prettier"
}

Add scripts for package.json

This is a script set that you can add to your repository:

{
  "scripts": {
    "lint": "eslint --fix .",
    "lint:check": "eslint .",
    "lint:inspect": "eslint --inspect-config .",
    "format": "prettier --write .",
    "format:check": "prettier --check ."
  }
}

Customization

Configure the initial preset with the same parameters as expose @antfu/eslint-config

Example:

import { empathyco } from '@empathyco/eslint-config'

export default empathyco(
  // Configures for empathyco's (antfu) config.
  {},
  // From the second arguments they are ESLint Flat Configs.
  // You can have multiple configs.
  {
    rules: {
      'vue/custom-event-name-casing': 'off',
    },
  },
  {
    files: ['**/*.spec.{ts,tsx,js,jsx}'],
    rules: {
      'jsdoc/check-param-names': 'off',
    },
  },
)

Package Sidebar

Install

npm i @empathyco/eslint-config

Weekly Downloads

1,020

Version

1.10.7

License

Apache-2.0

Unpacked Size

20.3 kB

Total Files

8

Last publish

Collaborators

  • empathy-support
  • sitorbj
  • joseac
  • empathy-platform-team
  • adrianarenal