1.0.3 • Published 1 year ago

@mobilejazz/eslint-config v1.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Mobile Jazz ESLint Config

Shared ESLint config used in Mobile Jazz projects.

This is meant to be used alongside Prettier (with @mobilejazz/prettier-config).

Usage

  1. Remove existing .eslintrc.* file, if present.
  2. Install eslint and the config.

    npm install -D eslint @mobilejazz/eslint-config
  3. Install all the needed dependencies from this library

    npx install-peerdeps --dev @mobilejazz/eslint-config
  4. Add the lint configuration that you need to yourpackage.json, javascipt, typescript or angular:

    "eslintConfig": {
      "extends": "@mobilejazz/eslint-config/angular"
    }

With Prettier and @mobilejazz/prettier-config

  1. Set up Prettier and @mobilejazz/prettier-config.
  2. When using with Prettier and @mobilejazz/prettier-config, ESLint should run first. Set up your scripts in package.json something like this:

    "scripts": {
      "lint": "npm run eslint && npm run prettier -- --check",
      "format": "npm run eslint -- --fix && npm run prettier -- --write",
      "prettier": "prettier \"src/**/*.ts\" \"src/**/*.js\" \"src/**/*.html\"",
      "eslint": "eslint \"src/**/*.ts\" \"src/**/*.js\" \"src/**/*.html\"",
    }
    • npm run lint: for checking if ESLint and Prettier complain
    • npm run format: attempt to autofix lint issues and autoformat code

    :memo: Not every rule in this configuration is autofixable, so npm run format may continue failing until lint issues are addressed manually.

With Husky

⚠️ REVIEW THIS SECTION

Probably we should use lint-staged as we're already using that in other projects.

1.0.2

1 year ago

1.0.3

1 year ago

1.0.1

2 years ago

0.2.1

2 years ago

1.0.0

2 years ago

1.0.0-alpha.3

2 years ago

1.0.0-alpha.2

2 years ago

1.0.0-alpha.1

2 years ago

0.2.0

2 years ago