postmanlabs / eslint-config-postman

Common ESLint rules for Postman! πŸ‘•

Repository from Github https://github.compostmanlabs/eslint-config-postmanRepository from Github https://github.compostmanlabs/eslint-config-postman

Common ESLint rules for Postman

Installation

npm install --save-dev eslint-config-postman

Configuration

Update the .eslintrc in the project root as follows:

{
  "root": true,
  "extends": "postman"
}

Usage

Only make these changes if you want to remove ESLint as a direct dependency.

CLI

No changes needed!

Programmatic

Replace require('eslint') with require('eslint-config-postman/node_modules/eslint') More details: https://eslint.org/docs/developer-guide/nodejs-api

Cleanup

If you're not using additional plugins, prune nested config files with:

find . -name .eslintrc -type f -mindepth 2 -delete;

Optional

This is recommended to abstract plugin specifics away into one config bundle Skip this if you're using ESLint as a CLI, or if you're using other plugins in addition to those covered by this config

npm uninstall eslint eslint-plugin-jsdoc eslint-plugin-lodash eslint-plugin-mocha eslint-plugin-node eslint-plugin-security

About

Common ESLint rules for Postman! πŸ‘•

License:Apache License 2.0


Languages

Language:JavaScript 100.0%