0.0.4 • Published 6 days ago

@xystack/style-guide v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

The XYStack Style Guide

Introduction

This repository is the home of @xinyao27 style guide, which includes configs for popular linting and styling tools.

The following configs are available, and are designed to be used together.

Contributing

Please read our contributing guide before creating a pull request.

Installation

All of our configs are contained in one package, @xystack/style-guide. To install:

# If you use npm
npm i --save-dev @xystack/style-guide

# If you use pmpm
pnpm i --save-dev @xystack/style-guide

# If you use Yarn
yarn add --dev @xystack/style-guide

Some of our ESLint configs require peer dependencies. We'll note those alongside the available configs in the ESLint section.

Prettier

Note: Prettier is a peer-dependency of this package, and should be installed at the root of your project.

See: https://prettier.io/docs/en/install.html

To use the shared Prettier config, set the following in package.json.

{
  "prettier": "@xystack/style-guide/prettier"
}

ESLint

Note: ESLint is a peer-dependency of this package, and should be installed at the root of your project.

See: https://eslint.org/docs/user-guide/getting-started#installation-and-usage

Usage

// eslint.config.js
import { all } from '@xystack/style-guide/eslint'

export default all

VSCode

{
  "eslint.experimental.useFlatConfig": true
}

TypeScript

To use the shared TypeScript config, set the following in tsconfig.json.

{
  "extends": "@xystack/style-guide/typescript"
}