Skip to content

Commit

Permalink
Merge pull request #121 from zonkyio/eslint
Browse files Browse the repository at this point in the history
Migrate to ESLint
  • Loading branch information
rwjblue committed Jul 21, 2020
2 parents 87bdbc6 + 8e6177a commit 8898cbb
Show file tree
Hide file tree
Showing 9 changed files with 773 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
@@ -0,0 +1,2 @@
node_modules/**
test/fixtures/**
22 changes: 22 additions & 0 deletions .eslintrc.js
@@ -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
@@ -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
@@ -1,5 +1,7 @@
.gitignore
.jshintrc
.eslintcache
.eslintignore
.eslintrc.js
.travis.yml
test/
tmp/
6 changes: 5 additions & 1 deletion package.json
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
Expand Up @@ -67,8 +67,7 @@ class Worker {
this.error = message.error;
break;
case 'shutdown':
process.exit(0);
break;
process.exit(0); // eslint-disable-line no-process-exit
}
}

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

This file was deleted.

0 comments on commit 8898cbb

Please sign in to comment.