UNPKG

@locker/eslint-config-locker

Version:
47 lines (31 loc) 1.21 kB
# @locker/eslint-config-locker > Lightning Web Security [ESLint] configurations ## Installation ```shell $ yarn add --dev eslint @locker/eslint-config-locker ``` ## Usage Add the appropriate [configuration](#Configurations) to the `extends` field in your configuration. Example of `.eslintrc`: ```json { "extends": ["@locker/eslint-config-locker"] } ``` For more details about configuration, please refer to the dedicated section in the ESLint documentation:<br> https://eslint.org/docs/user-guide/configuring#using-a-shareable-configuration-package ## Configurations This package exposes 2 configurations for [Lightning Web Security rules][1]. Unless stated otherwise, each configuration assumes use of [`@locker/rollup-plugin`] in your build pipeline. ### `@locker/eslint-config-locker/base` configuration **Goal:** Detect foundational distortions of Lightning Web Security. ### `@locker/eslint-config-locker/recommended` configuration **Goal:** Detect supplemental distortions of Lightning Web Security. [1]: https://www.npmjs.com/package/@locker/eslint-plugin-locker#rules [`@locker/rollup-plugin`]: https://www.npmjs.com/package/@locker/rollup-plugin [ESLint]: https://eslint.org/