eslint-config-postman
Advanced tools
Comparing version 0.0.2 to 0.0.3
22
index.js
@@ -0,1 +1,5 @@ | ||
// Makes the config self-contained via plugins as it's own dependencies | ||
// https://github.com/eslint/eslint/issues/3458 | ||
require('@rushstack/eslint-patch/modern-module-resolution'); | ||
const { join } = require('path'), | ||
@@ -25,8 +29,8 @@ { readdirSync } = require('fs'); | ||
{ | ||
files: ['npm/*'], | ||
files: ['npm/**/*'], | ||
globals: { | ||
'exec': true, | ||
'rm': true, | ||
'set': true, | ||
'test': true | ||
exec: true, | ||
rm: true, | ||
set: true, | ||
test: true | ||
} | ||
@@ -40,6 +44,6 @@ }, | ||
globals: { | ||
'exec': true, | ||
'app': true, // as part of test bootstrap | ||
'expect': true, // as part of test bootstrap | ||
'sails': true | ||
exec: true, | ||
app: true, // as part of test bootstrap | ||
expect: true, // as part of test bootstrap | ||
sails: true | ||
}, | ||
@@ -46,0 +50,0 @@ rules: { |
{ | ||
"name": "eslint-config-postman", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Common ESLint rules for Postman", | ||
@@ -18,10 +18,11 @@ "bugs": "https://github.com/postmanlabs/eslint-config-postman/issues", | ||
"homepage": "https://github.com/postmanlabs/eslint-config-postman#readme", | ||
"peerDependencies": { | ||
"eslint": "^7.32.0", | ||
"eslint-plugin-jsdoc": "^36.0.6", | ||
"eslint-plugin-lodash": "^7.2.0", | ||
"eslint-plugin-mocha": "^9.0.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-security": "^1.4.0" | ||
"dependencies": { | ||
"@rushstack/eslint-patch": "1.1.0", | ||
"eslint": "8.2.0", | ||
"eslint-plugin-jsdoc": "37.0.3", | ||
"eslint-plugin-lodash": "7.3.0", | ||
"eslint-plugin-mocha": "9.0.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-security": "1.4.0" | ||
} | ||
} |
Common ESLint rules for Postman | ||
# Installation | ||
```sh | ||
npm install --save-dev eslint-config-postman | ||
``` | ||
# Configuration | ||
Update the `.eslintrc` in the project root as follows: | ||
```json | ||
{ | ||
"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](https://eslint.org/docs/developer-guide/nodejs-api) | ||
# Cleanup | ||
_If you're not using additional plugins, prune nested config files with:_ | ||
```sh | ||
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 | ||
```sh | ||
npm uninstall eslint eslint-plugin-jsdoc eslint-plugin-lodash eslint-plugin-mocha eslint-plugin-node eslint-plugin-security | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33114
599
40
7
+ Addedeslint@8.2.0
+ Addedeslint-plugin-jsdoc@37.0.3
+ Addedeslint-plugin-lodash@7.3.0
+ Addedeslint-plugin-mocha@9.0.0
+ Addedeslint-plugin-node@11.1.0
+ Addedeslint-plugin-security@1.4.0
+ Added@es-joy/jsdoccomment@0.12.0(transitive)
+ Added@eslint/eslintrc@1.4.1(transitive)
+ Added@humanwhocodes/config-array@0.6.0(transitive)
+ Added@rushstack/eslint-patch@1.1.0(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedeslint@8.2.0(transitive)
+ Addedeslint-plugin-jsdoc@37.0.3(transitive)
+ Addedeslint-plugin-lodash@7.3.0(transitive)
+ Addedeslint-plugin-security@1.4.0(transitive)
+ Addedeslint-scope@6.0.0(transitive)
+ Addedeslint-visitor-keys@3.4.3(transitive)
+ Addedespree@9.6.1(transitive)
+ Addedglob-parent@6.0.2(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjsdoc-type-pratt-parser@2.0.02.2.5(transitive)
+ Addedret@0.1.15(transitive)
+ Addedsafe-regex@1.1.0(transitive)
- Removed@babel/code-frame@7.12.11(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/highlight@7.25.9(transitive)
- Removed@es-joy/jsdoccomment@0.10.8(transitive)
- Removed@eslint/eslintrc@0.4.3(transitive)
- Removed@humanwhocodes/config-array@0.5.0(transitive)
- Removedacorn@7.4.1(transitive)
- Removedajv@8.17.1(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedargparse@1.0.10(transitive)
- Removedastral-regex@2.0.0(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedeslint@7.32.0(transitive)
- Removedeslint-plugin-jsdoc@36.1.1(transitive)
- Removedeslint-plugin-lodash@7.4.0(transitive)
- Removedeslint-plugin-security@1.7.1(transitive)
- Removedeslint-scope@5.1.1(transitive)
- Removedespree@7.3.1(transitive)
- Removedesprima@4.0.1(transitive)
- Removedestraverse@4.3.0(transitive)
- Removedfast-uri@3.0.3(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjsdoc-type-pratt-parser@1.1.11.2.0(transitive)
- Removedjson-schema-traverse@1.0.0(transitive)
- Removedlodash.truncate@4.4.2(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedregexp-tree@0.1.27(transitive)
- Removedrequire-from-string@2.0.2(transitive)
- Removedsafe-regex@2.1.1(transitive)
- Removedslice-ansi@4.0.0(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedtable@6.9.0(transitive)