Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@empathyco/eslint-config

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@empathyco/eslint-config

ESLint and Prettier config preset

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
187
decreased by-38.28%
Maintainers
0
Weekly downloads
 
Created
Source

@empathyco/eslint-config

NPM Version code style

  • ESLint as code linter sharing configuration preset.
  • Prettier as code formatter sharing configuration preset.
  • @antfu/eslint-config as default ESLint config preset.
  • @eslint/config-inspector the visual tool for inspecting and understanding your ESLint flat configs.

[!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',
    },
  },
)

Keywords

FAQs

Package last updated on 20 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc