3.0.0 • Published 1 month ago

eslint-config-oschweitzer v3.0.0

Weekly downloads
73
License
ISC
Repository
github
Last release
1 month ago

eslint-config-oschweitzer

Description

Set of TypeScript rules for eslint.

Usage

On your TypeScript application,

  1. Install the necessary dependencies:

    npm i -D eslint eslint-import-resolver-typescript eslint-config-oschweitzer eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser

  2. Create a file named .eslintrc.js and paste the following code

    module.exports = {
      extends: ['eslint-config-oschweitzer']
    };
  3. Add a .prettierrc file in the root directory with the following content

    {
      "singleQuote": true,
      "trailingComma": "all"
    }
  4. In your package.json, add these two scripts lines:

    {
      ...
      "scripts": {
        ...
        "lint": "npx eslint . --ext .ts,.tsx",
        "lint:fix": "npx eslint --fix . --ext .ts,.tsx",
        ...
      },
      ...
    }

Now run npm run lint to check if everything went well.

This linter will not work on JavaScript code.

3.0.0

1 month ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

0.0.1

4 years ago

1.0.0

4 years ago