@salesforce/eslint-config-lwc
Opinionated ESLint configurations for LWC projects
Last updated 2 months ago by ravi.jayaramappa .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @salesforce/eslint-config-lwc 
SYNC missed versions from official npm registry.

@salesforce/eslint-config-lwc

Opinionated ESLint configurations for Lightning Web Components (LWC) projects.

Installation

$ npm install eslint @salesforce/eslint-config-lwc --save-dev

Usage

Add the appropriate configuration to the extends field in your configuration.

Example of .eslintrc:

{
    "extends": ["@salesforce/eslint-config-lwc/recommended"]
}

For more details about configuration, please refer to the dedicated section in the ESLint documentation: https://eslint.org/docs/user-guide/configuring#using-a-shareable-configuration-package

Configurations

This package exposes 3 configurations for your usage.

@salesforce/eslint-config-lwc/base configuration

Goal: Prevent common pitfalls with LWC, and enforce other Salesforce platform restrictions.

Rules: LWC specific rules only.

@salesforce/eslint-config-lwc/recommended configuration

Goal: Prevent common Javascript pitfalls and enforce all best practices.

Rules: @salesforce/eslint-config-lwc/base rules + Most of the base Potential errors rules + Some of the Best Practices rules + LWC Best Practices.

@salesforce/eslint-config-lwc/extended configuration

Goal: Restrict usage of some Javascript language features known to be slow after the COMPAT transformation. LWC runs in COMPAT mode on older browsers (eg. IE11). To support new Javascript syntax and language features on older browser the LWC compiler transforms LWC modules. This linting configuration targets patterns known to be slow in COMPAT mode.

Rules: @salesforce/eslint-config-lwc/recommended rules + restrict usage of some slow patterns in COMPAT.

Current Tags

  • 0.2.0                                ...           develop (2 years ago)
  • 0.7.0                                ...           latest (2 months ago)
  • 0.2.0                                ...           prerelease (2 years ago)
  • 0.2.0                                ...           release (2 years ago)

6 Versions

  • 0.7.0                                ...           2 months ago
  • 0.6.0                                ...           3 months ago
  • 0.5.0                                ...           5 months ago
  • 0.4.0                                ...           a year ago
  • 0.3.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago

Copyright 2014 - 2016 © taobao.org |