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

@shopify/eslint-plugin

Package Overview
Dependencies
Maintainers
24
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/eslint-plugin

Shopify's ESLint rules and configs.

  • 46.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
159K
increased by0.79%
Maintainers
24
Weekly downloads
 
Created

What is @shopify/eslint-plugin?

@shopify/eslint-plugin is an ESLint plugin designed to enforce Shopify's JavaScript and TypeScript coding standards. It provides a set of rules and configurations that help maintain code quality and consistency across projects.

What are @shopify/eslint-plugin's main functionalities?

Enforcing Shopify's JavaScript Style Guide

This configuration extends Shopify's ESLint rules for ESNext and Node.js environments. It also includes specific rules like `@shopify/prefer-early-return` to enforce early return patterns and `@shopify/no-ancestor-directory-import` to prevent importing from ancestor directories.

module.exports = {
  extends: [
    'plugin:@shopify/esnext',
    'plugin:@shopify/node'
  ],
  rules: {
    '@shopify/prefer-early-return': 'error',
    '@shopify/no-ancestor-directory-import': 'error'
  }
};

TypeScript Support

This configuration extends Shopify's ESLint rules for TypeScript. It includes rules like `@shopify/typescript/prefer-pascal-case-enums` to enforce PascalCase for TypeScript enums.

module.exports = {
  extends: [
    'plugin:@shopify/typescript'
  ],
  rules: {
    '@shopify/typescript/prefer-pascal-case-enums': 'error'
  }
};

React Support

This configuration extends Shopify's ESLint rules for React. It includes rules like `@shopify/jsx-no-hardcoded-content` to prevent hardcoded content in JSX.

module.exports = {
  extends: [
    'plugin:@shopify/react'
  ],
  rules: {
    '@shopify/jsx-no-hardcoded-content': 'error'
  }
};

Other packages similar to @shopify/eslint-plugin

Keywords

FAQs

Package last updated on 25 Jul 2024

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