xojs
xo

https://github.com/xojs/xo
Go to Github

❤️ JavaScript happiness style linter

https://github.com/xojs/xo/issues/223Go to Github

FundedView inOverrides not working when calling xo with absolute paths#223

olavimcreated this issue 13 days ago

I have this in my package.json:

"xo": {
  "extends": "xo-react",
  "parser": "babel-eslint",
  "plugins": ["react"],
  "envs": ["node", "browser"],
  "rules": {
    "react/forbid-component-props": 0,
    "react/jsx-closing-bracket-location": ["error", "tag-aligned"]
  },
  "overrides": [{
    "files": "src/client/components/*.js",
    "rules": {
      "unicorn/filename-case": [
        "error", {"case": "pascalCase"}
      ]
    }
  }, {
    "files": "src/client/containers/*.js",
    "rules": {
      "unicorn/filename-case": [
        "error",
        {"case": "pascalCase"}
      ]
    }
  }]
}

And I have the file src/client/components/ExtendedReferenceManyField.js

Now, if I call

$ xo src/client/components/ExtendedReferenceManyField.js

it finishes without errors. However, calling:

$ xo /home/user/dev/project/src/client/components/ExtendedReferenceManyField.js

will output:

  src/client/components/ExtendedReferenceManyField.js:1:1
  ✖  1:1  Filename is not in kebab case. Rename it to extended-reference-many-field.js.  unicorn/filename-case

  1 error

I stumbled on this while using lint-staged in my project.


xo version: 0.18.2 Node version: 6.10.1 OS: Linux Mint 18 Cinnamon 64-bit

Logs

Amount funded

$60.00

Resolve this issue and earn $54.00

Fund this issue

Fund as

Payment method

Amount(USD)

Please sign in first to fund this issue

Sign in with

Pull requests

0

    Submit

    URL of your pull request

    Submit your pull request

    Please sign in first to submit a pull request

    Sign in with