Removed old jshint/jscs rules

refs bcf5a1bc34

- leftovers
This commit is contained in:
kirrg001 2018-06-02 21:48:23 +02:00
parent dd668892d7
commit 0ccc24bf11
111 changed files with 104 additions and 125 deletions

View File

@ -1011,7 +1011,6 @@ describe('Post API', function () {
.expect('Content-Type', /json/)
.expect('Cache-Control', testUtils.cacheRules.private)
.end(function (err, res) {
/*jshint unused:false*/
if (err) {
return done(err);
}
@ -1023,8 +1022,7 @@ describe('Post API', function () {
.expect('Content-Type', /json/)
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(401)
.end(function (err, res) {
/*jshint unused:false*/
.end(function (err) {
if (err) {
return done(err);
}
@ -1054,7 +1052,6 @@ describe('Post API', function () {
.expect('Cache-Control', testUtils.cacheRules.private)
.expect(400)
.end(function (err, res) {
/*jshint unused:false*/
if (err) {
return done(err);
}
@ -1300,8 +1297,7 @@ describe('Post API', function () {
.send(jsonResponse)
.expect('Content-Type', /json/)
.expect('Cache-Control', testUtils.cacheRules.private)
.end(function (err, res) {
/*jshint unused:false*/
.end(function (err) {
if (err) {
return done(err);
}
@ -1329,7 +1325,6 @@ describe('Post API', function () {
.expect('Cache-Control', testUtils.cacheRules.private)
.send(jsonResponse)
.end(function (err, res) {
/*jshint unused:false*/
if (err) {
return done(err);
}

View File

@ -501,7 +501,7 @@ describe('Public API', function () {
function createFilter(publishedAt, op) {
// This line deliberately uses double quotes because GQL cannot handle either double quotes
// or escaped singles, see TryGhost/GQL#34
return encodeURIComponent("published_at:" + op + "'" + publishedAt + "'"); // jscs:ignore
return encodeURIComponent("published_at:" + op + "'" + publishedAt + "'");
}
request

View File

@ -155,8 +155,7 @@ describe('Settings API', function () {
.set('Authorization', 'Bearer ' + 'invalidtoken')
.send(jsonResponse)
.expect(401)
.end(function (err, res) {
/*jshint unused:false*/
.end(function (err) {
if (err) {
return done(err);
}

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
supertest = require('supertest'),
testUtils = require('../../../utils'),
path = require('path'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
supertest = require('supertest'),
testUtils = require('../../../utils'),
path = require('path'),

View File

@ -466,8 +466,7 @@ describe('User API', function () {
.set('Authorization', 'Bearer ' + 'invalidtoken')
.send(jsonResponse)
.expect(401)
.end(function (err, res) {
/*jshint unused:false*/
.end(function (err) {
if (err) {
return done(err);
}
@ -509,7 +508,6 @@ describe('User API', function () {
.send(jsonResponse)
.expect(200)
.end(function (err, res) {
/*jshint unused:false*/
if (err) {
return done(err);
}

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
Promise = require('bluebird'),
moment = require('moment-timezone'),

View File

@ -1,4 +1,4 @@
const should = require('should'), // jshint ignore:line
const should = require('should'),
sinon = require('sinon'),
testUtils = require('../../utils'),
configUtils = require('../../utils/configUtils'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
rewire = require('rewire'),
Promise = require('bluebird'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
fs = require('fs-extra'),
moment = require('moment'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
fs = require('fs-extra'),
StorageBase = require('ghost-storage-base'),
configUtils = require('../../../utils/configUtils'),

View File

@ -1,5 +1,4 @@
// We use the name input_password to match the helper for consistency:
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
var should = require('should'),
// Stuff we are testing

View File

@ -1,5 +1,5 @@
/*globals describe, beforeEach, afterEach, it*/
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
crypto = require('crypto'),
fs = require('fs-extra'),

View File

@ -1,11 +1,9 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
path = require('path'),
rewire = require('rewire'),
_ = require('lodash'),
configUtils = require('../../utils/configUtils');
// jscs:disable requireDotNotation
describe('Config', function () {
before(function () {
configUtils.restore();

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
configUtils = require('../../../server/config/utils');
describe('UNIT: Config utils', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
common = require('../../../../server/lib/common'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
formatResponse = require('../../../../server/controllers/frontend/format-response');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
rewire = require('rewire'),
_ = require('lodash'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
getAssetUrl = require('../../../../server/data/meta/asset_url'),
settingsCache = require('../../../../server/services/settings/cache'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
getCanonicalUrl = require('../../../../server/data/meta/canonical_url'),
markdownToMobiledoc = require('../../../utils/fixtures/data-generator').markdownToMobiledoc;

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
getMetaDescription = require('../../../../server/data/meta/description');
describe('getMetaDescription', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
getExcerpt = require('../../../../server/data/meta/excerpt');
describe('getExcerpt', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
getTitle = require('../../../../server/data/meta/title'),
settingsCache = require('../../../../server/services/settings/cache'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
getUrl = require('../../../../server/data/meta/url'),
markdownToMobiledoc = require('../../../utils/fixtures/data-generator').markdownToMobiledoc;

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
_ = require('lodash'),
crypto = require('crypto'),
schema = require('../../../../server/data/schema'),

View File

@ -126,11 +126,9 @@ describe('Validation', function () {
var validator = validation.validator;
it('isEmptyOrUrl filters javascript urls', function () {
/*jshint scripturl:true */
validator.isEmptyOrURL('javascript:alert(0)').should.be.false();
validator.isEmptyOrURL('http://example.com/lol/<script>lalala</script>/').should.be.false();
validator.isEmptyOrURL('http://example.com/lol?somequery=<script>lalala</script>').should.be.false();
/*jshint scripturl:false */
validator.isEmptyOrURL('').should.be.true();
validator.isEmptyOrURL('http://localhost:2368').should.be.true();
validator.isEmptyOrURL('http://example.com/test/').should.be.true();

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
configUtils = require('../../utils/configUtils'),
helpers = require('../../../server/helpers'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
helpers = require('../../../server/helpers'),
models = require('../../../server/models'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
themeList = require('../../../server/services/themes').list,
// Stuff we are testing

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
_ = require('lodash'),
helpers = require.main.require('core/server/helpers'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
// Stuff we are testing

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
_ = require('lodash'),
Promise = require('bluebird'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
// Stuff we are testing

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
configUtils = require('../../utils/configUtils'),

View File

@ -1,5 +1,4 @@
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
var should = require('should'), // jshint ignore:line
var should = require('should'),
_ = require('lodash'),
hbs = require.main.require('core/server/services/themes/engine'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
helpers = require('../../../server/helpers'),
common = require('../../../server/lib/common'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
Promise = require('bluebird'),
markdownToMobiledoc = require('../../utils/fixtures/data-generator').markdownToMobiledoc,

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
hbs = require('../../../server/services/themes/engine'),
configUtils = require('../../utils/configUtils'),
path = require('path'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
Promise = require('bluebird'),
markdownToMobiledoc = require('../../utils/fixtures/data-generator').markdownToMobiledoc,

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
// Stuff we are testing

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
// Stuff we are testing
helpers = require('../../../server/helpers');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
Promise = require('bluebird'),
configUtils = require('../../utils/configUtils'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
helperUtils = require('../../../server/helpers/utils');
describe('Helpers Utils', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
common = require('../../../../server/lib/common');
describe('Errors', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
packageJSON = require('../../../../../server/lib/fs/package-json');
describe('lib/fs/package-json', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
tmp = require('tmp'),
fs = require('fs-extra'),
packageJSON = require('../../../../../server/lib/fs/package-json');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
tmp = require('tmp'),
join = require('path').join,
fs = require('fs-extra'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
path = require('path'),
fs = require('fs-extra'),
extract = require('extract-zip'),

View File

@ -1,4 +1,3 @@
// jshint unused: false
const should = require('should'),
rewire = require('rewire'),
testUtils = require('../../utils');

View File

@ -1,4 +1,3 @@
// jshint unused: false
var should = require('should'),
sinon = require('sinon'),
_ = require('lodash'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
nock = require('nock'),
configUtils = require('../../../utils/configUtils'),
gravatar = require('../../../../server/lib/image/gravatar');

View File

@ -1,4 +1,4 @@
const should = require('should'); // jshint ignore:line
const should = require('should');
const atom = require('../../../../../server/lib/mobiledoc/atoms/soft-return');
const SimpleDom = require('simple-dom');
const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);

View File

@ -1,4 +1,4 @@
const should = require('should'); // jshint ignore:line
const should = require('should');
const card = require('../../../../../server/lib/mobiledoc/cards/code');
const SimpleDom = require('simple-dom');
const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);

View File

@ -1,4 +1,4 @@
const should = require('should'); // jshint ignore:line
const should = require('should');
const card = require('../../../../../server/lib/mobiledoc/cards/hr');
const SimpleDom = require('simple-dom');
const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);

View File

@ -1,4 +1,4 @@
const should = require('should'); // jshint ignore:line
const should = require('should');
const card = require('../../../../../server/lib/mobiledoc/cards/html');
const SimpleDom = require('simple-dom');
const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);

View File

@ -1,4 +1,4 @@
const should = require('should'); // jshint ignore:line
const should = require('should');
const card = require('../../../../../server/lib/mobiledoc/cards/image');
const SimpleDom = require('simple-dom');
const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);

View File

@ -1,4 +1,4 @@
const should = require('should'); // jshint ignore:line
const should = require('should');
const card = require('../../../../../server/lib/mobiledoc/cards/markdown');
const SimpleDom = require('simple-dom');
const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);

View File

@ -1,4 +1,4 @@
const should = require('should'); // jshint ignore:line
const should = require('should');
const converter = require('../../../../../server/lib/mobiledoc/converters/mobiledoc-converter');
describe('Mobiledoc converter', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
Promise = require('bluebird'),

View File

@ -1,4 +1,4 @@
const should = require('should'), // jshint ignore:line
const should = require('should'),
security = require('../../../../server/lib/security');
describe('Lib: Security - Password', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
security = require('../../../../server/lib/security');
describe('Lib: Security - String', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
uuid = require('uuid'),
security = require('../../../../server/lib/security');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
rewire = require('rewire'),
common = require('../../../../server/lib/common'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
Promise = require('bluebird'),
rewire = require('rewire'),

View File

@ -1,6 +1,6 @@
/* eslint no-invalid-this:0 */
const should = require('should'), // jshint ignore:line
const should = require('should'),
sinon = require('sinon'),
_ = require('lodash'),
testUtils = require('../../utils'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
models = require('../../../server/models'),
testUtils = require('../../utils'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
ghostSdk = require('../../../server/public/ghost-sdk'),
configUtils = require('../../utils/configUtils'),
urlService = require('../../../server/services/url');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
EventEmitter = require('events').EventEmitter,
_ = require('lodash'),

View File

@ -101,7 +101,6 @@ describe('Apps', function () {
sandbox.stub(perms, 'getPackageContents').returns(Promise.reject(new Error('package.json file is malformed')));
perms.read().then(function (readPerms) {
/*jshint unused:false*/
done(new Error('should not resolve'));
}).catch(function (err) {
err.message.should.equal('package.json file is malformed');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
passport = require('passport'),
rewire = require('rewire'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
passport = require('passport'),
ghostPassport = require('../../../../server/services/auth/passport'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
_ = require('lodash'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
_ = require('lodash'),
rewire = require('rewire'),
channelUtils = require('../../../utils/channelUtils'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
mail = require('../../../../server/services/mail'),
sandbox = sinon.sandbox.create();

View File

@ -1,4 +1,4 @@
const should = require('should'), // jshint ignore:line
const should = require('should'),
sinon = require('sinon'),
testUtils = require('../../../utils'),
Promise = require('bluebird'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
testUtils = require('../../../utils'),
Promise = require('bluebird'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
parseContext = require('../../../../server/services/permissions/parse-context');
describe('Permissions', function () {

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
_ = require('lodash'),
common = require('../../../../server/lib/common'),
applyPublicRules = require('../../../../server/services/permissions/public');

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line,
var should = require('should'),
sinon = require('sinon'),
_ = require('lodash'),
nock = require('nock'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
config = require('../../../../server/config'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
themeConfig = require('../../../../server/services/themes/config'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
_ = require('lodash'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
fs = require('fs-extra'),
tmp = require('tmp'),

View File

@ -1,4 +1,4 @@
var should = require('should'), // jshint ignore:line
var should = require('should'),
sinon = require('sinon'),
hbs = require('../../../../server/services/themes/engine'),

View File

@ -1,4 +1,4 @@
// jshint unused: false
const _ = require('lodash');
const Promise = require('bluebird');
const should = require('should');

View File

@ -1,4 +1,4 @@
// jshint unused: false
const should = require('should');
const _ = require('lodash');
const sinon = require('sinon');

View File

@ -1,4 +1,4 @@
// jshint unused: false
const _ = require('lodash');
const Promise = require('bluebird');
const should = require('should');

View File

@ -1,4 +1,4 @@
// jshint unused: false
const _ = require('lodash');
const Promise = require('bluebird');
const should = require('should');

View File

@ -1,4 +1,4 @@
// jshint unused: false
const _ = require('lodash');
const Promise = require('bluebird');
const should = require('should');

Some files were not shown because too many files have changed in this diff Show More