1.0.0 • Published 4 years ago

@modyqyw/eslint-config-ts v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@modyqyw/eslint-config-ts

An ESLint shareable config.

Usage

  • Install the config.
npm i eslint@~6.8.0 typescript@~3.8.0 @modyqyw/eslint-config-ts@~1.0.0 -D

For yarn, run scripts below.

yarn add eslint@~6.8.0 typescript@~3.8.0 @modyqyw/eslint-config-ts@~1.0.0 -D
  • Set up.
// .eslintrc.js
module.exports = {
  extends: ['@modyqyw/ts']
}
  • For VSCode
    • Install plugins.
    • Set up Settings.json. Then F1 => Format Document(call vetur for *.vue files and prettier for other files) => Save File(call ESLint).
{
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "emmet.includeLanguages": {
    "javascript": "javascriptreact",
    "typescript": "typescriptreact",
    "json": "jsonc"
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "html",
    "vue",
    "vue-html"
  ],
  "files.eol": "\n",
  "files.associations": {
    "*.js": "javascriptreact",
    "*.ts": "typescriptreact",
    "*.wxml": "html",
    "*.wxs": "javascript",
    "*.wxss": "css",
    "*.axml": "html",
    "*.sjs": "javascript",
    "*.acss": "css",
    "*.wpy": "html",
    "*.json": "jsonc",
    "*.nvue": "vue"
  },
  "vetur.format.defaultFormatterOptions": {
    "prettyhtml": {
      "wrapAttributes": true
    }
  },
  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  }
}
  • For WebStorm
    • TODO

More Config

License

MIT

Copyright (c) 2020-present Millcloud