Skip to content

Instantly share code, notes, and snippets.

@ThaddeusJiang
Created July 31, 2018 11:02
Show Gist options
  • Save ThaddeusJiang/87fcf9b9c344ee29dc44249207f063ea to your computer and use it in GitHub Desktop.
Save ThaddeusJiang/87fcf9b9c344ee29dc44249207f063ea to your computer and use it in GitHub Desktop.
eslint 禁止运算符混合

+ - * / 没有必要

{
    "no-mixed-operators": [
        "error",
        {
            "groups": [
                ["&", "|", "^", "~", "<<", ">>", ">>>"],
                ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
                ["&&", "||"],
                ["in", "instanceof"]
            ],
            "allowSamePrecedence": true
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment