upgrade to prettier 2 (#5051)

* arrowParens: avoid
* remove trailingComma setting
This commit is contained in:
chris48s
2020-05-05 21:07:43 +01:00
committed by GitHub
parent 1c736f2159
commit 13d75e0607
337 changed files with 1882 additions and 2707 deletions

View File

@@ -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({

View File

@@ -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'

View File

@@ -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

View File

@@ -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: [

View File

@@ -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')

View File

@@ -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: [] }),