CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-eslint-plugin-babel

An eslint plugin companion to babel-eslint that re-implements problematic rules to support experimental JavaScript features

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

plugin-configuration.mddocs/

Plugin Configuration

The main plugin export provides the ESLint plugin configuration structure required for ESLint to recognize and use the plugin rules.

Capabilities

Main Plugin Export

The primary module export that defines the plugin structure.

/**
 * Main ESLint plugin configuration object
 * @type {Object}
 */
module.exports = {
  rules: {
    [ruleName: string]: RuleFunction | RuleObject
  },
  rulesConfig: {
    [ruleName: string]: number
  }
};

Rules Object

Collection of all available rule implementations.

/**
 * Object containing all rule implementations (active and deprecated)
 * @type {Object<string, Function|Object>}
 */
rules: {
  // Active rules
  'new-cap': Function,
  'camelcase': Object,
  'no-invalid-this': Function,
  'object-curly-spacing': Function,
  'quotes': Function,
  'semi': Function,
  'no-unused-expressions': Function,
  'valid-typeof': Function,
  
  // Deprecated rules
  'array-bracket-spacing': Object,
  'arrow-parens': Function,
  'flow-object-type': Function,
  'func-params-comma-dangle': Function,
  'generator-star-spacing': Function,
  'object-shorthand': Function,
  'no-await-in-loop': Function
}

Rules Configuration

Default configuration values for all rules (all disabled by default).

/**
 * Default rule configurations - all rules disabled by default
 * @type {Object<string, number>}
 */
rulesConfig: {
  'array-bracket-spacing': 0,
  'arrow-parens': 0,
  'camelcase': 0,
  'flow-object-type': 0,
  'func-params-comma-dangle': 0,
  'generator-star-spacing': 0,
  'new-cap': 0,
  'no-await-in-loop': 0,
  'no-invalid-this': 0,
  'no-unused-expressions': 0,
  'object-curly-spacing': 0,
  'object-shorthand': 0,
  'quotes': 0,
  'semi': 0,
  'valid-typeof': 0
}

Usage Examples

Basic Plugin Setup:

{
  "plugins": ["babel"]
}

With Rule Configuration:

{
  "plugins": ["babel"],
  "rules": {
    "babel/new-cap": 1,
    "babel/camelcase": 1,
    "babel/no-invalid-this": 1,
    "babel/object-curly-spacing": 1,
    "babel/quotes": 1,
    "babel/semi": 1,
    "babel/no-unused-expressions": 1,
    "babel/valid-typeof": 1
  }
}

Disabling Core Rules:

{
  "plugins": ["babel"],
  "rules": {
    // Disable core rules
    "new-cap": 0,
    "camelcase": 0,
    "no-invalid-this": 0,
    "object-curly-spacing": 0,
    "quotes": 0,
    "semi": 0,
    "no-unused-expressions": 0,
    "valid-typeof": 0,
    
    // Enable babel alternatives
    "babel/new-cap": 1,
    "babel/camelcase": 1,
    "babel/no-invalid-this": 1,
    "babel/object-curly-spacing": 1,
    "babel/quotes": 1,
    "babel/semi": 1,
    "babel/no-unused-expressions": 1,
    "babel/valid-typeof": 1
  }
}

Install with Tessl CLI

npx tessl i tessl/npm-eslint-plugin-babel

docs

active-rules.md

deprecated-rules.md

index.md

plugin-configuration.md

rule-configuration.md

tile.json