chore: run lint and prettier on entire codebase

This commit is contained in:
Alessio Gravili
2024-07-11 15:27:01 -04:00
parent f8ab5a9f1e
commit 83fd4c6622
364 changed files with 2578 additions and 2658 deletions

View File

@@ -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) => {

View File

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

View File

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