Socket
Book a DemoInstallSign in
Socket

@axah/eslint-config

Package Overview
Dependencies
Maintainers
10
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axah/eslint-config

Shared eslint config for @axah projects

latest
Source
npmnpm
Version
3.1.0
Version published
Maintainers
10
Created
Source

@axah/eslint-config

Shared Eslint config for @axah projects

Install

$ npm install --save-dev @axah/eslint-config
$ yarn add --dev @axah/eslint-config

Usage

Also make sure to have prettier and of course typescript and eslint installed as well. Then add the following config to your extend array in your eslint config file.

module.exports = {
    extends: [
        '@axah/eslint-config', // this is the base
        /*
            for react: '@axah/eslint-config/react'
        */
    ],
    parserOptions: {
        project: './tsconfig.json', // should be the path to the projects tsconfig.json
    },
}

IMPORTANT:

  • For this config to work you need to have a tsconfig.json file at the repo root level, and then you have to set the parserOptions.project to point to your tsconfig file. see the @typescript-eslint plugin docs.
  • for the best experience you should have a prettier config file at the repo root as well, otherwise the eslint-config-prettier will use its builtin defaults.
  • if you use path aliases, (e.g. use "@" as a path alias to /src etc.), you will probably need to setup a path resolver for the eslint-plugin-import package or turn off some of its rules. There is a resolver for node, typescript, babel, webpack etc.

Keywords

eslint

FAQs

Package last updated on 17 Jun 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