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

@digital-wafa/eslint-config

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digital-wafa/eslint-config

eslint configuration

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

wafa prettier conifg

Eslint-config npm version

A shared eslint configuration to use in digital wafa projects


Installing

npm install @digital-wafa/eslint-config --save-dev

It highly recommend extending the base config if you are using create-react-app if you don't skip this config :

{
  "extends": ["react-app"]
}

Usage

Add this config to your .eslintrc :

{
  "extends": [
    "@digital-wafa/eslint-config"
  ],
  "rules": {
    /* custom rules */
  }
}

Other configs

This config also exposes a few other configs that I use often and pull in as needed.

You can use them standalone:

{
  "extends": [
    "@digital-wafa/eslint-config/<config-name>",
  ]
}

Or in combination with the base config (recommended)

{
  "extends": [
    "@digital-wafa/eslint-config",
    "@digital-wafa/eslint-config/<config-name>",
  ]
}

Example of highly customized config

{
  "extends": [
    "@digital-wafa/eslint-config",
    "@digital-wafa/eslint-config/react",
    "@digital-wafa/eslint-config/typescript"
  ],
  "rules": {
    /* custom rules */
  },
}

When working with TypeScript, you'll need to provide an overrides object for rules that should only target TypeScript files.

{
  /* your base config */
  "overrides": [
    {
      "files": [
        "**/*.ts?(x)"
      ],
      "rules": {
        /* custom rules */
      }
    }
  ]
}

You can add two scripts to your package.json to lint and/or fix:

{
  "scripts": {
    "lint": "eslint ./src/*",
    "lint:fix": "eslint ./src/* --fix"
  },
}

Tip: You can alternatively put this object in your package.json under the property "eslintConfig":. This makes one less file in your project.

FAQs

Package last updated on 15 Sep 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

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