🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

eslint-config-mongodb-js

Package Overview
Dependencies
Maintainers
38
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-mongodb-js - npm Package Compare versions

Comparing version

to
5.0.1

9

compass-plugin.js

@@ -6,4 +6,9 @@ /**

env: {
node: true
node: true,
browser: true
},
globals: {
expect: true,
sinon: true
},
extends: ['eslint-config-mongodb-js/react'],

@@ -13,4 +18,4 @@ rules: {

'new-cap': 0,
'no-use-before-define': 0
'no-use-before-define': 1
}
};

@@ -8,6 +8,3 @@ /**

env: {
mocha: true,
expect: true,
sinon: true,
es6: true
mocha: true
},

@@ -19,6 +16,2 @@ parserOptions: {

'eslint-config-mongodb-js/rules/best-practices',
/**
* @todo (imlucas): Someday....
* 'eslint-config-mongodb-js/rules/ecmascript-6',
*/
'eslint-config-mongodb-js/rules/nodejs-and-commonjs',

@@ -34,5 +27,3 @@ 'eslint-config-mongodb-js/rules/possible-errors',

},
plugins: [
'chai-friendly'
]
plugins: ['chai-friendly']
};
{
"name": "eslint-config-mongodb-js",
"description": "eslint sharable configs for mongodb-js.",
"version": "5.0.0",
"version": "5.0.1",
"author": "Lucas Hrabovsky <lucas@mongodb.com> (http://imlucas.com)",

@@ -6,0 +6,0 @@ "homepage": "http://github.com/mongodb-js/eslint-config",

@@ -5,2 +5,7 @@ /**

module.exports = {
env: {
node: true,
es6: true,
browser: true
},
extends: [

@@ -18,5 +23,3 @@ 'eslint-config-mongodb-js',

parser: 'babel-eslint',
plugins: [
'react'
],
plugins: ['react'],
settings: {

@@ -65,16 +68,22 @@ react: {

// Prevent extra closing tags for components without children
'react/self-closing-comp': [2, {
component: true
}],
'react/self-closing-comp': [
2,
{
component: true
}
],
// Enforce component methods order
'react/sort-comp': [2, {
order: [
'lifecycle',
'/^on.+$/',
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
'everything-else',
'/^render.+$/',
'render'
]
}],
'react/sort-comp': [
2,
{
order: [
'lifecycle',
'/^on.+$/',
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
'everything-else',
'/^render.+$/',
'render'
]
}
],
// Prevent missing parentheses around multilines JSX

@@ -81,0 +90,0 @@ 'react/jsx-wrap-multilines': 2

@@ -22,3 +22,3 @@ var config = require('./config');

// require camel case names
camelcase: [ERROR, {
camelcase: [WARNING, {
properties: 'never'

@@ -25,0 +25,0 @@ }],

var config = require('./config');
var ERROR = config.ERROR;
var WARNING = config.WARNING;
var IGNORE = config.IGNORE;

@@ -33,9 +34,12 @@

// disallow declaration of variables that are not used in the code
'no-unused-vars': [ERROR, {
vars: 'local',
args: 'after-used'
}],
'no-unused-vars': [
WARNING,
{
vars: 'local',
args: 'after-used'
}
],
// disallow use of variables before they are defined
'no-use-before-define': ERROR
'no-use-before-define': WARNING
}
};