@muravjev/configs-eslint-ts

0.1.5 • Public • Published

Shared eslint configuration

The purpose of the eslint is linting javascript and typescript languages (js, ts, tsx).

This configuration targets monorepo packages.


Contents

Setup

  • Add workspace reference to @muravjev/configs-eslint-ts and its peer dependencies:

    pnpm add -w @muravjev/configs-eslint-ts eslint
  • Add eslint configuration file:

    // .eslintrc.js
    
    module.exports = require('@muravjev/configs-eslint-ts');
  • Add eslint ignore patterns file:

    # .eslintignore
    
    !.*
    node_modules/
    
    # Next ignore patterns
    .next/
    .build/
    .coverage/
    
    # Custom ignore patterns
    ...
  • Add eslint scripts:

    // package.json
    
    "scripts": {
      ...
      "lint": "eslint --ext mjs,js,ts,tsx",
      "lint:fix": "pnpm lint --fix"
      ...
    }

Automation

Usage

  • Automatic validation file with eslint on save.

  • Automatic validation of staged files with eslint on commit.

  • Manual usage from command line:

    pnpm lint .
    pnpm lint:fix .

Donation

If you found this project helpful, consider
buying me a coffee, donate by paypal or just leave a star
Thanks for your support, it is much appreciated!

License

MIT © Sergey Muravjev


Back


Package Sidebar

Install

npm i @muravjev/configs-eslint-ts

Weekly Downloads

45

Version

0.1.5

License

MIT

Unpacked Size

4.77 kB

Total Files

5

Last publish

Collaborators

  • muravjev