standardjs-vue

combine standardjs with .vue|js|ts files

Stars
25
Committers
1

Standardjs Spec with .vue|js|ts files

standardjs Vue cli standard --plugin vue **/*.vue / .vue .eslintrc.js eslint standard

standard

vue react|js|ts standard lint

  • standard --fix

How to use standard in vue project

vue example example

$ npm i eslint-config-standard-vue-ts --save-dev

.eslintrc.js

module.exports = {
  extends: [
    'standard-vue-ts'
  ],
  //  ts  tsconfig.json 
  parserOptions: {
    project: './tsconfig.json'
  }
}

"lint": "eslint ./ --ext .js,.vue,.ts",
"lint:fix": "eslint ./ --ext .js,.vue,.ts --fix"

VSCode formatOnSave

VSCode

plugin

eslint plugin eslint.formatOnSave eslint

vscode setting

{
  "editor.codeActionsOnSave": {
    // 
    "source.fixAll.eslint": true
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "vue",
      "autoFix": true
    }
  ],
  "files.associations": {
    "*.vue": "vue"
  }
}

VSCode

Readme

standardjs

  • () ref: JavaScript
  • , JS like
  • bug !
    
  • if (condition) { ... }
  • function name (arg) { ... }
  • === == null || undefined obj == null
  • Node.js err
  • window document navigator
  • open, length, event name
  • standard

Feature

  • tslint (tslint eslint ) ref: VSCode
  • eslint
  • vue vue standard vue standard props 100(8) eslint fix PR

FAQ

follow PHP

standard standard

ESLint eslint-config-standard

standard (^____^)/

Web

standard/standard ECMA/standard

standard () web :-)

standard of quality style standards