Language : 🇺🇸 | 🇨🇳
A collection of configuration files containing prettier, eslint, stylelint. It is based on @umijs/fabric.
- React + Typescript
- React + Javascript
- Vue + Typescript
- Vue + Javascript
- Alipay Mini program
- Wechat Mini program
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.
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
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,
};
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,
};
todo