Socket
Socket
Sign inDemoInstall

@smartive/eslint-config

Package Overview
Dependencies
7
Maintainers
7
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @smartive/eslint-config

ESLint configuration by smartive


Version published
Maintainers
7
Created

Readme

Source

@smartive/eslint-config

This package provides smartive's default eslint configuration.

Installation

$ npm install eslint @smartive/eslint-config -D

Usage

Create a .eslintrc file in the root of your project's directory (it should live where package.json does). This package offers two different rulesets, on for plain TypeScript applications (@smartive/eslint-config) and a separate one for React applications (@smartive/eslint-config). Your .eslintrc file should look like this:

Plain TypeScript applications

{
  "extends": [
    "@smartive/eslint-config"
  ]
}

React applications

{
  "extends": [
    "@smartive/eslint-config/react"
  ]
}

NPM scripts

To use eslint add the following to your package.json:

"scripts": {
  "lint": "eslint .",
  "lint:fix": "eslint . --fix"
}

TypeScript configuration

Since there are some rules which require type information please make sure to set up a tsconfig.json configuration file in the root directory of your project. If your TypeScript configuration file is placed in another location you have to configure it using parserOptions.project in your ESLint configuration file. For more information have a look at the typescript-eslint documentation.

Keywords

FAQs

Last updated on 11 Dec 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc