Skip to content

Commit

Permalink
style: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbrntt committed Mar 21, 2024
1 parent 28fdee1 commit 963eeab
Show file tree
Hide file tree
Showing 28 changed files with 747 additions and 680 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
plugins: ['standard', 'prettier', 'react'],
rules: {
'react/prop-types': 'warn',
'object-shorthand': 'off',
},
settings: {
react: {
Expand All @@ -12,7 +13,6 @@ module.exports = {
overrides: [
{
files: ['*.test.js', '__mocks__/**'],

},
],
env: {
Expand Down
4 changes: 2 additions & 2 deletions __mocks__/fusion:content-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module.exports = (options, ...moreSchemas) => {
const args = !(options instanceof Object)
? { schemas: [options].concat(...moreSchemas) }
: Array.isArray(options)
? { schemas: options.concat(...moreSchemas) }
: options
? { schemas: options.concat(...moreSchemas) }
: options

return taggablePrimitive(instance, 'contentConfig', args)
}
16 changes: 8 additions & 8 deletions __mocks__/fusion:prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ function _stringify(value) {
return Array.isArray(value)
? `[${value.map(_stringify).join(',')}]`
: value instanceof Object
? `{${Object.keys(value)
.filter(ignorePropTypeMethods)
.filter(exists)
.map((key) => {
return `"${key}":${_stringify(value[key])}`
})
.join(',')}}`
: JSON.stringify(value)
? `{${Object.keys(value)
.filter(ignorePropTypeMethods)
.filter(exists)
.map((key) => {
return `"${key}":${_stringify(value[key])}`
})
.join(',')}}`
: JSON.stringify(value)
}
FusionPropTypes.stringify = function stringify(value, replacer, space) {
const str = _stringify(value)
Expand Down
14 changes: 8 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module.exports = {
presets: [ [
'@babel/preset-env',
{
targets: { esmodules: false, node: "current" }
},
presets: [
[
'@babel/preset-env',
{
targets: { esmodules: false, node: 'current' },
},
],
'@babel/preset-react',
],
'@babel/preset-react'],
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from '@wpmedia/feeds-content-source-utils'
import { signImagesInANSObject, resizerFetch } from '@wpmedia/feeds-resizer'


const fetch = (key, { cachedCall }) => {
const requestUri = `${CONTENT_BASE}/content/v4/search/published`
const ansFields = [
Expand Down Expand Up @@ -218,7 +217,7 @@ const fetch = (key, { cachedCall }) => {
RESIZER_TOKEN_VERSION,
)(result)
})
.then(({data, ...rest}) => ({ ...rest, data: transform(data, key), }))
.then(({ data, ...rest }) => ({ ...rest, data: transform(data, key) }))
.then(({ data }) => data)
.catch((error) => console.log('== error ==', error))

Expand Down
Loading

0 comments on commit 963eeab

Please sign in to comment.