JSPM

@modyqyw/fabric

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 37
  • Score
    100M100P100Q55317F
  • License MIT

Shareable configs for different projects.

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.

Github | Gitee

Usage

npm i -D prettier@~2.1.0 eslint@~7.13.0 stylelint@~13.7.2 @modyqyw/fabric@~1.0.0
# or
#yarn add -D prettier@~2.1.0 eslint@~7.13.0 stylelint@~13.7.2 @modyqyw/fabric@~1.0.0

Prettier

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

module.exports = {
  ...config,
  // write your configs here
};

ESLint

// ${PROJECT_DIR}/.eslintrc.js
const config = require("@modyqyw/fabric/eslint");

module.exports = {
  ...config.native, // for js and ts
  // ...config.react, // for react, react-native and taro3, with js or ts
  // ...config.vue2Typescript, // for vue2 and uni-app with ts
  // ...config.vue2, // for vue2 and uni-app with js
  // ...config.vue3Typescript, // for vue3 and uni-app with ts
  // ...config.vue3, // for vue3 and uni-app with js
  rules: [
    // write your rules here
  ],
};

Stylelint

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

module.exports = {
  ...config.css, // for css
  // ...config.less, // for less
  // ...config.scss, // for scss
  rules: [
    // write your rules here
  ],
};

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/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