From da1326a336cf91562035896f4a3a0bc4a73db4ef Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Tue, 12 Mar 2024 09:15:38 -0400 Subject: [PATCH] chore: eslint perf improvements for test suite, make use of cascading for all eslint configs to minimize duplicative rule --- .eslintrc.cjs | 2 + packages/create-payload-app/.eslintrc.cjs | 39 +---------- packages/db-mongodb/.eslintrc.cjs | 32 +-------- packages/db-postgres/.eslintrc.cjs | 38 +---------- packages/graphql/.eslintrc.cjs | 7 ++ packages/live-preview-react/.eslintrc.cjs | 32 +-------- packages/live-preview/.eslintrc.cjs | 32 +-------- packages/next/.eslintrc.cjs | 34 +--------- packages/payload/.eslintrc.cjs | 53 +-------------- packages/plugin-cloud-storage/.eslintrc.cjs | 31 +-------- packages/plugin-cloud/.eslintrc.cjs | 39 +---------- packages/plugin-form-builder/.eslintrc.cjs | 32 +-------- packages/plugin-nested-docs/.eslintrc.cjs | 38 +---------- packages/plugin-redirects/.eslintrc.cjs | 32 +-------- packages/plugin-search/.eslintrc.cjs | 32 +-------- packages/plugin-sentry/.eslintrc.cjs | 32 +-------- packages/plugin-seo/.eslintrc.cjs | 32 +-------- packages/plugin-stripe/.eslintrc.cjs | 32 +-------- packages/richtext-lexical/.eslintrc.cjs | 31 +-------- packages/richtext-slate/.eslintrc.cjs | 32 +-------- packages/translations/.eslintrc.cjs | 31 +-------- packages/ui/.eslintrc.cjs | 31 +-------- test/.eslintrc.cjs | 68 +------------------ test/_community/.eslintrc.cjs | 8 +++ test/_community/tsconfig.eslint.json | 13 ++++ test/_community/tsconfig.json | 2 +- test/access-control/.eslintrc.cjs | 8 +++ test/access-control/tsconfig.eslint.json | 13 ++++ test/admin/.eslintrc.cjs | 8 +++ test/admin/tsconfig.eslint.json | 13 ++++ test/array-update/.eslintrc.cjs | 8 +++ test/array-update/tsconfig.eslint.json | 13 ++++ test/auth/.eslintrc.cjs | 8 +++ test/auth/tsconfig.eslint.json | 13 ++++ test/collections-graphql/.eslintrc.cjs | 8 +++ test/collections-graphql/tsconfig.eslint.json | 13 ++++ test/collections-rest/.eslintrc.cjs | 8 +++ test/collections-rest/tsconfig.eslint.json | 13 ++++ test/config/.eslintrc.cjs | 8 +++ test/config/tsconfig.eslint.json | 13 ++++ test/create-payload-app/.eslintrc.cjs | 8 +++ test/create-payload-app/tsconfig.eslint.json | 13 ++++ test/custom-graphql/.eslintrc.cjs | 8 +++ test/custom-graphql/tsconfig.eslint.json | 13 ++++ test/database/.eslintrc.cjs | 8 +++ test/database/tsconfig.eslint.json | 13 ++++ test/dataloader/.eslintrc.cjs | 8 +++ test/dataloader/tsconfig.eslint.json | 13 ++++ test/endpoints/.eslintrc.cjs | 8 +++ test/endpoints/tsconfig.eslint.json | 13 ++++ test/field-error-states/.eslintrc.cjs | 8 +++ test/field-error-states/tsconfig.eslint.json | 13 ++++ test/field-error-states/tsconfig.json | 2 +- test/field-perf/.eslintrc.cjs | 8 +++ test/field-perf/tsconfig.eslint.json | 13 ++++ test/fields-relationship/.eslintrc.cjs | 8 +++ test/fields-relationship/tsconfig.eslint.json | 13 ++++ test/fields/.eslintrc.cjs | 8 +++ test/fields/tsconfig.eslint.json | 13 ++++ test/globals/.eslintrc.cjs | 8 +++ test/globals/tsconfig.eslint.json | 13 ++++ test/graphql-schema-gen/.eslintrc.cjs | 8 +++ test/graphql-schema-gen/tsconfig.eslint.json | 13 ++++ test/graphql-schema-gen/tsconfig.json | 2 +- test/hooks/.eslintrc.cjs | 8 +++ test/hooks/tsconfig.eslint.json | 13 ++++ test/live-preview/.eslintrc.cjs | 8 +++ test/live-preview/tsconfig.eslint.json | 13 ++++ test/localization-rtl/.eslintrc.cjs | 8 +++ test/localization-rtl/tsconfig.eslint.json | 13 ++++ test/localization/.eslintrc.cjs | 8 +++ test/localization/tsconfig.eslint.json | 13 ++++ test/migrations-cli/.eslintrc.cjs | 8 +++ test/migrations-cli/tsconfig.eslint.json | 13 ++++ test/nested-fields/.eslintrc.cjs | 8 +++ test/nested-fields/tsconfig.eslint.json | 13 ++++ test/plugin-cloud-storage/.eslintrc.cjs | 8 +++ .../plugin-cloud-storage/tsconfig.eslint.json | 13 ++++ test/plugin-cloud/.eslintrc.cjs | 8 +++ test/plugin-cloud/tsconfig.eslint.json | 13 ++++ test/plugin-form-builder/.eslintrc.cjs | 8 +++ test/plugin-form-builder/tsconfig.eslint.json | 13 ++++ test/plugin-nested-docs/.eslintrc.cjs | 8 +++ test/plugin-nested-docs/tsconfig.eslint.json | 13 ++++ test/plugin-redirects/.eslintrc.cjs | 8 +++ test/plugin-redirects/tsconfig.eslint.json | 13 ++++ test/plugin-search/.eslintrc.cjs | 8 +++ test/plugin-search/tsconfig.eslint.json | 13 ++++ test/plugin-sentry/.eslintrc.cjs | 8 +++ test/plugin-sentry/tsconfig.eslint.json | 13 ++++ test/plugin-seo/.eslintrc.cjs | 8 +++ test/plugin-seo/tsconfig.eslint.json | 13 ++++ test/plugin-stripe/.eslintrc.cjs | 8 +++ test/plugin-stripe/tsconfig.eslint.json | 13 ++++ test/plugins/.eslintrc.cjs | 8 +++ test/plugins/tsconfig.eslint.json | 13 ++++ test/refresh-permissions/.eslintrc.cjs | 8 +++ test/refresh-permissions/tsconfig.eslint.json | 13 ++++ test/relationships/.eslintrc.cjs | 8 +++ test/relationships/tsconfig.eslint.json | 13 ++++ test/tsconfig.eslint.json | 13 ++++ test/tsconfig.json | 9 +-- test/uploads/.eslintrc.cjs | 8 +++ test/uploads/tsconfig.eslint.json | 13 ++++ test/versions/.eslintrc.cjs | 8 +++ test/versions/tsconfig.eslint.json | 13 ++++ 106 files changed, 869 insertions(+), 740 deletions(-) create mode 100644 packages/graphql/.eslintrc.cjs create mode 100644 test/_community/.eslintrc.cjs create mode 100644 test/_community/tsconfig.eslint.json create mode 100644 test/access-control/.eslintrc.cjs create mode 100644 test/access-control/tsconfig.eslint.json create mode 100644 test/admin/.eslintrc.cjs create mode 100644 test/admin/tsconfig.eslint.json create mode 100644 test/array-update/.eslintrc.cjs create mode 100644 test/array-update/tsconfig.eslint.json create mode 100644 test/auth/.eslintrc.cjs create mode 100644 test/auth/tsconfig.eslint.json create mode 100644 test/collections-graphql/.eslintrc.cjs create mode 100644 test/collections-graphql/tsconfig.eslint.json create mode 100644 test/collections-rest/.eslintrc.cjs create mode 100644 test/collections-rest/tsconfig.eslint.json create mode 100644 test/config/.eslintrc.cjs create mode 100644 test/config/tsconfig.eslint.json create mode 100644 test/create-payload-app/.eslintrc.cjs create mode 100644 test/create-payload-app/tsconfig.eslint.json create mode 100644 test/custom-graphql/.eslintrc.cjs create mode 100644 test/custom-graphql/tsconfig.eslint.json create mode 100644 test/database/.eslintrc.cjs create mode 100644 test/database/tsconfig.eslint.json create mode 100644 test/dataloader/.eslintrc.cjs create mode 100644 test/dataloader/tsconfig.eslint.json create mode 100644 test/endpoints/.eslintrc.cjs create mode 100644 test/endpoints/tsconfig.eslint.json create mode 100644 test/field-error-states/.eslintrc.cjs create mode 100644 test/field-error-states/tsconfig.eslint.json create mode 100644 test/field-perf/.eslintrc.cjs create mode 100644 test/field-perf/tsconfig.eslint.json create mode 100644 test/fields-relationship/.eslintrc.cjs create mode 100644 test/fields-relationship/tsconfig.eslint.json create mode 100644 test/fields/.eslintrc.cjs create mode 100644 test/fields/tsconfig.eslint.json create mode 100644 test/globals/.eslintrc.cjs create mode 100644 test/globals/tsconfig.eslint.json create mode 100644 test/graphql-schema-gen/.eslintrc.cjs create mode 100644 test/graphql-schema-gen/tsconfig.eslint.json create mode 100644 test/hooks/.eslintrc.cjs create mode 100644 test/hooks/tsconfig.eslint.json create mode 100644 test/live-preview/.eslintrc.cjs create mode 100644 test/live-preview/tsconfig.eslint.json create mode 100644 test/localization-rtl/.eslintrc.cjs create mode 100644 test/localization-rtl/tsconfig.eslint.json create mode 100644 test/localization/.eslintrc.cjs create mode 100644 test/localization/tsconfig.eslint.json create mode 100644 test/migrations-cli/.eslintrc.cjs create mode 100644 test/migrations-cli/tsconfig.eslint.json create mode 100644 test/nested-fields/.eslintrc.cjs create mode 100644 test/nested-fields/tsconfig.eslint.json create mode 100644 test/plugin-cloud-storage/.eslintrc.cjs create mode 100644 test/plugin-cloud-storage/tsconfig.eslint.json create mode 100644 test/plugin-cloud/.eslintrc.cjs create mode 100644 test/plugin-cloud/tsconfig.eslint.json create mode 100644 test/plugin-form-builder/.eslintrc.cjs create mode 100644 test/plugin-form-builder/tsconfig.eslint.json create mode 100644 test/plugin-nested-docs/.eslintrc.cjs create mode 100644 test/plugin-nested-docs/tsconfig.eslint.json create mode 100644 test/plugin-redirects/.eslintrc.cjs create mode 100644 test/plugin-redirects/tsconfig.eslint.json create mode 100644 test/plugin-search/.eslintrc.cjs create mode 100644 test/plugin-search/tsconfig.eslint.json create mode 100644 test/plugin-sentry/.eslintrc.cjs create mode 100644 test/plugin-sentry/tsconfig.eslint.json create mode 100644 test/plugin-seo/.eslintrc.cjs create mode 100644 test/plugin-seo/tsconfig.eslint.json create mode 100644 test/plugin-stripe/.eslintrc.cjs create mode 100644 test/plugin-stripe/tsconfig.eslint.json create mode 100644 test/plugins/.eslintrc.cjs create mode 100644 test/plugins/tsconfig.eslint.json create mode 100644 test/refresh-permissions/.eslintrc.cjs create mode 100644 test/refresh-permissions/tsconfig.eslint.json create mode 100644 test/relationships/.eslintrc.cjs create mode 100644 test/relationships/tsconfig.eslint.json create mode 100644 test/tsconfig.eslint.json create mode 100644 test/uploads/.eslintrc.cjs create mode 100644 test/uploads/tsconfig.eslint.json create mode 100644 test/versions/.eslintrc.cjs create mode 100644 test/versions/tsconfig.eslint.json diff --git a/.eslintrc.cjs b/.eslintrc.cjs index ca3980b2f..426f86d31 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,5 +1,7 @@ +/** @type {import('eslint').Linter.Config} */ module.exports = { extends: ['@payloadcms'], + ignorePatterns: ['README.md', 'packages/**/*.spec.ts'], overrides: [ { files: ['scripts/**'], diff --git a/packages/create-payload-app/.eslintrc.cjs b/packages/create-payload-app/.eslintrc.cjs index 4367ff5ca..d6b3a476b 100644 --- a/packages/create-payload-app/.eslintrc.cjs +++ b/packages/create-payload-app/.eslintrc.cjs @@ -1,44 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - ignorePatterns: ['README.md', '**/*.spec.ts'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['**/*.ts', '**/*.tsx'], - rules: { - 'no-console': 'off', - }, - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/db-mongodb/.eslintrc.cjs b/packages/db-mongodb/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/db-mongodb/.eslintrc.cjs +++ b/packages/db-mongodb/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/db-postgres/.eslintrc.cjs b/packages/db-postgres/.eslintrc.cjs index f0c500c89..d6b3a476b 100644 --- a/packages/db-postgres/.eslintrc.cjs +++ b/packages/db-postgres/.eslintrc.cjs @@ -1,43 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['**/*.ts'], - rules: { - '@typescript-eslint/no-redundant-type-constituents': 'off', - }, - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/graphql/.eslintrc.cjs b/packages/graphql/.eslintrc.cjs new file mode 100644 index 000000000..d6b3a476b --- /dev/null +++ b/packages/graphql/.eslintrc.cjs @@ -0,0 +1,7 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + parserOptions: { + project: ['./tsconfig.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/packages/live-preview-react/.eslintrc.cjs b/packages/live-preview-react/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/live-preview-react/.eslintrc.cjs +++ b/packages/live-preview-react/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/live-preview/.eslintrc.cjs b/packages/live-preview/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/live-preview/.eslintrc.cjs +++ b/packages/live-preview/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/next/.eslintrc.cjs b/packages/next/.eslintrc.cjs index da693ccbe..76bf8eed9 100644 --- a/packages/next/.eslintrc.cjs +++ b/packages/next/.eslintrc.cjs @@ -1,41 +1,9 @@ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: [ - '@payloadcms', - // 'next' - ], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, settings: { next: { rootDir: '../../app/', diff --git a/packages/payload/.eslintrc.cjs b/packages/payload/.eslintrc.cjs index e28b97e4b..d6b3a476b 100644 --- a/packages/payload/.eslintrc.cjs +++ b/packages/payload/.eslintrc.cjs @@ -1,58 +1,7 @@ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - ignorePatterns: ['**/payload-types.ts'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: [ - '*.js', - '*.cjs', - 'playwright.config.ts', - 'playwright.bail.config.ts', - 'bin-cks.cjs', - 'bin-esm.mjs', - 'esm-loader.mjs', - 'esm-loader-playwright.mjs', - '*.json', - '*.md', - '*.yml', - '*.yaml', - ], - }, - { - files: ['*.e2e.ts'], - rules: { - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'jest/expect-expect': 'off', - }, - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-cloud-storage/.eslintrc.cjs b/packages/plugin-cloud-storage/.eslintrc.cjs index 3097f2cd3..d6b3a476b 100644 --- a/packages/plugin-cloud-storage/.eslintrc.cjs +++ b/packages/plugin-cloud-storage/.eslintrc.cjs @@ -1,36 +1,7 @@ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-cloud/.eslintrc.cjs b/packages/plugin-cloud/.eslintrc.cjs index ba056e9d3..d6b3a476b 100644 --- a/packages/plugin-cloud/.eslintrc.cjs +++ b/packages/plugin-cloud/.eslintrc.cjs @@ -1,44 +1,7 @@ - +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - { - files: ['**/*.spec.ts'], - rules: { - 'jest/prefer-strict-equal': 'off', - 'no-console': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-form-builder/.eslintrc.cjs b/packages/plugin-form-builder/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/plugin-form-builder/.eslintrc.cjs +++ b/packages/plugin-form-builder/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-nested-docs/.eslintrc.cjs b/packages/plugin-nested-docs/.eslintrc.cjs index ba40fda00..d6b3a476b 100644 --- a/packages/plugin-nested-docs/.eslintrc.cjs +++ b/packages/plugin-nested-docs/.eslintrc.cjs @@ -1,43 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - { - files: ['**/*.ts'], - rules: { - 'perfectionist/sort-objects': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-redirects/.eslintrc.cjs b/packages/plugin-redirects/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/plugin-redirects/.eslintrc.cjs +++ b/packages/plugin-redirects/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-search/.eslintrc.cjs b/packages/plugin-search/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/plugin-search/.eslintrc.cjs +++ b/packages/plugin-search/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-sentry/.eslintrc.cjs b/packages/plugin-sentry/.eslintrc.cjs index 99454400d..d6b3a476b 100644 --- a/packages/plugin-sentry/.eslintrc.cjs +++ b/packages/plugin-sentry/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('eslint').ESLint.ConfigData } */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-seo/.eslintrc.cjs b/packages/plugin-seo/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/plugin-seo/.eslintrc.cjs +++ b/packages/plugin-seo/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/plugin-stripe/.eslintrc.cjs b/packages/plugin-stripe/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/plugin-stripe/.eslintrc.cjs +++ b/packages/plugin-stripe/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/richtext-lexical/.eslintrc.cjs b/packages/richtext-lexical/.eslintrc.cjs index 3097f2cd3..d6b3a476b 100644 --- a/packages/richtext-lexical/.eslintrc.cjs +++ b/packages/richtext-lexical/.eslintrc.cjs @@ -1,36 +1,7 @@ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/richtext-slate/.eslintrc.cjs b/packages/richtext-slate/.eslintrc.cjs index c1b1716e7..d6b3a476b 100644 --- a/packages/richtext-slate/.eslintrc.cjs +++ b/packages/richtext-slate/.eslintrc.cjs @@ -1,37 +1,7 @@ -/** @type {import('prettier').Config} */ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/translations/.eslintrc.cjs b/packages/translations/.eslintrc.cjs index 3097f2cd3..d6b3a476b 100644 --- a/packages/translations/.eslintrc.cjs +++ b/packages/translations/.eslintrc.cjs @@ -1,36 +1,7 @@ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/packages/ui/.eslintrc.cjs b/packages/ui/.eslintrc.cjs index 3097f2cd3..d6b3a476b 100644 --- a/packages/ui/.eslintrc.cjs +++ b/packages/ui/.eslintrc.cjs @@ -1,36 +1,7 @@ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'], - }, - { - files: ['package.json', 'tsconfig.json'], - rules: { - 'perfectionist/sort-array-includes': 'off', - 'perfectionist/sort-astro-attributes': 'off', - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-enums': 'off', - 'perfectionist/sort-exports': 'off', - 'perfectionist/sort-imports': 'off', - 'perfectionist/sort-interfaces': 'off', - 'perfectionist/sort-jsx-props': 'off', - 'perfectionist/sort-keys': 'off', - 'perfectionist/sort-maps': 'off', - 'perfectionist/sort-named-exports': 'off', - 'perfectionist/sort-named-imports': 'off', - 'perfectionist/sort-object-types': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-svelte-attributes': 'off', - 'perfectionist/sort-union-types': 'off', - 'perfectionist/sort-vue-attributes': 'off', - }, - }, - ], parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/test/.eslintrc.cjs b/test/.eslintrc.cjs index 0cc52e7e6..39a96642f 100644 --- a/test/.eslintrc.cjs +++ b/test/.eslintrc.cjs @@ -1,70 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ['@payloadcms'], - ignorePatterns: ['**/payload-types.ts'], - overrides: [ - { - extends: ['plugin:@typescript-eslint/disable-type-checked'], - files: [ - '*.js', - '*.cjs', - 'playwright.config.ts', - 'playwright.bail.config.ts', - 'bin-cks.cjs', - 'bin-esm.mjs', - 'esm-loader.mjs', - 'esm-loader-playwright.mjs', - '*.json', - '*.md', - '*.yml', - '*.yaml', - ], - }, - { - files: ['**/*.ts'], - rules: { - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-use-before-define': 'off', - // turn the @typescript-eslint/unbound-method rule off *only* for test files. See https://typescript-eslint.io/rules/unbound-method/#when-not-to-use-it - '@typescript-eslint/unbound-method': 'off', - 'no-console': 'off', - 'perfectionist/sort-objects': 'off', - }, - }, - { - files: ['**/int.spec.ts'], - rules: { - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'jest/prefer-strict-equal': 'off', - }, - }, - { - extends: ['plugin:playwright/playwright-test'], - files: ['**/e2e.spec.ts'], - rules: { - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'jest/consistent-test-it': 'off', - 'jest/expect-expect': 'off', - 'jest/no-test-callback': 'off', - 'jest/prefer-strict-equal': 'off', - 'jest/require-top-level-describe': 'off', - 'jest-dom/prefer-to-have-attribute': 'off', - }, - }, - { - files: ['*.e2e.ts'], - rules: { - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'jest/expect-expect': 'off', - }, - }, - ], + ignorePatterns: ['payload-types.ts'], parserOptions: { - project: ['./tsconfig.json'], + project: ['./tsconfig.eslint.json'], tsconfigRootDir: __dirname, }, - root: true, } diff --git a/test/_community/.eslintrc.cjs b/test/_community/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/_community/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/_community/tsconfig.eslint.json b/test/_community/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/_community/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/_community/tsconfig.json b/test/_community/tsconfig.json index d851d72f5..ff2bf2ca4 100644 --- a/test/_community/tsconfig.json +++ b/test/_community/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.json", "compilerOptions": { "esModuleInterop": true, "paths": { diff --git a/test/access-control/.eslintrc.cjs b/test/access-control/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/access-control/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/access-control/tsconfig.eslint.json b/test/access-control/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/access-control/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/admin/.eslintrc.cjs b/test/admin/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/admin/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/admin/tsconfig.eslint.json b/test/admin/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/admin/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/array-update/.eslintrc.cjs b/test/array-update/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/array-update/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/array-update/tsconfig.eslint.json b/test/array-update/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/array-update/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/auth/.eslintrc.cjs b/test/auth/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/auth/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/auth/tsconfig.eslint.json b/test/auth/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/auth/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/collections-graphql/.eslintrc.cjs b/test/collections-graphql/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/collections-graphql/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/collections-graphql/tsconfig.eslint.json b/test/collections-graphql/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/collections-graphql/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/collections-rest/.eslintrc.cjs b/test/collections-rest/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/collections-rest/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/collections-rest/tsconfig.eslint.json b/test/collections-rest/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/collections-rest/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/config/.eslintrc.cjs b/test/config/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/config/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/config/tsconfig.eslint.json b/test/config/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/config/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/create-payload-app/.eslintrc.cjs b/test/create-payload-app/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/create-payload-app/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/create-payload-app/tsconfig.eslint.json b/test/create-payload-app/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/create-payload-app/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/custom-graphql/.eslintrc.cjs b/test/custom-graphql/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/custom-graphql/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/custom-graphql/tsconfig.eslint.json b/test/custom-graphql/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/custom-graphql/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/database/.eslintrc.cjs b/test/database/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/database/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/database/tsconfig.eslint.json b/test/database/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/database/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/dataloader/.eslintrc.cjs b/test/dataloader/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/dataloader/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/dataloader/tsconfig.eslint.json b/test/dataloader/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/dataloader/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/endpoints/.eslintrc.cjs b/test/endpoints/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/endpoints/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/endpoints/tsconfig.eslint.json b/test/endpoints/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/endpoints/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/field-error-states/.eslintrc.cjs b/test/field-error-states/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/field-error-states/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/field-error-states/tsconfig.eslint.json b/test/field-error-states/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/field-error-states/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/field-error-states/tsconfig.json b/test/field-error-states/tsconfig.json index 244de73b1..a5d1c4912 100644 --- a/test/field-error-states/tsconfig.json +++ b/test/field-error-states/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.json", "compilerOptions": { "paths": { "payload/generated-types": ["./payload-types.ts"] diff --git a/test/field-perf/.eslintrc.cjs b/test/field-perf/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/field-perf/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/field-perf/tsconfig.eslint.json b/test/field-perf/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/field-perf/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/fields-relationship/.eslintrc.cjs b/test/fields-relationship/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/fields-relationship/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/fields-relationship/tsconfig.eslint.json b/test/fields-relationship/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/fields-relationship/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/fields/.eslintrc.cjs b/test/fields/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/fields/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/fields/tsconfig.eslint.json b/test/fields/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/fields/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/globals/.eslintrc.cjs b/test/globals/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/globals/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/globals/tsconfig.eslint.json b/test/globals/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/globals/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/graphql-schema-gen/.eslintrc.cjs b/test/graphql-schema-gen/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/graphql-schema-gen/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/graphql-schema-gen/tsconfig.eslint.json b/test/graphql-schema-gen/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/graphql-schema-gen/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/graphql-schema-gen/tsconfig.json b/test/graphql-schema-gen/tsconfig.json index d851d72f5..ff2bf2ca4 100644 --- a/test/graphql-schema-gen/tsconfig.json +++ b/test/graphql-schema-gen/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig.json", "compilerOptions": { "esModuleInterop": true, "paths": { diff --git a/test/hooks/.eslintrc.cjs b/test/hooks/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/hooks/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/hooks/tsconfig.eslint.json b/test/hooks/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/hooks/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/live-preview/.eslintrc.cjs b/test/live-preview/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/live-preview/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/live-preview/tsconfig.eslint.json b/test/live-preview/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/live-preview/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/localization-rtl/.eslintrc.cjs b/test/localization-rtl/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/localization-rtl/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/localization-rtl/tsconfig.eslint.json b/test/localization-rtl/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/localization-rtl/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/localization/.eslintrc.cjs b/test/localization/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/localization/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/localization/tsconfig.eslint.json b/test/localization/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/localization/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/migrations-cli/.eslintrc.cjs b/test/migrations-cli/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/migrations-cli/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/migrations-cli/tsconfig.eslint.json b/test/migrations-cli/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/migrations-cli/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/nested-fields/.eslintrc.cjs b/test/nested-fields/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/nested-fields/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/nested-fields/tsconfig.eslint.json b/test/nested-fields/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/nested-fields/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-cloud-storage/.eslintrc.cjs b/test/plugin-cloud-storage/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-cloud-storage/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-cloud-storage/tsconfig.eslint.json b/test/plugin-cloud-storage/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-cloud-storage/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-cloud/.eslintrc.cjs b/test/plugin-cloud/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-cloud/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-cloud/tsconfig.eslint.json b/test/plugin-cloud/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-cloud/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-form-builder/.eslintrc.cjs b/test/plugin-form-builder/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-form-builder/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-form-builder/tsconfig.eslint.json b/test/plugin-form-builder/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-form-builder/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-nested-docs/.eslintrc.cjs b/test/plugin-nested-docs/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-nested-docs/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-nested-docs/tsconfig.eslint.json b/test/plugin-nested-docs/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-nested-docs/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-redirects/.eslintrc.cjs b/test/plugin-redirects/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-redirects/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-redirects/tsconfig.eslint.json b/test/plugin-redirects/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-redirects/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-search/.eslintrc.cjs b/test/plugin-search/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-search/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-search/tsconfig.eslint.json b/test/plugin-search/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-search/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-sentry/.eslintrc.cjs b/test/plugin-sentry/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-sentry/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-sentry/tsconfig.eslint.json b/test/plugin-sentry/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-sentry/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-seo/.eslintrc.cjs b/test/plugin-seo/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-seo/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-seo/tsconfig.eslint.json b/test/plugin-seo/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-seo/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugin-stripe/.eslintrc.cjs b/test/plugin-stripe/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugin-stripe/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugin-stripe/tsconfig.eslint.json b/test/plugin-stripe/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugin-stripe/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/plugins/.eslintrc.cjs b/test/plugins/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/plugins/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/plugins/tsconfig.eslint.json b/test/plugins/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/plugins/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/refresh-permissions/.eslintrc.cjs b/test/refresh-permissions/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/refresh-permissions/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/refresh-permissions/tsconfig.eslint.json b/test/refresh-permissions/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/refresh-permissions/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/relationships/.eslintrc.cjs b/test/relationships/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/relationships/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/relationships/tsconfig.eslint.json b/test/relationships/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/relationships/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/tsconfig.eslint.json b/test/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/tsconfig.json b/test/tsconfig.json index bf1da8e14..ff32afa99 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -8,13 +8,8 @@ }, "exclude": ["dist", "build", "node_modules", ".eslintrc.js"], "include": [ - "src/**/*.ts", - "src/**/*.tsx", - "src/**/*.d.ts", - "src/**/*.json", - "**/*.ts", - "**/*.tsx", - "test/**/*.tsx", + "./**/*.ts", + "./**/*.tsx", "../packages/**/src/**/*.ts", "../packages/**/src/**/*.tsx"], "plugins": [ diff --git a/test/uploads/.eslintrc.cjs b/test/uploads/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/uploads/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/uploads/tsconfig.eslint.json b/test/uploads/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/uploads/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +} diff --git a/test/versions/.eslintrc.cjs b/test/versions/.eslintrc.cjs new file mode 100644 index 000000000..39a96642f --- /dev/null +++ b/test/versions/.eslintrc.cjs @@ -0,0 +1,8 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + ignorePatterns: ['payload-types.ts'], + parserOptions: { + project: ['./tsconfig.eslint.json'], + tsconfigRootDir: __dirname, + }, +} diff --git a/test/versions/tsconfig.eslint.json b/test/versions/tsconfig.eslint.json new file mode 100644 index 000000000..a98a3a964 --- /dev/null +++ b/test/versions/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + // extend your base config to share compilerOptions, etc + //"extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true, + }, + "include": [ + // whatever paths you intend to lint + "./**/*.ts", + "./**/*.tsx" + ], +}