This package has been deprecated

Author message:

This package is deprecated. Use @modyqyw/fabric instead. :D

@modyqyw/prettier-config

1.1.9 • Public • Published

DEPRECATED. Check @modyqyw/fabric.

@modyqyw/prettier-config

A prettier shareable config for JavaScript/TypeScript/CSS/LESS/SCSS.

Usage

npm i -D prettier@~2.1.2 @modyqyw/prettier-config@~1.1.9
# or
#yarn add -D prettier@~2.1.2 @modyqyw/prettier-config@~1.1.9

Set prettier field in ${PROJECT_DIR}/package.json.

{
  ...,
  "prettier": "@modyqyw/prettier-config",
  ...
}

Or use ${PROJECT_DIR}/prettier.config.js if you want to overwrite.

// ${PROJECT_DIR}/prettier.config.js
const config = require("@modyqyw/prettier-config");

module.exports = {
  ...config,
  // write your own rules here
  printWidth: 100,
};

VSCode

  • Install plugins.
  • Set up Settings.json. Then F1 => Format Document => F1 => File: Save.
{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "files.eol": "\n",
  "files.associations": {
    "*.wxml": "html",
    "*.wxs": "javascript",
    "*.wxss": "css",
    "*.axml": "html",
    "*.sjs": "javascript",
    "*.acss": "css",
    "*.swan": "html",
    "*.ttml": "html",
    "*.ttss": "css",
    "*.jxml": "html",
    "*.jxss": "css",
    "*.wpy": "vue",
    "*.nvue": "vue",
    "*.ux": "vue"
  },
  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  }
}

For auto formatting, use "editor.formatOnSave": true.

More Configs

@modyqyw/eslint-config and @modyqyw/stylelint-config do not use any Prettier config and plugin, while @modyqyw/fabric does.

License

MIT

Copyright (c) 2020-present MillCloud

Package Sidebar

Install

npm i @modyqyw/prettier-config

Weekly Downloads

2

Version

1.1.9

License

MIT

Unpacked Size

5.35 kB

Total Files

5

Last publish

Collaborators

  • modyqyw