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

Migrate to ESLint #121

Merged
merged 1 commit into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/**
test/fixtures/**
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';
module.exports = {
parserOptions: {
ecmaVersion: 2017,
},
extends: ['eslint:recommended', 'plugin:node/recommended'],
plugins: ['node'],
env: {
node: true,
es6: true,
},
overrides: [
{
files: ['test/**/*-test.js'],
env: {
mocha: true,
},
extends: ['plugin:mocha/recommended'],
plugins: ['mocha'],
},
]
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist/
tmp/
.eslintcache
5 changes: 0 additions & 5 deletions .jshintrc

This file was deleted.

4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.gitignore
.jshintrc
.eslintcache
.eslintignore
.eslintrc.js
.travis.yml
test/
tmp/
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "A production-ready app server for running Ember FastBoot apps",
"main": "src/fastboot-app-server.js",
"scripts": {
"test": "NODE_ENV=test mocha"
"lint:js": "eslint --cache .",
"test": "yarn lint:js && NODE_ENV=test mocha"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -39,6 +40,9 @@
"babel-preset-es2015": "^6.9.0",
"chai": "^4.1.0",
"ember-cli": "^2.10.2",
"eslint": "^6.8.0",
"eslint-plugin-mocha": "^6.3.0",
"eslint-plugin-node": "^11.1.0",
"mocha": "^5.0.0",
"request-promise": "^4.2.1"
}
Expand Down
3 changes: 1 addition & 2 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ class Worker {
this.error = message.error;
break;
case 'shutdown':
process.exit(0);
break;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was reported as Unreachable code due to the process.exit() above.

process.exit(0); // eslint-disable-line no-process-exit
}
}

Expand Down
6 changes: 0 additions & 6 deletions test/.jshintrc

This file was deleted.

Loading