zoukankan      html  css  js  c++  java
  • eslint and stylelint config

    eslint:

    module.exports = {
      root: true,
      env: {
        browser: true,
        es6: true,
        node: true
      },
      extends: [
        'plugin:vue/recommended',
        '@vue/standard'
      ],
      parserOptions: {
        parser: 'babel-eslint'
      },
      rules: {
        'import/order': 2,
        'no-var': 2,
        'prefer-const': 0,
        'no-console': 1,
        'no-debugger': 1,
        'standard/no-callback-literal': 0,
        indent: 2,
        'vue/singleline-html-element-content-newline': 0,
        'vue/max-attributes-per-line': [2, {
          singleline: 2,
          multiline: {
            max: 1,
            allowFirstLine: false
          }
        }],
        'vue/script-indent': [2, 2, {
          baseIndent: 1,
          switchCase: 1
        }],
        'vue/order-in-components': 1,
        'vue/html-closing-bracket-newline': [2, {
          singleline: 'never',
          multiline: 'always'
        }]
      },
      overrides: [{ files: ['*.vue'], rules: { indent: 'off' } }]
    }

    stylelint:

    module.exports = {
      extends: ['stylelint-config-standard'],
      plugins: ['stylelint-order'],
      rules: {
        'order/order': [
          'custom-properties',
          'declarations'
        ],
        'order/properties-alphabetical-order': true
      }
    }

    package.json:

    "@vue/cli-plugin-babel": "~4.3.0",
    "@vue/cli-plugin-eslint": "~4.3.0",
    "@vue/cli-service": "~4.3.0",
    "@vue/eslint-config-standard": "^5.1.2",
    "babel-eslint": "^10.1.0",
    "eslint": "^7.0.0",
    "eslint-plugin-import": "^2.20.2",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-standard": "^4.0.1",
    "eslint-plugin-vue": "^6.2.2",
    "less-loader": "^6.1.0",
    "stylelint": "^13.5.0",
    "stylelint-order": "^4.0.0",
    "stylelint-config-standard": "^20.0.0",
    "vue-template-compiler": "^2.6.11"
  • 相关阅读:
    DELPHI加密字串(异或运算加密)
    delphi 浮点数float转换成十六进制字符串的方法(FloatToHex)
    delphi 浮点数转换成十六进制字符串的方法
    LRC CRC 纵向冗余码校验
    lrc 校验码 ascii 格式
    LRC的效验码的计算方法
    写给嵌入式程序员的循环冗余校验(CRC)算法入门引导
    CRC的校验原理
    CRC校验
    RTU模式与ASCII模式有什么不同
  • 原文地址:https://www.cnblogs.com/RainyBear/p/12973341.html
Copyright © 2011-2022 走看看