0.1.1 • Published 3 years ago

@thesergiomiguel/eslint-config v0.1.1

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

Extendable eslint config, with TypeScript and Prettier and (optionally) React.


Installation

npm i -D @thesergiomiguel/eslint-config

Note: npm versions > 3 and < 7 don't automatically install peerDependencies, so peep into package.json and install them manually as needed.

Usage

  1. Add this package to the extends array in eslintrc
{
  extends: [..., '@thesergiomiguel/eslint-config'],
}

If you are using ESLint in a React project, use @thesergiomiguel/eslint-config/with-react instead.

  1. Specify the location of your tsconfig in config.parserOptions
{
    tsconfigRootDir: __dirname,
    project: "./tsconfig.json",
}

This is necessary to enable rules that require type information.

  1. Export the Prettier config exposed here from your prettierrc
module.exports = {
  ...require('@thesergiomiguel/eslint-config/prettierrc'),
};