xo
xo copied to clipboard
Bug: xo ignores package.json config when run from a project subfolder
When xo is run from a project subfolder, it ignores the config in package.json.
This is regression introduced between 0.26.1 and 0.27.0 (likely in #416)
How to reproduce (see my SSCCE here):
- setup xo with a config minimally different from the default one (e.g. use spaces instead of tab)
- create a
foo/bar.jsfile that uses spaces instead of tabs - from the top-level project folder (the one that contains
package.json) run:
$ xo foo/bar.js
- observer that there are no error or warning
- now run the following commands:
$ cd foo
$ xo bar.js
- observe the following error message:
bar.js:2:1
✖ 2:1 Expected indentation of 1 tab but found 2 spaces. indent