Prettier: Upgrade to 2 (#30387)

* Updated package json but not updated source files

* Update eslint plugin

* updated files
This commit is contained in:
Torkel Ödegaard
2021-01-20 07:59:48 +01:00
committed by GitHub
parent f27450ed94
commit 1d689888b0
1069 changed files with 4370 additions and 5260 deletions
@@ -5,7 +5,7 @@ const {
const { resolve } = require('path');
// @todo use https://github.com/bahmutov/cypress-extends when possible
module.exports = async baseConfig => {
module.exports = async (baseConfig) => {
// From CLI
const {
env: { CWD, UPDATE_SCREENSHOTS },
@@ -29,7 +29,7 @@ module.exports = async baseConfig => {
const customProjectConfig = await readFile(`${CWD}/cypress.json`, 'utf8')
.then(JSON.parse)
.then(config => {
.then((config) => {
const pathKeys = [
'fileServerFolder',
'fixturesFolder',
@@ -52,7 +52,7 @@ module.exports = async baseConfig => {
})
);
})
.catch(error => {
.catch((error) => {
if (error.code === 'ENOENT') {
// File is optional
return {};
@@ -5,10 +5,10 @@ const {
} = require('fs');
const { resolve: resolvePath } = require('path');
const readProvision = filePath => readFile(filePath, 'utf8').then(contents => parseYml(contents));
const readProvision = (filePath) => readFile(filePath, 'utf8').then((contents) => parseYml(contents));
const readProvisions = filePaths => Promise.all(filePaths.map(readProvision));
const readProvisions = (filePaths) => Promise.all(filePaths.map(readProvision));
// Paths are relative to <project-root>/provisioning
module.exports = ({ CWD, filePaths }) =>
readProvisions(filePaths.map(filePath => resolvePath(CWD, 'provisioning', filePath)));
readProvisions(filePaths.map((filePath) => resolvePath(CWD, 'provisioning', filePath)));
@@ -9,7 +9,7 @@ const webpackOptions = {
module: {
rules: [
{
include: modulePath => {
include: (modulePath) => {
if (!anyNodeModules.test(modulePath)) {
// Is a file within the project
return true;