Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(xo): setup linter #67

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "webpack plugin for generating asset manifests",
"main": "index.js",
"scripts": {
"test": "nyc jasmine"
"test": "xo && nyc jasmine"
},
"author": "Dane Thurber <dane.thurber@gmail.com>",
"license": "MIT",
Expand All @@ -24,7 +24,8 @@
"nyc": "^10.3.2",
"rimraf": "^2.6.1",
"style-loader": "^0.8.3",
"webpack": "^1.7.3"
"webpack": "^1.7.3",
"xo": "^0.18.2"
},
"files": [
"index.js",
Expand All @@ -50,5 +51,18 @@
"exclude": [
"spec"
]
},
"xo": {
"space": 2,
"rules": {
"space-before-function-paren": ["error", "never"]
},
"globals": [
"describe",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use:

{
  "env": {
    "jasmine": true
  }
}

instead of adding every global one by one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, didn't know about this... Super useful 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"it",
"beforeAll",
"beforeEach",
"expect"
]
}
}