chore: run lint and prettier on entire codebase
This commit is contained in:
@@ -68,6 +68,8 @@ export default buildConfigWithDefaults({
|
||||
},
|
||||
},
|
||||
{
|
||||
slug: 'shops',
|
||||
access: { read: () => true },
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
@@ -76,14 +78,14 @@ export default buildConfigWithDefaults({
|
||||
{
|
||||
name: 'items',
|
||||
type: 'relationship',
|
||||
relationTo: 'items',
|
||||
hasMany: true,
|
||||
relationTo: 'items',
|
||||
},
|
||||
],
|
||||
slug: 'shops',
|
||||
access: { read: () => true },
|
||||
},
|
||||
{
|
||||
slug: 'items',
|
||||
access: { read: () => true },
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
@@ -92,22 +94,20 @@ export default buildConfigWithDefaults({
|
||||
{
|
||||
name: 'itemTags',
|
||||
type: 'relationship',
|
||||
relationTo: 'itemTags',
|
||||
hasMany: true,
|
||||
relationTo: 'itemTags',
|
||||
},
|
||||
],
|
||||
slug: 'items',
|
||||
access: { read: () => true },
|
||||
},
|
||||
{
|
||||
slug: 'itemTags',
|
||||
access: { read: () => true },
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
slug: 'itemTags',
|
||||
access: { read: () => true },
|
||||
},
|
||||
],
|
||||
onInit: async (payload) => {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { rootEslintConfig, rootParserOptions } from '../../eslint.config.js'
|
||||
import { rootParserOptions } from '../../eslint.config.js'
|
||||
import testEslintConfig from '../eslint.config.js'
|
||||
|
||||
/** @typedef {import('eslint').Linter.FlatConfig} */
|
||||
let FlatConfig
|
||||
|
||||
/** @type {FlatConfig[]} */
|
||||
export const index = [
|
||||
...rootEslintConfig,
|
||||
...testEslintConfig,
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
|
||||
@@ -65,8 +65,8 @@ describe('dataloader', () => {
|
||||
const normalizedResponse = JSON.parse(JSON.stringify(data))
|
||||
|
||||
expect(normalizedResponse).toStrictEqual({
|
||||
Shops: { docs: [{ name: 'shop1', items: [{ name: 'item1' }] }] },
|
||||
Items: { docs: [{ name: 'item1', itemTags: [{ name: 'tag1' }] }] },
|
||||
Shops: { docs: [{ name: 'shop1', items: [{ name: 'item1' }] }] },
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user