CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-eslint-config-airbnb

Airbnb's comprehensive ESLint configuration as an extensible shared config for JavaScript and React projects

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

legacy-configuration.mddocs/

Legacy Configuration

Legacy ES5 ESLint configuration without modern ES6+ features. Note: This configuration is deprecated. Use eslint-config-airbnb-base/legacy instead.

Capabilities

Legacy Configuration (Deprecated)

Provides Airbnb's ESLint rules for legacy ES5 JavaScript environments by extending eslint-config-airbnb-base/legacy.

/**
 * Legacy Airbnb ESLint configuration (DEPRECATED)
 * Usage: extends: ['airbnb/legacy']
 * Recommended: Use 'eslint-config-airbnb-base/legacy' directly instead
 */
const legacyConfig = {
  extends: ['eslint-config-airbnb-base/legacy'],
  rules: {}
};

Usage Examples:

// .eslintrc.js - Deprecated usage
module.exports = {
  extends: ['airbnb/legacy'] // Don't use this
};

// .eslintrc.js - Recommended alternative
module.exports = {
  extends: ['airbnb-base/legacy'] // Use this instead
};

Migration to eslint-config-airbnb-base/legacy

The legacy configuration is a simple wrapper around eslint-config-airbnb-base/legacy. Users should migrate to using the base package directly:

interface MigrationPath {
  // Old (deprecated)
  oldConfig: {
    extends: ['airbnb/legacy'];
  };
  
  // New (recommended)
  newConfig: {
    extends: ['airbnb-base/legacy'];
  };
}

Migration Steps:

  1. Install eslint-config-airbnb-base directly:

    npm install --save-dev eslint-config-airbnb-base
  2. Update ESLint configuration:

    // Before
    module.exports = {
      extends: ['airbnb/legacy']
    };
    
    // After
    module.exports = {
      extends: ['airbnb-base/legacy']
    };
  3. Remove eslint-config-airbnb if not using React rules:

    npm uninstall eslint-config-airbnb

Included Rules

The legacy configuration includes all rules from eslint-config-airbnb-base/legacy:

interface LegacyRules {
  // ES5 JavaScript features only
  es5Rules: boolean;
  
  // Legacy variable declaration patterns
  varDeclaration: boolean;
  
  // Function expressions and declarations
  functionRules: boolean;
  
  // Object and array handling (ES5)
  objectArrayRules: boolean;
  
  // Control flow and conditionals
  controlFlowRules: boolean;
  
  // Error handling and debugging
  errorHandlingRules: boolean;
}

Configuration Structure

interface LegacyConfiguration {
  extends: ['eslint-config-airbnb-base/legacy'];
  rules: Record<string, never>; // Empty rules object
}

Use Cases

The legacy configuration was originally intended for:

interface LegacyUseCases {
  // ES5-only environments
  es5Environments: boolean;
  
  // Internet Explorer compatibility
  ieCompatibility: boolean;
  
  // Legacy Node.js versions
  oldNodeJS: boolean;
  
  // Embedded JavaScript environments
  embeddedJS: boolean;
  
  // Build tools and scripts requiring ES5
  buildScripts: boolean;
}

However, all these use cases are better served by using eslint-config-airbnb-base/legacy directly.

ES5 vs ES6+ Differences

The legacy configuration differs from the main configuration by excluding:

interface ExcludedFeatures {
  // Modern ES6+ features not available in legacy config
  arrowFunctions: false;
  classes: false;
  destructuring: false;
  templateLiterals: false;
  letConst: false;
  modules: false;
  defaultParameters: false;
  restSpread: false;
  
  // Features available in legacy config
  varDeclarations: true;
  functionExpressions: true;
  objectLiterals: true;
  arrayMethods: true;
  regularExpressions: true;
}

Install with Tessl CLI

npx tessl i tessl/npm-eslint-config-airbnb

docs

base-configuration.md

hooks-configuration.md

index.md

legacy-configuration.md

main-configuration.md

rule-modules.md

whitespace-configuration.md

tile.json