xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

ESLint & jsx-quotes & quotes

ESLint & jsx-quotes & quotes

bug

{
    "jsx-quotes": [
      "error",
      "prefer-single",
    ],
    "jsx-quotes": 0,
}

jsx-quotes

https://eslint.org/docs/rules/jsx-quotes#prefer-single

{
   "jsx-quotes": ["error", "prefer-single"],
}

quotes

https://eslint.org/docs/rules/quotes

quotes: ["error", "single"]
quotes: ["error", "single"]
quotes: ["error", "backtick"]

quotes: ["error", "double", { "avoidEscape": true }]
quotes: ["error", "single", { "avoidEscape": true }]
quotes: ["error", "backtick", { "avoidEscape": true }]

quotes: ["error", "double", { "allowTemplateLiterals": true }]
quotes: ["error", "single", { "allowTemplateLiterals": true }]

// { "allowTemplateLiterals": false }


semi

https://eslint.org/docs/rules/semi

semi: ["error", "always"]
semi: ["error", "never"]

semi: ["error", "always", { "omitLastInOneLineBlock": true}]
semi: ["error", "never", { "beforeStatementContinuationChars": "always"}]
semi: ["error", "never", { "beforeStatementContinuationChars": "never"}]


refs

JavaScript Semicolon Insertion

https://blog.izs.me/2010/12/an-open-letter-to-javascript-leaders-regarding/

https://inimino.org/~inimino/blog/javascript_semicolons


{
  "extends": [
    "taro",
    "standard"
  ],
  "globals": {
    "wx": true,
    "my": true,
    "PAGES": true,
    "SUB_PAGES": true,
    "TAB_BAR": true,
    "sensorH5": true
  },
  "rules": {
    "no-unused-vars": [
      "error",
      {
        "varsIgnorePattern": "Taro"
      }
    ],
    "react/jsx-filename-extension": [
      1,
      {
        "extensions": [
          ".js",
          ".jsx",
          ".tsx"
        ]
      }
    ],
    "taro/this-props-function": 0,
    "comma-dangle": [
      "error",
      "always-multiline"
    ],
    "jsx-quotes": [
      "error",
      "prefer-double"
    ],
    "space-before-function-paren": [
      "error",
      "never"
    ],
    "no-shadow": [
      "off",
    ],
    "semi": [
      "off",
    ],
    "jsx-quotes": [
      "error",
      "prefer-single",
    ],
    "jsx-quotes": 0,
    "quotes": ["error", "single"],
  },
  "parser": "babel-eslint"
}


posted @   xgqfrms  阅读(1460)  评论(2编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-04-04 Windows 10 multi virtual desktop keyboard shortcut All In One
2019-04-04 996.ICU
2017-04-04 服务工作线程 & 推送通知 & 后台同步 (service-worker, push-notifications, background-sync, app-shell, promises, fetch api, web worker, worker)
2017-04-04 JavaScript 中的相等性判断 : 严格相等 === , (非严格)相等 == , Object.is (ES 6)
2016-04-04 为 Visual C++ 项目创建的文件类型: .dbp项目 数据库项目文件。
2016-04-04 2016 最新 MVC,MVP,MVVM 的对比分析 详细教程!
2016-04-04 Linux shell (.sh 文件) 基础命令 常用命令 汇总
点击右上角即可分享
微信分享提示