Permalink
Browse files

jshint —> semistandard

  • Loading branch information...
1 parent 680828e commit b87817d0a8d59368a9bdb256943891ed4a1b17a2 @corymsmith corymsmith committed Oct 22, 2016
Showing with 21 additions and 43 deletions.
  1. +0 −30 .jshintrc
  2. +0 −1 .npmignore
  3. +4 −4 examples/app.js
  4. +13 −4 package.json
  5. +4 −4 src/index.js
View
@@ -1,30 +0,0 @@
-{
- "node": true,
- "esnext": true,
- "bitwise": true,
- "camelcase": true,
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "indent": 2,
- "latedef": "nofunc",
- "newcap": false,
- "noarg": true,
- "quotmark": "single",
- "regexp": true,
- "undef": true,
- "unused": true,
- "strict": false,
- "trailing": true,
- "smarttabs": true,
- "white": false,
- "node": true,
- "globals": {
- "it": true,
- "describe": true,
- "before": true,
- "beforeEach": true,
- "after": true,
- "afterEach": true
- }
-}
View
@@ -1,5 +1,4 @@
.editorconfig
-.jshintrc
.travis.yml
.babelrc
.idea/
View
@@ -1,6 +1,6 @@
-import mandrill from 'nodemailer-mandrill-transport'
-import Mailer from '../src'
-import feathers from 'feathers'
+import mandrill from 'nodemailer-mandrill-transport';
+import Mailer from '../src';
+import feathers from 'feathers';
import rest from 'feathers-rest';
import bodyParser from 'body-parser';
@@ -21,7 +21,7 @@ var app = feathers()
.use('/mailer', mailer);
// A basic error handler, just like Express
-app.use(function(error, req, res, next){
+app.use(function (error, req, res, next) {
res.json(error);
});
View
@@ -37,11 +37,19 @@
"release:major": "npm version major && npm publish",
"compile": "rm -rf lib/ && babel -d lib/ src/",
"watch": "babel --watch -d lib/ src/",
- "jshint": "jshint src/. test/. --config",
+ "lint": "eslint-if-supported semistandard --fix",
"mocha": "mocha test/ --compilers js:babel-core/register",
- "test": "npm run compile && npm run jshint && npm run mocha",
+ "test": "npm run compile && npm run lint && npm run mocha",
"example": "babel-node examples/app"
},
+ "semistandard": {
+ "env": [
+ "mocha"
+ ],
+ "ignore": [
+ "/lib"
+ ]
+ },
"directories": {
"lib": "lib"
},
@@ -57,11 +65,12 @@
"babel-plugin-add-module-exports": "^0.1.2",
"babel-preset-es2015": "^6.5.0",
"body-parser": "^1.15.0",
+ "eslint-if-supported": "^1.0.1",
"feathers": "^2.0.0",
"feathers-rest": "^1.2.3",
- "jshint": "^2.9.1",
"mocha": "^2.4.5",
"nodemailer-mandrill-transport": "^1.1.0",
- "nodemailer-stub-transport": "^1.0.0"
+ "nodemailer-stub-transport": "^1.0.0",
+ "semistandard": "^9.1.0"
}
}
View
@@ -1,7 +1,7 @@
import Debug from 'debug';
import Proto from 'uberproto';
import Mailer from 'nodemailer';
-//import errors from 'feathers-errors';
+// import errors from 'feathers-errors';
const debug = Debug('feathers-mailer');
@@ -25,14 +25,14 @@ class Service {
// TODO maybe body should be text/html field
// and params is rest of options
-
+
// https://github.com/nodemailer/nodemailer#set-up-smtp says:
- // If callback argument is not set then the method returns a Promise object.
+ // If callback argument is not set then the method returns a Promise object.
return this.transporter.sendMail(body, cb);
}
}
-export default function init(transport, defaults) {
+export default function init (transport, defaults) {
return new Service(transport, defaults);
}

0 comments on commit b87817d

Please sign in to comment.