Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

Update to ESLint #32

Merged
merged 1 commit into from Oct 9, 2016
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/index.js
Expand Up @@ -70,14 +70,13 @@ module.exports = generators.Base.extend({
'babel-cli@^6.0.0',
'babel-preset-es2015@^6.0.0',
'babel-plugin-add-module-exports',
'jshint@^2.0.0',
'eslint@^3.7.0',
'mocha@^2.0.0',
'chai@^3.5.0',
'feathers@^2.0.0',
'feathers-hooks@^1.5.0',
'feathers-rest@^1.2.2',
'body-parser@^1.9.0',
'nsp@^2.2.0',
'rimraf@^2.5.0'
], { saveDev: true});
}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Feathers
Copyright (c) 2016 Feathers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions app/templates/package.json
Expand Up @@ -34,9 +34,9 @@
"changelog": "github_changelog_generator && git add CHANGELOG.md && git commit -am \"Updating changelog\"",
"compile": "rimraf lib/ && babel -d lib/ src/",
"watch": "babel --watch -d lib/ src/",
"jshint": "jshint src/. test/. --config",
"lint": "eslint src/. test/.",
"mocha": "mocha --recursive 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",
"start": "npm run compile && node example/app"
},
"directories": {
Expand Down
29 changes: 29 additions & 0 deletions app/templates/static/.eslintrc.json
@@ -0,0 +1,29 @@
{
"env": {
"es6": true,
"node": true,
"mocha": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
30 changes: 0 additions & 30 deletions app/templates/static/.jshintrc

This file was deleted.

59 changes: 29 additions & 30 deletions test/test-creation.js
Expand Up @@ -7,37 +7,36 @@ var fs = require('fs');
var exec = require('child_process').exec;
var helpers = require('yeoman-test');

describe('feathers-plugin generator', function () {
it('created a plugin with passing tests', function (done) {
var tmpDir;
describe('feathers-plugin generator', function() {
it('created a plugin with passing tests', function(done) {
var tmpDir;

helpers.run(path.join(__dirname, '../app'))
.inTmpDir(function (dir) {
tmpDir = dir;
})
.withOptions({
skipInstall: false
})
.withPrompts({
name: 'feathers-tmp',
repository: 'feathersjs/feathers-tmp',
description: 'Plugin description here'
})
.on('end', function () {
assert.ok(fs.existsSync(path.join(tmpDir, '.jshintrc')));
assert.ok(fs.existsSync(path.join(tmpDir, '.npmignore')));
assert.ok(fs.existsSync(path.join(tmpDir, '.travis.yml')));
assert.ok(fs.existsSync(path.join(tmpDir, '.editorconfig')));
assert.ok(fs.existsSync(path.join(tmpDir, '.babelrc')));
helpers.run(path.join(__dirname, '../app'))
.inTmpDir(function(dir) {
tmpDir = dir;
})
.withOptions({
skipInstall: false
})
.withPrompts({
name: 'feathers-tmp',
repository: 'feathersjs/feathers-tmp',
description: 'Plugin description here'
})
.on('end', function() {
assert.ok(fs.existsSync(path.join(tmpDir, '.npmignore')));
assert.ok(fs.existsSync(path.join(tmpDir, '.travis.yml')));
assert.ok(fs.existsSync(path.join(tmpDir, '.editorconfig')));
assert.ok(fs.existsSync(path.join(tmpDir, '.babelrc')));

var child = exec('npm test', {
cwd: tmpDir
});
var child = exec('npm test', {
cwd: tmpDir
});

child.on('exit', function (status) {
assert.equal(status, 0, 'Got correct exist status');
done();
});
});
});
child.on('exit', function(status) {
assert.equal(status, 0, 'Got correct exist status');
done();
});
});
});
});