eslint-config-es
Advanced tools
Comparing version 0.8.3 to 0.8.4
'use strict'; | ||
const isPluginInstalled = require('./isPluginInstalled'); | ||
const parserOptions = { | ||
@@ -21,6 +23,4 @@ ecmaVersion: 6, | ||
const plugins = [ | ||
'extended', | ||
'mocha' | ||
]; | ||
const plugins = [ 'extended', 'mocha', 'react' ]. | ||
filter(plugin => isPluginInstalled(plugin)); | ||
@@ -287,14 +287,33 @@ const rules = { | ||
'template-curly-spacing': [ 2, 'never' ], | ||
'yield-star-spacing': [ 2, { before: true, after: true }], | ||
'yield-star-spacing': [ 2, { before: true, after: true }] | ||
}; | ||
'extended/consistent-err-names': [ 2, 'prefix' ], | ||
if (plugins.extended) { | ||
rules['extended/consistent-err-names'] = [ 2, 'prefix' ]; | ||
} | ||
'mocha/no-exclusive-tests': 2, | ||
'mocha/no-skipped-tests': 2, | ||
'mocha/no-pending-tests': 2, | ||
'mocha/handle-done-callback': 2, | ||
'mocha/no-synchronous-tests': 2, | ||
'mocha/no-global-tests': 2 | ||
}; | ||
if (plugins.mocha) { | ||
rules['mocha/no-exclusive-tests'] = 2; | ||
rules['mocha/no-skipped-tests'] = 2; | ||
rules['mocha/no-pending-tests'] = 2; | ||
rules['mocha/handle-done-callback'] = 2; | ||
rules['mocha/no-synchronous-tests'] = 2; | ||
rules['mocha/no-global-tests'] = 2; | ||
rules['mocha/no-return-and-callback'] = 2; | ||
rules['mocha/valid-test-description'] = 0; | ||
rules['mocha/valid-suite-description'] = 0; | ||
rules['mocha/no-sibling-hooks'] = 2; | ||
rules['mocha/no-mocha-arrows'] = 0; | ||
rules['mocha/no-hooks'] = 0; | ||
rules['mocha/no-hooks-for-single-case'] = 0; | ||
rules['mocha/no-top-level-hooks'] = 2; | ||
rules['mocha/no-identical-title'] = 2; | ||
rules['mocha/max-top-level-suites'] = [ 2, { limit: 1 }]; | ||
} | ||
if (plugins.react) { | ||
rules['react/jsx-no-duplicate-props'] = 2; | ||
rules['react/jsx-uses-vars'] = 2; | ||
} | ||
module.exports = { parserOptions, env, globals, plugins, rules }; |
{ | ||
"name": "eslint-config-es", | ||
"version": "0.8.3", | ||
"version": "0.8.4", | ||
"description": "eslint-config-es contains a very strict ESLint configuration for ES2015 and above.", | ||
@@ -18,4 +18,4 @@ "contributors": [ | ||
"devDependencies": { | ||
"roboter": "0.13.2", | ||
"roboter-server": "0.13.2" | ||
"roboter": "0.13.4", | ||
"roboter-server": "0.13.4" | ||
}, | ||
@@ -22,0 +22,0 @@ "repository": { |
@@ -9,7 +9,11 @@ # eslint-config-es | ||
$ npm install eslint-config-es \ | ||
eslint \ | ||
eslint-plugin-extended \ | ||
eslint-plugin-mocha | ||
eslint | ||
``` | ||
You may install additional plugins for ESLint. If you do, the following ones are automatically detected and configured for you. | ||
- [eslint-plugin-extended](https://www.npmjs.com/package/eslint-plugin-extended) | ||
- [eslint-plugin-mocha](https://www.npmjs.com/package/eslint-plugin-mocha) | ||
- [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) | ||
## Quick Start | ||
@@ -16,0 +20,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
13465
8
342
52
0
1