Skip to content

Commit

Permalink
Merge pull request #57 from ember-cli/add-linting
Browse files Browse the repository at this point in the history
Add linting via ESLint
  • Loading branch information
Turbo87 authored Oct 13, 2018
2 parents ba1d783 + 5c3fcbe commit 06cae3f
Show file tree
Hide file tree
Showing 6 changed files with 605 additions and 16 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
env: {
node: true,
},
plugins: ['node'],
extends: ['eslint:recommended', 'plugin:node/recommended'],
parserOptions: {
ecmaVersion: 2017
},
overrides: [
{
files: ['tests/**/*-test.js'],
env: {
qunit: true,
}
}
],
};
3 changes: 0 additions & 3 deletions .jshintrc

This file was deleted.

1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ node_js:
- 10

script:
- yarn lint:js
- yarn test
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ module.exports = {
process.env.EMBER_CLI_INJECT_LIVE_RELOAD_PORT = options.liveReloadPort;
process.env.EMBER_CLI_INJECT_LIVE_RELOAD_BASEURL = baseURL;

let baseURLWithoutHost = baseURL.replace(/^https?:\/\/[^\/]+/, '');
app.use(baseURLWithoutHost + 'ember-cli-live-reload.js', function(request, response, next) {
let baseURLWithoutHost = baseURL.replace(/^https?:\/\/[^/]+/, '');
app.use(baseURLWithoutHost + 'ember-cli-live-reload.js', function(request, response) {
response.contentType('text/javascript');
response.send(self.dynamicScript(options));
});
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,22 @@
},
"license": "MIT",
"author": "Robert Jackson",
"files": [
"index.js"
],
"main": "index.js",
"scripts": {
"changelog": "lerna-changelog",
"lint:js": "eslint .",
"test": "qunit tests"
},
"dependencies": {
"clean-base-url": "^1.0.0",
"ember-cli-version-checker": "^2.1.2"
},
"devDependencies": {
"eslint": "^4.0.0",
"eslint-plugin-node": "^6",
"express": "^4.16.3",
"lerna-changelog": "^0.7.0",
"qunit": "~2.6.1"
Expand Down
Loading

0 comments on commit 06cae3f

Please sign in to comment.