🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@xpring-eng/eslint-config-mocha

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@xpring-eng/eslint-config-mocha

A ESLint configuration for Mocha tests

unpublished
latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
3
Created
Source

@xpring-eng/eslint-config-mocha

npm version Downloads/month

A linting configuration for enforcing best practices using the Mocha test library (with Chai).

Installation

First, install the needed development dependencies:

# Ensure ESLint is installed
npm install --save-dev eslint
# Install plugins used by @xpring-eng/eslint-config-mocha
npm install --save-dev eslint-plugin-mocha @fintechstudios/eslint-plugin-chai-as-promised

# Install the Xpring ESLint Mocha config
npm install --save-dev @xpring-eng/eslint-config-mocha

Usage

Then, configure your ESLint to use the Xpring configuration. An example ESLint configuration is provided below:

module.exports = {
  root: true,

  // Make ESLint compatible with TypeScript
  parser: '@typescript-eslint/parser',
  parserOptions: {
    // Enable linting rules with type information from our tsconfig
    tsconfigRootDir: __dirname,
    project: ['./tsconfig.json'],

    // Allow the use of imports / ES modules
    sourceType: 'module',

    ecmaFeatures: {
      // Enable global strict mode
      impliedStrict: true,
    },
  },

  // Specify global variables that are predefined
  env: {
    node: true, // Enable node global variables & Node.js scoping
    es2020: true, // Add all ECMAScript 2020 globals and automatically set the ecmaVersion parser option to ES2020
  },

  plugins: [],
  // extends: ['@xpring-eng/eslint-config-mocha'],
  extends: ['@xpring-eng/eslint-config-mocha', '@xpring-eng/eslint-config-base'],
  rules: {},
  overrides: [],
}

Keywords

eslint

FAQs

Package last updated on 28 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts