Xo: Global configuration

Created on 1 Sep 2017  路  6Comments  路  Source: xojs/xo

My defaults are very different than the normal xo defaults. Sometimes I mock up some JavaScript in a file in its own folder and would prefer to have a ~/.xoconfig with default options/overrides. Is this possible? I see there's a ~/.xo-cache but is there a ~/.xorc or something similar?

enhancement help wanted

Most helpful comment

Hmm, actually, would probably be better to just resolve a globally installed sharable config and use that. Then it's exactly like having a local shareable config but falls back to the global one if a local one is not found. So to have a global fallback, you would just have to do npm i -g eslint-config-foo. That way you only need maintain one override config in one place.

All 6 comments

I would really like to see this too, xo is actually 31 % of my package.json and it was very large before

@Goluis You could make a shareable config with your overrides.

@sindresorhus, would still need to add it to extends in package.json every time?

I was referring to the 30% comment. It would at least reduce it to a couple of lines.

I'm open to a global XO config if someone does a good pull request with docs and tests.

The file should live in https://github.com/sindresorhus/env-paths#pathsconfig as xo.json.

Hmm, actually, would probably be better to just resolve a globally installed sharable config and use that. Then it's exactly like having a local shareable config but falls back to the global one if a local one is not found. So to have a global fallback, you would just have to do npm i -g eslint-config-foo. That way you only need maintain one override config in one place.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EdJoPaTo picture EdJoPaTo  路  3Comments

dawsbot picture dawsbot  路  5Comments

sindresorhus picture sindresorhus  路  3Comments

SteveALee picture SteveALee  路  5Comments

DavidAnson picture DavidAnson  路  8Comments