Socket
Book a DemoInstallSign in
Socket

@vbs/fabric

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vbs/fabric

A rule library is used to manage the code writing specifications of team members.

0.0.3
latest
Source
npmnpm
Version published
Maintainers
4
Created
Source

Language : 🇺🇸 | 🇨🇳

@vbs/fabric

A collection of configuration files containing prettier, eslint, stylelint. It is based on @umijs/fabric.

Use

Support

  • React + Typescript
  • React + Javascript
  • Vue + Typescript
  • Vue + Javascript
  • Alipay Mini program
  • Wechat Mini program

Install

npm i @vbs/fabric --save-dev
yarn add @vbs/fabric -D

In your project's root directory creating the configuration file shown below:

  • .editorconfig: a file format and collection of text editor plugins for maintaining consistent coding styles between different editors and IDEs.
  • .eslintignore: a file to tell ESLint to ignore specific files.
  • .eslintrc.js: an object configuration file for ESLint.
  • .prettierignore: a file to tell prettier to ignore specific files.
  • .prettierrc.js: an object configuration file for prettier.
  • .stylelintrc.js: an object configuration file for stylelint.

Configuration

Common Config

The config examples:

in .editorconfig

# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab

in .eslintignore

/lambda/
/scripts
/config
.history
public
dist
.umi
mock

in .prettierignore

**/*.svg
package.json
.umi
.umi-production
/dist
.dockerignore
.DS_Store
.gitignore
.eslintignore
*.png
*.toml
docker
.editorconfig
Dockerfile*
.gitignore
.prettierignore
LICENSE
.eslintcache
*.lock
yarn-error.log
.history
CNAME
/build
/public

React

in .eslintrc.js

module.exports = {
  extends: [require.resolve('@vbs/fabric/dist/react/eslint')],
};

in .prettierrc.js

const fabric = require('@vbs/fabric');
const { ReactConfig } = fabric;

module.exports = {
  ...ReactConfig.prettier,
};

in .stylelintrc.js

const fabric = require('@vbs/fabric');
const { ReactConfig } = fabric;

module.exports = {
  ...ReactConfig.stylelint,
};

Vue

in .eslintrc.js

module.exports = {
  extends: [require.resolve('@vbs/fabric/dist/vue/eslint')],
};

in .prettierrc.js

const fabric = require('@vbs/fabric');
const { VueConfig } = fabric;

module.exports = {
  ...VueConfig.prettier,
};

in .stylelintrc.js

const fabric = require('@vbs/fabric');
const { VueConfig } = fabric;

module.exports = {
  ...VueConfig.stylelint,
};

Mini Program

todo

Keywords

vbs

FAQs

Package last updated on 16 Feb 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

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.