@npmcli/eslint-config
Advanced tools
Comparing version 1.0.2 to 2.0.0
module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
ecmaVersion: 2022, | ||
ecmaFeatures: {}, | ||
sourceType: 'script' | ||
sourceType: 'script', | ||
}, | ||
env: { | ||
es6: true, | ||
node: true | ||
node: true, | ||
}, | ||
@@ -17,3 +17,3 @@ plugins: [ | ||
navigator: 'readonly', | ||
window: 'readonly' | ||
window: 'readonly', | ||
}, | ||
@@ -32,3 +32,3 @@ rules: { | ||
exports: 'always-multiline', | ||
functions: 'never' | ||
functions: 'never', | ||
}], | ||
@@ -46,3 +46,3 @@ 'comma-spacing': ['error', { before: false, after: true }], | ||
'generator-star-spacing': ['error', { before: true, after: true }], | ||
'handle-callback-err': ['error', '^(err|error)$' ], | ||
'handle-callback-err': ['error', '^(err|error)$'], | ||
indent: ['error', 2, { | ||
@@ -61,3 +61,3 @@ SwitchCase: 1, | ||
ignoreComments: false, | ||
ignoredNodes: ['TemplateLiteral *'] | ||
ignoredNodes: ['TemplateLiteral *'], | ||
}], | ||
@@ -146,3 +146,5 @@ 'key-spacing': ['error', { beforeColon: false, afterColon: true }], | ||
'no-unsafe-negation': 'error', | ||
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true, allowTaggedTemplates: true }], | ||
'no-unused-expressions': ['error', { | ||
allowShortCircuit: true, allowTernary: true, allowTaggedTemplates: true, | ||
}], | ||
'no-unused-vars': ['error', { vars: 'all', args: 'none', ignoreRestSiblings: true }], | ||
@@ -166,3 +168,3 @@ 'no-use-before-define': ['error', { functions: false, classes: false, variables: false }], | ||
'padded-blocks': ['error', { blocks: 'never', switches: 'never', classes: 'never' }], | ||
'prefer-const': ['error', { destructuring: 'all'} ], | ||
'prefer-const': ['error', { destructuring: 'all' }], | ||
'prefer-promise-reject-errors': 'error', | ||
@@ -181,3 +183,7 @@ 'quote-props': ['error', 'as-needed'], | ||
line: { markers: ['*package', '!', '/', ',', '='] }, | ||
block: { balanced: true, markers: ['*package', '!', ',', ':', '::', 'flow-include'], exceptions: ['*'] } | ||
block: { | ||
balanced: true, | ||
markers: ['*package', '!', ',', ':', '::', 'flow-include'], | ||
exceptions: ['*'], | ||
}, | ||
}], | ||
@@ -198,3 +204,3 @@ 'symbol-description': 'error', | ||
'node/no-callback-literal': 'error', | ||
} | ||
}, | ||
} |
@@ -0,1 +1,3 @@ | ||
<!-- This file is automatically added by @npmcli/template-oss. Do not edit. --> | ||
ISC License | ||
@@ -2,0 +4,0 @@ |
{ | ||
"name": "@npmcli/eslint-config", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"description": "eslint config used by the npm cli team", | ||
"main": "lib/index.js", | ||
"bin": { | ||
"lint": "bin/index.js" | ||
}, | ||
"scripts": { | ||
@@ -11,7 +14,11 @@ "preversion": "npm test", | ||
"snap": "tap", | ||
"test": "tap" | ||
"test": "tap", | ||
"lint": "eslint '**/*.js'", | ||
"postlint": "npm-template-check", | ||
"lintfix": "npm run lint -- --fix", | ||
"posttest": "npm run lint" | ||
}, | ||
"files": [ | ||
"lib", | ||
"bin" | ||
"bin", | ||
"lib" | ||
], | ||
@@ -29,11 +36,18 @@ "repository": { | ||
"peerDependencies": { | ||
"eslint": ">= 7", | ||
"eslint": ">= 8", | ||
"eslint-plugin-node": "^11.1.0" | ||
}, | ||
"devDependencies": { | ||
"@npmcli/template-oss": "^2.2.0", | ||
"eslint": "^8.1.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint7": "npm:eslint@^7.32.0", | ||
"tap": "^15.0.9" | ||
}, | ||
"dependencies": { | ||
"which": "^2.0.2" | ||
}, | ||
"templateVersion": "2.2.0", | ||
"engines": { | ||
"node": "^12.13.0 || ^14.15.0 || >=16" | ||
} | ||
} |
@@ -29,1 +29,11 @@ ## @npmcli/eslint-config | ||
`.eslintrc.local.json`. | ||
#### `bin` | ||
This module also contains a bin script that will run `eslint` with the bundled config. | ||
``` | ||
npm i -D @npmcli/eslint-config | ||
# lint with our style rules | ||
npx @npmcli/eslint-config -- # any args to eslint go here...` |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
10508
5
205
39
3
2
+ Addedwhich@^2.0.2