0.1.0 • Published 4 years ago
@zardoy/xo-config v0.1.0
XO Config
This package doesn't use SemVer
Opinionated config (with comments).
How to Use
- Install XO and this config @zardoy/xo-config
- Create file .xo-config.jswithmodule.exports = require('@zardoy/xo-config')
- Install VSCode extension for inline linting
Main Goal
I'm planning to make all my repos follow this config (especially when I figure out how to make a wrapper for XO).
Highlights
- Tab size: 4
It uses 4 spaces instead of hard tab, because not all websites have normalized tab size.
Or for another example, every tab in code printed in console would look like it has 8 spaces width. This rule doesn't make sense for me.
Prettier
This config has disabled (at least I tried to disable) all options, that prettier can handle.
I always format code with prettier and fix all XO issues with CMD+SHIFT+I
For now, I didn't find a way (and don't know what's the best) to include that config in all my projects:
{
    "prettier": {
        "semi": false,
        "singleQuote": true,
        "proseWrap": "never",
        "tabWidth": 4,
        "trailingComma": "all",
        "arrowParens": "avoid"
    }
}At least, it's being included in popular projects.