@mangoweb/eslint-config-ts

0.0.1 • Public • Published

@mangoweb/eslint-config-ts

ESLint configuration using Prettier designed for TS.

Installation

  1. Install the config: $ npm install @mangoweb/eslint-config-ts --save-dev
  2. And its peer dependencies: $ npm install @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier --save-dev
  3. If you want to use the manGoweb prettier config, also run $ npm install @mangoweb/prettier-config --save-dev

⚠️ You might want to also fix the package version so that any potential future backwards incompatibilities don't break your build. This package is generally intended for live development with the occasional BC break. Should that affect your application because you failed to fix the version, that's on you.

Usage

  1. Create a .prettierrc.js file in your project root:
    module.exports = {
        ...require("@mangoweb/prettier-config"), // Or something else
        // Add any project-specific overrides
        // E.g. semi: false
    }
  2. Create a .eslintrc.js in your project root:
    module.exports = {
        extends:  [
            '@mangoweb/eslint-config-ts',
        ]
    }
  3. Configure your ide to use these files. It will likely find them automatically though.

Optionally, also add these to your package.json:

{
    "scripts": {
        "eslint:lint": "eslint \"src/**/*.{ts,tsx}\" ",
        "eslint:fix": "eslint --fix \"src/**/*.{ts,tsx}\" "
    }
}

That's it!

Readme

Keywords

none

Package Sidebar

Install

npm i @mangoweb/eslint-config-ts

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

3.68 kB

Total Files

3

Last publish

Collaborators

  • jirkavebr
  • luchalupa
  • mango-cli
  • matejsimek
  • onset
  • viliamkopecky