JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 65
  • Score
    100M100P100Q83267F
  • License Apache-2.0

An ESLint config that conforms to the blvd JavaScript/TypeScript styleguide.

Package Exports

  • eslint-config-blvd

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-config-blvd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eslint-config-blvd

✨ An ESLint config that conforms to the blvd JavaScript/TypeScript styleguide.

Installation

Install eslint and eslint-config-blvd using yarn:

yarn add --dev eslint eslint-config-blvd

or, for npm:

npm install --save-dev eslint eslint-config-blvd

Usage

In your .eslintrc file, extend eslint-config-blvd.

{
  "extends": "eslint-config-blvd"
}

React rules

For React projects, extend eslint-config-blvd/react.

{
  "extends": ["eslint-config-blvd/react"]
}

Prettier

Prettier is an automated code formatter for JavaScript, TypeScript, and other languages.

This eslint config works alongside Prettier, too. To use it, install Prettier as well as eslint-config-prettier to your project.

yarn add --dev prettier eslint-config-prettier eslint-plugin-prettier

Create a .prettierrc file. Then add the following configs. This should make Prettier automatically format your code based on the blvd guidelines.

{
  "semi": false,
  "tabWidth": 2,
  "printWidth": 140,
  "singleQuote": true,
  "trailingComma": "none"
}

Then include eslint-config-prettier in your project. IMPORTANT: You must add eslint-config-prettier last in the extends array!

{
  "extends": ["blvd", "prettier", "plugin:prettier/recommended"],
  "plugins": ["prettier"],
  "rules": {
    "prettier/prettier": "error"
  }
}

Also include eslint-config-prettier/react for React projects.

{
  "extends": [
    "blvd/react",
    "prettier",
    "prettier/@typescript-eslint",
    "prettier/react",
    "plugin:prettier/recommended"
  ],
  "plugins": ["prettier"],
  "rules": {
    "prettier/prettier": "error"
  }
}