New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@scandipwa/eslint-plugin-scandipwa-guidelines

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scandipwa/eslint-plugin-scandipwa-guidelines

Eslint rules for ScandiPWA

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-5.68%
Maintainers
2
Weekly downloads
 
Created
Source

Eslint plugin for ScandiPWA development

Rule definitions

  • derived-class-names Class name must match name of the file it is inside of. Expected class names for all the files other than components are name + prefix (e.g. class inside of AddToCart.container.js file must be called AddToCartContainer and not otherwise).
  • file-structure File structure must comply to the following guidelines:
    • File structure must be flat, meaning that nesting components inside of other components is prohibited.
    • Extending root directory src with custom folders is prohibited.
    • File structure regulations imply having files with certain postfixes for certain functionality parts. Allowed postfixes are as follows
      • Component and route: .component .container .style
      • Store: .action .dispatcher .reducer
      • Query: .query
      • Style, type: none
    • For files which are in their own directories with functionality related only to them (e.g routes, components), names should match the name of the directory these files are in.
  • use-extensible-base All components should be extensible. For class to be extensible it should be derived from extensible base. Replacements of non-extensible bases are as follows and should not be imported - these are global.
    • PureComponent -> ExtensiblePureComponent
    • Component -> ExtensibleComponent
    • no base -> ExtensibleClass
  • only-one-class There should be only one class per file. Multiple classes inside of one file are not allowed.
  • no-non-extensible-components Non-extensible components are not allowed. Use extensible bases instead of regular Component or PureComponent.
  • use-middleware Wrap default export classes in middleware function in order to make classes extensible and assign namespaces to them.

Keywords

FAQs

Package last updated on 20 Mar 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