mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
improvement: jshint/jscs
no issue - add mocha option to jshintrc, no need to define globals in files anymore - call client grunt commands in case of jshint/jscs
This commit is contained in:
parent
3e92d63c27
commit
250d571fe6
45
.jshintrc
45
.jshintrc
@ -1,23 +1,26 @@
|
||||
{
|
||||
"node": true,
|
||||
"browser": false,
|
||||
"strict": false,
|
||||
"sub": true,
|
||||
"eqeqeq": true,
|
||||
"laxbreak": true,
|
||||
"bitwise": true,
|
||||
"curly": true,
|
||||
"forin": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonew": true,
|
||||
"plusplus": true,
|
||||
"regexp": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"indent": 4,
|
||||
"predef": [ "-Promise" ]
|
||||
"node": true,
|
||||
"browser": false,
|
||||
"strict": false,
|
||||
"sub": true,
|
||||
"eqeqeq": true,
|
||||
"laxbreak": true,
|
||||
"bitwise": true,
|
||||
"curly": true,
|
||||
"forin": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonew": true,
|
||||
"plusplus": true,
|
||||
"regexp": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"mocha": true,
|
||||
"indent": 4,
|
||||
"predef": [
|
||||
"-Promise"
|
||||
]
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ var _ = require('lodash'),
|
||||
// more information.
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: true
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
|
||||
server: [
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it */
|
||||
// # Module tests
|
||||
// This tests using Ghost as an npm module
|
||||
var should = require('should'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
|
||||
// # Frontend Route tests
|
||||
// As it stands, these tests depend on the database, and as such are integration tests.
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var supertest = require('supertest'),
|
||||
should = require('should'),
|
||||
testUtils = require('../../../utils'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var supertest = require('supertest'),
|
||||
should = require('should'),
|
||||
testUtils = require('../../../utils'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
// # Api Route tests
|
||||
// As it stands, these tests depend on the database, and as such are integration tests.
|
||||
// Mocking out the models to not touch the DB would turn these into unit tests, and should probably be done in future,
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var testUtils = require('../../../utils'),
|
||||
supertest = require('supertest'),
|
||||
should = require('should'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
var testUtils = require('../../../utils'),
|
||||
should = require('should'),
|
||||
supertest = require('supertest'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
|
||||
// # Channel Route Tests
|
||||
// As it stands, these tests depend on the database, and as such are integration tests.
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*global describe, it, before, after */
|
||||
|
||||
// # Frontend Route tests
|
||||
// As it stands, these tests depend on the database, and as such are integration tests.
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, after, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
config = require('../../../server/config'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, after, before, beforeEach, afterEach */
|
||||
|
||||
var should = require('should'),
|
||||
moment = require('moment'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var _ = require('lodash'),
|
||||
testUtils = require('../../utils'),
|
||||
rewire = require('rewire'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, afterEach, it*/
|
||||
var tmp = require('tmp'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var testUtils = require('../utils/index'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, after, it */
|
||||
var testUtils = require('../utils/index'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
|
||||
/*jshint unused:false*/
|
||||
var should = require('should'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
events = require('../../../server/events'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sequence = require('../../../server/utils/sequence'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
moment = require('moment'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it */
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var testUtils = require('../../utils'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, after, it*/
|
||||
var testUtils = require('../utils'),
|
||||
should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it */
|
||||
var should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
config = rewire('../../../server/config'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, afterEach */
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
_ = require('lodash'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var path = require('path'),
|
||||
EventEmitter = require('events').EventEmitter,
|
||||
should = require('should'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, before, beforeEach, afterEach */
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
channelConfig = require('../../../../server/controllers/frontend/channel-config').get;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, it*/
|
||||
var should = require('should'),
|
||||
_ = require('lodash'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
errors = require('../../../../server/errors'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var should = require('should'),
|
||||
|
||||
// Stuff we are testing
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var moment = require('moment'),
|
||||
should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach, afterEach */
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach, afterEach*/
|
||||
/*jshint expr:true*/
|
||||
var should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, afterEach, beforeEach*/
|
||||
var should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, after, before, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
sinon = require('sinon'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, afterEach, beforeEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, afterEach, beforeEach, it*/
|
||||
var should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getAssetUrl = require('../../../server/data/meta/asset_url'),
|
||||
config = require('../../../server/config');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getAuthorFacebookUrl = require('../../../server/data/meta/author_fb_url'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getAuthorImage = require('../../../server/data/meta/author_image'),
|
||||
should = require('should'),
|
||||
config = require('../../../server/config');
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getAuthorUrl = require('../../../server/data/meta/author_url'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getCanonicalUrl = require('../../../server/data/meta/canonical_url');
|
||||
|
||||
describe('getCanonicalUrl', function () {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, before, after */
|
||||
var should = require('should'),
|
||||
getContextObject = require('../../../server/data/meta/context_object.js'),
|
||||
configUtils = require('../../utils/configUtils');
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getCoverImage = require('../../../server/data/meta/cover_image'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getCreatorTwitterUrl = require('../../../server/data/meta/creator_url'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getMetaDescription = require('../../../server/data/meta/description');
|
||||
|
||||
describe('getMetaDescription', function () {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getExcerpt = require('../../../server/data/meta/excerpt');
|
||||
|
||||
describe('getExcerpt', function () {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getKeywords = require('../../../server/data/meta/keywords'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getModifiedDate = require('../../../server/data/meta/modified_date'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getOgType = require('../../../server/data/meta/og_type'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, before, beforeEach, after */
|
||||
var should = require('should'),
|
||||
getPaginatedUrl = require('../../../server/data/meta/paginated_url'),
|
||||
configUtils = require('../../utils/configUtils');
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getPublishedDate = require('../../../server/data/meta/published_date'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getRssUrl = require('../../../server/data/meta/rss_url'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getSchema = require('../../../server/data/meta/schema'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getStructuredData = require('../../../server/data/meta/structured_data'),
|
||||
should = require('should');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getTitle = require('../../../server/data/meta/title'),
|
||||
config = require('../../../server/config');
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it*/
|
||||
var getUrl = require('../../../server/data/meta/url');
|
||||
|
||||
describe('getUrl', function () {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach, afterEach */
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
passport = require('passport'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
middleware = require('../../../server/middleware').middleware;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach, afterEach */
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
configUtils = require('../../utils/configUtils'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach, afterEach */
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
decideIsAdmin = require('../../../server/middleware/decide-is-admin');
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, before, beforeEach, afterEach, it*/
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach, afterEach */
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
Promise = require('bluebird'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach, afterEach */
|
||||
var fs = require('fs'),
|
||||
sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, beforeEach, afterEach, it*/
|
||||
var should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
middleware = require('../../../server/middleware').middleware;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach */
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*globals describe, it, beforeEach, afterEach */
|
||||
var sinon = require('sinon'),
|
||||
should = require('should'),
|
||||
express = require('express'),
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user