Package Exports
- @modyqyw/fabric
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@modyqyw/fabric) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@modyqyw/fabric
Shareable configs for different projects.
Usage
npm i -D prettier@~2.1.2 eslint@~7.13.0 stylelint@~13.8.0 @modyqyw/fabric@~1.0.10
# or
#yarn add -D prettier@~2.1.2 eslint@~7.13.0 stylelint@~13.8.0 @modyqyw/fabric@~1.0.10Prettier
// ${PROJECT_DIR}/prettier.config.js
/* eslint-disable import/no-extraneous-dependencies */
const config = require("@modyqyw/fabric/prettier");
module.exports = {
...config,
// write your own rules here
};ESLint
// ${PROJECT_DIR}/.eslintrc.js
/* eslint-disable import/no-extraneous-dependencies */
const config = require("@modyqyw/fabric/eslint/native"); // for js and ts
// const config = require("@modyqyw/fabric/eslint/react"); // for react, react-native and taro3, with js or ts
// const config = require("@modyqyw/fabric/eslint/vue2-typescript"); // for vue2 and uni-app with ts
// const config = require("@modyqyw/fabric/eslint/vue2"); // for vue2 and uni-app with js
// const config = require("@modyqyw/fabric/eslint/vue3-typescript"); // for vue3 and uni-app with ts
// const config = require("@modyqyw/fabric/eslint/vue3"); // for vue3 and uni-app with js
module.exports = {
...config,
rules: {
...config.rules,
// write your own rules here
}
};Do not use const config = require("@modyqyw/fabric/eslint"); unless you are using vue.
Stylelint
// ${PROJECT_DIR}/stylelint.config.js
/* eslint-disable import/no-extraneous-dependencies */
const config = require("@modyqyw/fabric/stylelint");
module.exports = {
...config.css, // for css
// ...config.less, // for less
// ...config.scss, // for scss
};VSCode
{
"css.validate": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue"
],
"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"
},
"less.validate": false,
"scss.validate": false,
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
}
}More Configs
@modyqyw/prettier-config- Github Gitee@modyqyw/eslint-config- Github Gitee@modyqyw/stylelint-config- Github Gitee
@modyqyw/eslint-config and @modyqyw/stylelint-config do not use any Prettier config and plugin, while @modyqyw/fabric does.
License
Copyright (c) 2020-present MillCloud