Sha256: eb8f009691279f275244edef6d087d4c17f3234b2df8080da70b5a9486a30970

Contents?: true

Size: 1.8 KB

Versions: 27

Compression:

Stored size: 1.8 KB

Contents

const confusingBrowserGlobals = require('confusing-browser-globals');

module.exports = {
  rules: {
    // enforce or disallow variable initializations at definition
    'init-declarations': 'off',

    // disallow the catch clause parameter name being the same as a variable in the outer scope
    'no-catch-shadow': 'off',

    // disallow deletion of variables
    'no-delete-var': 'error',

    // disallow labels that share a name with a variable
    // https://eslint.org/docs/rules/no-label-var
    'no-label-var': 'error',

    // disallow specific globals
    'no-restricted-globals': [
      'error',
      {
        name: 'isFinite',
        message:
          'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
      },
      {
        name: 'isNaN',
        message:
          'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
      },
    ].concat(confusingBrowserGlobals),

    // disallow declaration of variables already declared in the outer scope
    'no-shadow': 'error',

    // disallow shadowing of names such as arguments
    'no-shadow-restricted-names': 'error',

    // disallow use of undeclared variables unless mentioned in a /*global */ block
    'no-undef': 'error',

    // disallow use of undefined when initializing variables
    'no-undef-init': 'error',

    // disallow use of undefined variable
    // https://eslint.org/docs/rules/no-undefined
    // TODO: enable?
    'no-undefined': 'off',

    // disallow declaration of variables that are not used in the code
    'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],

    // disallow use of variables before they are defined
    'no-use-before-define': ['error', { functions: true, classes: true, variables: true }],
  }
};

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.32 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.31 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.30 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.29 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.28 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.27 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.26 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.25 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.24 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.23 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.22 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.21 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.20 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.19 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.18 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.17 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.16 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.14 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.13 node_modules/eslint-config-airbnb-base/rules/variables.js
immosquare-cleaner-0.1.12 node_modules/eslint-config-airbnb-base/rules/variables.js