Socket
Socket
Sign inDemoInstall

@shopify/stylelint-polaris

Package Overview
Dependencies
Maintainers
19
Versions
989
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/stylelint-polaris

Polaris Design System Stylelint tooling


Version published
Weekly downloads
6.2K
increased by10.05%
Maintainers
19
Weekly downloads
 
Created
Source

Stylelint Polaris (WIP)

Experimental package structure

stylelint-polaris/
├─ plugins/
│  ├─ custom-properties-allowed-list.js
|  | # (Optional) Public facing plugins for advanced configurations
|  | # (See advanced config example below)
|  ├─ index.js
|  |
├─ configs/
|  | # Common rules for `polaris-react` and Polaris consumers
|  ├─ shared.js
|  |
|  | # Applied in `polaris-react` containing:
|  | # - shared.js
|  | # - specific `custom-properties-allowed-list` rules
│  ├─ internal.js
|
| # Public facing config containing:
| # - shared.js
| # - specific `custom-properties-allowed-list` rules for Polaris consumers
├─ index.js

Polaris react usage

// polaris-react/package.json
{
  "stylelint": {
    "extends": [
      "@shopify/stylelint-polaris/configs/internal"
    ]
  },
};

Consumer usage

Basic
// consumer/package.json
{
  "stylelint": {
    "extends": [
      "@shopify/stylelint-polaris"
    ]
  },
};
Advanced
// consumer/stylelintrc.js
module.exports = {
  extends: ['@shopify/stylelint-polaris'],
  plugins: ['@shopify/stylelint-polaris/plugins'],
  rules: {
    'stylelint-polaris/custom-properties-allowed-list': {
      // Extending the allowed Polaris custom properties
      allowedProperties: [/--my-app-.+/],
    },
  },
};

Local development - Polaris react

Open your terminal to the root of the polaris monorepo:

  1. Install and symlink dependencies
yarn install
  1. Run stylelint on polaris-react
yarn lint:stylelint

Keywords

FAQs

Package last updated on 25 May 2022

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