@vbs/fabric
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Language : 🇺🇸 | 🇨🇳

@vbs/fabric

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

Use

Support

  • [x] React + Typescript
  • [x] React + Javascript
  • [x] Vue + Typescript
  • [x] 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

Package Sidebar

Install

npm i @vbs/fabric

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

61.7 kB

Total Files

33

Last publish

Collaborators

  • healar
  • zhangxianglong
  • yangzhihao03
  • yingchanghong2
  • eiso
  • zerlous