Socket
Socket
Sign inDemoInstall

eslint-config-airbnb-base

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-airbnb-base - npm Package Compare versions

Comparing version 11.3.2 to 12.0.0

10

CHANGELOG.md

@@ -0,1 +1,11 @@

12.0.0 / 2017-09-02
==================
- [deps] [breaking] require `eslint` v4
- enable `function-paren-newline`, `for-direction`, `getter-return`, `no-compare-neg-zero`, `semi-style`, `object-curly-newline`, `no-buffer-constructor`, `no-restricted-globals`, `switch-colon-spacing`, `template-tag-spacing`, `prefer-promise-reject-errors`, `prefer-restructuring`
- improve `indent`, `no-multi-spaces`, `no-trailing-spaces`, `no-underscore-dangle`
- [breaking] move `comma-dangle` to Stylistic Issues (#1514)
- [breaking] Rules prohibiting global isNaN, isFinite (#1477)
- [patch] also disallow padding in classes and switches (#1403)
- [patch] support Protractor config files in import/no-extraneous-dependencies (#1543)
11.3.2 / 2017-08-22

@@ -2,0 +12,0 @@ ==================

6

package.json
{
"name": "eslint-config-airbnb-base",
"version": "11.3.2",
"version": "12.0.0",
"description": "Airbnb's base JS ESLint config, following our styleguide",

@@ -54,3 +54,3 @@ "main": "index.js",

"editorconfig-tools": "^0.1.1",
"eslint": "^4.5.0",
"eslint": "^4.6.0",
"eslint-find-rules": "^3.1.1",

@@ -63,3 +63,3 @@ "eslint-plugin-import": "^2.7.0",

"peerDependencies": {
"eslint": "^3.19.0 || ^4.5.0",
"eslint": "^4.6.0",
"eslint-plugin-import": "^2.7.0"

@@ -66,0 +66,0 @@ },

@@ -146,3 +146,3 @@ module.exports = {

'no-multi-spaces': ['error', {
// ignoreEOLComments: false, // TODO: uncomment once v3 is dropped
ignoreEOLComments: false,
}],

@@ -199,2 +199,26 @@

}, {
object: 'global',
property: 'isFinite',
message: 'Please use Number.isFinite instead',
}, {
object: 'self',
property: 'isFinite',
message: 'Please use Number.isFinite instead',
}, {
object: 'window',
property: 'isFinite',
message: 'Please use Number.isFinite instead',
}, {
object: 'global',
property: 'isNaN',
message: 'Please use Number.isNaN instead',
}, {
object: 'self',
property: 'isNaN',
message: 'Please use Number.isNaN instead',
}, {
object: 'window',
property: 'isNaN',
message: 'Please use Number.isNaN instead',
}, {
property: '__defineGetter__',

@@ -275,4 +299,3 @@ message: 'Please use Object.defineProperty instead.',

// http://eslint.org/docs/rules/prefer-promise-reject-errors
// TODO: enable, semver-major
'prefer-promise-reject-errors': ['off', { allowEmptyReject: true }],
'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }],

@@ -279,0 +302,0 @@ // require use of the second argument for parseInt()

module.exports = {
rules: {
// require trailing commas in multiline object literals
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
// Enforce “for” loop update clause moving the counter in the right direction
// http://eslint.org/docs/rules/for-direction
// TODO: enable, semver-major until v3 is dropped; semver-minor otherwise
'for-direction': 'off',
'for-direction': 'error',
// Enforces that a return statement is present in property getters
// http://eslint.org/docs/rules/getter-return
// TODO: enable, semver-major when v3 is dropped
'getter-return': ['off', { allowImplicit: true }],
'getter-return': ['error', { allowImplicit: true }],

@@ -28,4 +17,3 @@ // Disallow await inside of loops

// http://eslint.org/docs/rules/no-compare-neg-zero
// TODO: enable (semver-major)
'no-compare-neg-zero': 'off',
'no-compare-neg-zero': 'error',

@@ -32,0 +20,0 @@ // disallow assignment in conditional expressions

@@ -113,4 +113,3 @@ module.exports = {

// http://eslint.org/docs/rules/prefer-destructuring
// TODO: enable
'prefer-destructuring': ['off', {
'prefer-destructuring': ['error', {
VariableDeclarator: {

@@ -117,0 +116,0 @@ array: false,

@@ -87,2 +87,3 @@ module.exports = {

'**/Gruntfile{,.js}', // grunt config
'**/protractor.conf.js', // protractor config
'**/protractor.conf.*.js', // protractor config

@@ -89,0 +90,0 @@ ],

@@ -19,4 +19,3 @@ module.exports = {

// http://eslint.org/docs/rules/no-buffer-constructor
// TODO: enable, semver-major
'no-buffer-constructor': 'off',
'no-buffer-constructor': 'error',

@@ -23,0 +22,0 @@ // disallow mixing regular variable and require declarations

@@ -41,2 +41,11 @@ module.exports = {

// require trailing commas in multiline object literals
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
// enforce spacing before and after comma

@@ -77,2 +86,6 @@ 'comma-spacing': ['error', { before: false, after: true }],

// enforce consistent line breaks inside function parentheses
// https://eslint.org/docs/rules/function-paren-newline
'function-paren-newline': ['error', 'multiline'],
// Blacklist certain identifiers to prevent them being used

@@ -96,5 +109,2 @@ // http://eslint.org/docs/rules/id-blacklist

// MemberExpression: null,
// CallExpression: {
// parameters: null,
// },
FunctionDeclaration: {

@@ -107,3 +117,11 @@ parameters: 1,

body: 1
}
},
CallExpression: {
arguments: 1
},
ArrayExpression: 1,
ObjectExpression: 1,
ImportDeclaration: 1,
flatTernaryExpressions: false,
ignoredNodes: ['JSXElement *']
}],

@@ -303,3 +321,3 @@

skipBlankLines: false,
// ignoreComments: false, // TODO: uncomment once v3 is dropped
ignoreComments: false,
}],

@@ -312,3 +330,3 @@

allowAfterSuper: false,
// enforceInMethodNames: false, // TODO: uncoment and enable, semver-minor once v3 is dropped
enforceInMethodNames: false,
}],

@@ -334,6 +352,5 @@

// http://eslint.org/docs/rules/object-curly-newline
// TODO: enable once https://github.com/eslint/eslint/issues/6488 is resolved and v3 is dropped
'object-curly-newline': ['off', {
ObjectExpression: { minProperties: 3, multiline: true, consistent: true },
ObjectPattern: { minProperties: 3, multiline: true, consistent: true }
'object-curly-newline': ['error', {
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
ObjectPattern: { minProperties: 4, multiline: true, consistent: true }
}],

@@ -361,4 +378,4 @@

// enforce padding within blocks
'padded-blocks': ['error', 'never'],
// disallow padding within blocks
'padded-blocks': ['error', { blocks: 'never', classes: 'never', switches: 'never' }],

@@ -388,4 +405,3 @@ // Require or disallow padding lines between statements

// http://eslint.org/docs/rules/semi-style
// TODO: enable, semver-major until v3 is dropped, semver-minor otherwise
'semi-style': ['off', 'last'],
'semi-style': ['error', 'last'],

@@ -440,9 +456,7 @@ // requires object keys to be sorted

// http://eslint.org/docs/rules/switch-colon-spacing
// TODO: enable, semver-major
'switch-colon-spacing': ['off', { after: true, before: false }],
'switch-colon-spacing': ['error', { after: true, before: false }],
// Require or disallow spacing between template tags and their literals
// http://eslint.org/docs/rules/template-tag-spacing
// TODO: enable, semver-major
'template-tag-spacing': ['off', 'never'],
'template-tag-spacing': ['error', 'never'],

@@ -449,0 +463,0 @@ // require or disallow the Unicode Byte Order Mark

@@ -19,4 +19,3 @@ const restrictedGlobals = require('eslint-restricted-globals');

// disallow specific globals
// TODO: enable, semver-major
'no-restricted-globals': ['off'].concat(restrictedGlobals),
'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(restrictedGlobals),

@@ -23,0 +22,0 @@ // disallow declaration of variables already declared in the outer scope

@@ -14,5 +14,5 @@ import fs from 'fs';

Object.keys(files).forEach((
Object.keys(files).forEach(( // eslint-disable-line function-paren-newline
name, // trailing function comma is to test parsing
) => {
) => { // eslint-disable-line function-paren-newline
const config = files[name];

@@ -19,0 +19,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc