Socket
Socket
Sign inDemoInstall

@economic/eslint-config

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@economic/eslint-config

E-conomic ESLint config


Version published
Weekly downloads
277
decreased by-25.54%
Maintainers
4
Weekly downloads
 
Created
Source

E-conomic ESLint config

This is a configuration for ESLint, a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. It extends configurations from popular style guides like Airbnb, employs Prettier for code formatting, and has TypeScript-specific settings in place.

Features

  • Sets environment for browser, ES2021, Node.js and Jest.
  • Consists of configurations from 'airbnb', 'airbnb-typescript', 'airbnb/hooks', 'prettier', etc.
  • Sets up TypeScript's parser and parser options.
  • Includes 'react' in the list of plugins.
  • Sets certain ESLint and TypeScript rules.

Usage

First, install this config as dev dependency:

npm install @economic/eslint-config -D

and this ESLint configuration:

module.exports = {
    extends: ['@economic'],
    parserOptions: {
        project: './tsconfig.json',
    },
    // your overrides here
};

Overriding Rules

You can always override these rules or add your own in your own .eslintrc.js file. Here's an example of how that might look:

module.exports = {
    extends: ['@economic'],
    rules: {
        'no-console': 'warn',
        'react/prop-types': 'off',
    },
};

Caveats

This configuration is set up for use with TypeScript. If you don't use TypeScript, you will have to alter your configuration accordingly. Remember: these are just rules that aim to increase code quality and readability. They are not hard and fast rules. Adjust the configuration to your project's requirements and your team's preferences.

FAQs

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