upgrade to prettier 2 (#5051)
* arrowParens: avoid * remove trailingComma setting
This commit is contained in:
@@ -29,9 +29,7 @@ const packageDataSchema = Joi.object({
|
||||
// https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package
|
||||
// > Note that the "typings" field is synonymous with "types"
|
||||
typings: Joi.string(),
|
||||
files: Joi.array()
|
||||
.items(Joi.string())
|
||||
.default([]),
|
||||
files: Joi.array().items(Joi.string()).default([]),
|
||||
}).required()
|
||||
|
||||
const queryParamSchema = Joi.object({
|
||||
|
||||
@@ -6,9 +6,9 @@ const { cleanUpNockAfterEach, defaultContext } = require('../test-helpers')
|
||||
// use NPM Version as an example implementation of NpmBase for this test
|
||||
const NpmVersion = require('./npm-version.service')
|
||||
|
||||
describe('npm', function() {
|
||||
describe('auth', function() {
|
||||
it('sends the auth information as configured', async function() {
|
||||
describe('npm', function () {
|
||||
describe('auth', function () {
|
||||
it('sends the auth information as configured', async function () {
|
||||
cleanUpNockAfterEach()
|
||||
|
||||
const token = 'abc123'
|
||||
|
||||
@@ -33,9 +33,7 @@ const intervalMap = {
|
||||
query: 'range/1000-01-01:3000-01-01',
|
||||
// https://github.com/npm/registry/blob/master/docs/download-counts.md#output-1
|
||||
schema: Joi.object({
|
||||
downloads: Joi.array()
|
||||
.items(pointResponseSchema)
|
||||
.required(),
|
||||
downloads: Joi.array().items(pointResponseSchema).required(),
|
||||
}).required(),
|
||||
transform: json =>
|
||||
json.downloads
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
const { test, given } = require('sazerac')
|
||||
const NpmDownloads = require('./npm-downloads.service')
|
||||
|
||||
describe('NpmDownloads', function() {
|
||||
describe('NpmDownloads', function () {
|
||||
test(NpmDownloads._intervalMap.dt.transform, () => {
|
||||
given({
|
||||
downloads: [
|
||||
|
||||
@@ -3,25 +3,21 @@
|
||||
const { isMetricOverTimePeriod, isMetric } = require('../test-validators')
|
||||
const t = (module.exports = require('../tester').createServiceTester())
|
||||
|
||||
t.create('weekly downloads of left-pad')
|
||||
.get('/dw/left-pad.json')
|
||||
.expectBadge({
|
||||
label: 'downloads',
|
||||
message: isMetricOverTimePeriod,
|
||||
color: 'brightgreen',
|
||||
})
|
||||
t.create('weekly downloads of left-pad').get('/dw/left-pad.json').expectBadge({
|
||||
label: 'downloads',
|
||||
message: isMetricOverTimePeriod,
|
||||
color: 'brightgreen',
|
||||
})
|
||||
|
||||
t.create('weekly downloads of @cycle/core')
|
||||
.get('/dw/@cycle/core.json')
|
||||
.expectBadge({ label: 'downloads', message: isMetricOverTimePeriod })
|
||||
|
||||
t.create('total downloads of left-pad')
|
||||
.get('/dt/left-pad.json')
|
||||
.expectBadge({
|
||||
label: 'downloads',
|
||||
message: isMetric,
|
||||
color: 'brightgreen',
|
||||
})
|
||||
t.create('total downloads of left-pad').get('/dt/left-pad.json').expectBadge({
|
||||
label: 'downloads',
|
||||
message: isMetric,
|
||||
color: 'brightgreen',
|
||||
})
|
||||
|
||||
t.create('total downloads of @cycle/core')
|
||||
.get('/dt/@cycle/core.json')
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
const { test, given, forCases } = require('sazerac')
|
||||
const NpmTypeDefinitions = require('./npm-type-definitions.service')
|
||||
|
||||
describe('NPM type definitions badge', function() {
|
||||
describe('NPM type definitions badge', function () {
|
||||
test(NpmTypeDefinitions.transform, () => {
|
||||
forCases([
|
||||
given({ devDependencies: { typescript: '^2.4.7' }, files: [] }),
|
||||
|
||||
Reference in New Issue
Block a user