Socket
Book a DemoInstallSign in
Socket

@losant/eslint-config-losant

Package Overview
Dependencies
Maintainers
8
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@losant/eslint-config-losant

Common eslint config for Losant

2.0.1
latest
Source
npmnpm
Version published
Weekly downloads
685
-23.12%
Maintainers
8
Weekly downloads
 
Created
Source

@Losant / Eslint Config Losant

ESLint config for all Losant projects.

Installation

npm install --save-dev @losant/eslint-config-losant
yarn add --dev @losant/eslint-config-losant

Requirements

  • Node.js >=20.0.0

Configuration

Node

import config from ' @losant/eslint-config-losant/env/node.js';

export default [
  ...config,
  {
    // custom overrides here
  }
];

Usage

You should add an npm script to the package.json of the project that specifies the eslint command. lint is the barebones setup you'll need to then be able to do yarn run lint. It's recommended that you add the other commands as well.

{
  "scripts": {
    "lint": "eslint \"**/*.js\" src test",
    "lint:fix": "eslint --fix \"**/*.js\" src test",
    "lint:staged": "lint-staged"
  },
  "lint-staged": {
    "**/*.js": "eslint"
  }
}

Documentation

The resulting combination of extended rules, overrides, and plugins are documented together with their specified options:

  • Common rules
  • Additional rules for "node"

Pre-Push Hook with Husky

Pre-Push hooks can be easily configured with Husky to encourage linting across a project. Simply add a dev dependency for Husky, and add configuration.

npm install --save-dev husky
yarn add --dev husky
"husky": {
  "hooks": {
    "pre-commit": "lint-staged"
  }
}

Husky can be used for other Git Hooks as well. Check out their documentation for more details.

Keywords

eslint

FAQs

Package last updated on 04 Mar 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.