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

@cloudfour/eslint-plugin

Package Overview
Dependencies
Maintainers
6
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudfour/eslint-plugin

Cloud Four's shareable ESLint configuration

  • 23.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
107
decreased by-76.74%
Maintainers
6
Weekly downloads
 
Created
Source

@cloudfour/eslint-plugin

NPM version Build Status Renovate

Cloud Four's ESLint configuration. This exports itself as a "super-plugin" because of a limitation of ESLint.

The way this works is that it requires all of the plugin dependencies, and exports them from this plugin under a prefix.

The plugins that this exposes are:

To override settings for any of these plugins, you must prefix the configuration with cloudfour/, because the plugins are exposed through this "super-plugin".

{
  "extends": ["plugin:@cloudfour/recommended"],
  "rules": {
    "@cloudfour/promise/no-native": "off"
  }
}

In addition to the recommended configuration, @cloudfour/eslint-plugin also re-exports typescript-eslint's disable-type-checked configuration. This configuration disables any rules that depend on typescript-eslint's typescript integration.

Installation

npm install --save-dev @cloudfour/eslint-plugin eslint prettier

Usage

Add this to your package.json:

  "scripts": {
    "check-lint": "eslint . && prettier --check .",
    "lint": "eslint --fix . && prettier --write ."
  },
  "eslintConfig": {
    "extends": "plugin:@cloudfour/recommended"
  },
  "prettier": {
    "singleQuote": true
  }

Check for Lint Errors

npm run check-lint

Fix Lint Errors

This command will attempt to automatically fix lint errors. Note that not all lint errors can be fixed this way, so be prepeared to fix any remaining errors by hand.

npm run lint

Troubleshooting Note

This config relies on using a version of eslint installed locally to your project. If you also have eslint installed globally, it's possible to run into conflicts. To avoid any problems, either:

  • Just use the npm run check-lint and npm run lint scripts, which will run the local version of eslint.
  • Or, if you prefer to run eslint by hand, use npx, which will run the local version of eslint. eg, npx eslint '**/*.js'

Keywords

FAQs

Package last updated on 22 Aug 2023

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