Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@moxy/eslint-config-base

Package Overview
Dependencies
Maintainers
15
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@moxy/eslint-config-base

MOXY's ESLint base configuration

  • 13.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
57
decreased by-60.14%
Maintainers
15
Weekly downloads
 
Created
Source

eslint-config-base

NPM version Downloads Dependency status Dev Dependency status

MOXY's ESLint base configuration.

Installation

$ npm install --save-dev eslint @moxy/eslint-config-base

Usage

Create a .eslintrc.json file in the project root and extend from one of these base configurations:

  • @moxy/eslint-config-base - Latest ECMAScript version without modules.
  • @moxy/eslint-config-base/esm - Latest ECMAScript version with ECMAScript modules.
  • @moxy/eslint-config-base/cjs - Latest ECMAScript version with CommonJS modules.

Instead of the latest ECMAScript version (2020), you may target specific versions of ECMAScript by using their configurations instead.

List of all base configurations
  • @moxy/eslint-config-base/es2015 - ECMAScript 2015 (aka es6) without modules.
  • @moxy/eslint-config-base/es2016 - ECMAScript 2016 (aka es7) without modules.
  • @moxy/eslint-config-base/es2017 - ECMAScript 2017 (aka es8) without modules.
  • @moxy/eslint-config-base/es2018 - ECMAScript 2018 (aka es9) without modules.
  • @moxy/eslint-config-base/es2019 - ECMAScript 2019 (aka es10) without modules.
  • @moxy/eslint-config-base/es2020 - ECMAScript 2020 (aka es11) without modules.
  • @moxy/eslint-config-base/esm/es2015 - ECMAScript 2015 (aka es6) with ECMAScript modules.
  • @moxy/eslint-config-base/esm/es2016 - ECMAScript 2016 (aka es7) with ECMAScript modules.
  • @moxy/eslint-config-base/esm/es2017 - ECMAScript 2017 (aka es8) with ECMAScript modules.
  • @moxy/eslint-config-base/esm/es2018 - ECMAScript 2018 (aka es9) with ECMAScript modules.
  • @moxy/eslint-config-base/esm/es2019 - ECMAScript 2019 (aka es10) with ECMAScript modules.
  • @moxy/eslint-config-base/esm/es2020 - ECMAScript 2020 (aka es11) with ECMAScript modules.
  • @moxy/eslint-config-base/cjs/es2015 - ECMAScript 2015 (aka es6) with CommonJS modules.
  • @moxy/eslint-config-base/cjs/es2016 - ECMAScript 2016 (aka es7) with CommonJS modules.
  • @moxy/eslint-config-base/cjs/es2017 - ECMAScript 2017 (aka es8) with CommonJS modules.
  • @moxy/eslint-config-base/cjs/es2018 - ECMAScript 2018 (aka es9) with CommonJS modules.
  • @moxy/eslint-config-base/cjs/es2019 - ECMAScript 2019 (aka es10) with CommonJS modules.
  • @moxy/eslint-config-base/cjs/es2020 - ECMAScript 2020 (aka es11) with CommonJS modules.

All files that end in .config.js within your project root folder will automatically be treated as Node.js files as they relate to tooling, such as babel.config.js and commitlint.config.js.

Examples

  • Example of .eslintrc.json for Node.js projects:

    {
        "root": true,
        "env": {
            "node": true
        },
        "extends": [
            "@moxy/eslint-config-base/cjs/es2019"
        ]
    }
    
  • Example of .eslintrc.json for browser only projects that use ECMAScript modules:

    {
        "root": true,
        "env": {
            "browser": true
        },
        "extends": [
            "@moxy/eslint-config-base/esm",
        ]
    }
    
  • Example of .eslintrc.json for isomorphic / universal projects that use ECMAScript modules:

    {
        "root": true,
        "env": {
            "browser": true,
            "node": true
        },
        "extends": [
            "@moxy/eslint-config-base/esm"
        ]
    }
    

ℹ️ Note that by setting root to true, we ensure that no ancestor configuration is used which also improves ESLint performance because no more file lookups need to be done.

Shared functionality

This package contains functionality that may be used directly if necessary:

Keywords

FAQs

Package last updated on 13 Jul 2021

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

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