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

3.0.0 • Public • Published

@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.

Package Sidebar

Install

npm i @axah/eslint-config

Weekly Downloads

1,054

Version

3.0.0

License

MIT

Unpacked Size

18.8 kB

Total Files

8

Last publish

Collaborators

  • sandrozbinden-axa
  • putnockyt
  • pascaltan
  • thedadi
  • dan-m
  • tico86
  • brukri
  • healthbot
  • andibolleteraxa
  • david_s