Socket
Book a DemoInstallSign in
Socket

adastra-prettier-config

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adastra-prettier-config

Adastra ✨ has an opinionated shared [Prettier](https://prettier.io/) config that you can use when building Shopify Liquid themes and Tailwind.

0.1.4
latest
npmnpm
Version published
Weekly downloads
647
-4.99%
Maintainers
1
Weekly downloads
 
Created
Source

adastra-prettier-config

Adastra ✨ has an opinionated shared Prettier config that you can use when building Shopify Liquid themes and Tailwind.

Features

  • Supports reordering Tailwind classes ✨
  • Fomatting with the Liquid Prettier Plugin to enforce a consistent style in Liquid and HTML code.

Installation

Run the following command to install Prettier and the Adastra Prettier config:

npm install -D prettier adastra-prettier-config

Using Yarn/PNPM

yarn add --dev prettier adastra-prettier-config
# pnpm add -D prettier adastra-prettier-config

Usage

Adastra's shared prettier config comes bundled in adastra-prettier-config. To enable these rules, add a Prettier property in your package.json and reference this shared config as follows:

"prettier": "adastra-prettier-config"

Previously, rules had been defined directly in a .prettierrc or package.json.

Any previous .prettierrc or prettier.config.js should be removed in favour of the shared config.

Sometimes when using pnpm the config deosn't work because the package manager deosn't read the configuration, to fix the issue, rather than adding your plugin in package.json, create a prettier.config.js file with this configuration:

module.exports = {
  ...require('adastra-prettier-config')
}

Ignoring formating some theme files

You might wanna ignore some few files that are either autgenrarted or minified on build by creating a .prettierignore on the root folder of your Adastra Shopify theme.

assets
adastra.liquid
node_modules

Want to learn more?

Feel free to check our documentation or jump into our Discord server.

FAQs

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.