diff --git a/examples/auth/cms/.eslintrc.js b/examples/auth/cms/.eslintrc.js index a96e2fe286..b69f00e730 100644 --- a/examples/auth/cms/.eslintrc.js +++ b/examples/auth/cms/.eslintrc.js @@ -1,4 +1,4 @@ module.exports = { root: true, - extends: ['./eslint-config'], + extends: ['@payloadcms'], } diff --git a/examples/auth/cms/eslint-config/index.js b/examples/auth/cms/eslint-config/index.js deleted file mode 100644 index 600ef87602..0000000000 --- a/examples/auth/cms/eslint-config/index.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - extends: [ - 'airbnb-base', - require.resolve('./rules/style.js'), - require.resolve('./rules/import.js'), - require.resolve('./rules/typescript.js'), - require.resolve('./rules/prettier.js'), - ], - env: { - es6: true, - browser: true, - node: true, - }, -} diff --git a/examples/auth/cms/eslint-config/rules/import.js b/examples/auth/cms/eslint-config/rules/import.js deleted file mode 100644 index 802555aff1..0000000000 --- a/examples/auth/cms/eslint-config/rules/import.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = { - env: { - es6: true, - }, - extends: ['plugin:import/errors', 'plugin:import/warnings', 'plugin:import/typescript'], - plugins: ['import'], - settings: { - 'import/parsers': { - '@typescript-eslint/parser': ['.ts'], - }, - }, - rules: { - 'import/no-unresolved': ['error', { commonjs: true, caseSensitive: true }], - 'import/no-default-export': 'off', - 'import/prefer-default-export': 'off', - 'import/extensions': [ - 'error', - 'ignorePackages', - { - ts: 'never', - tsx: 'never', - js: 'never', - jsx: 'never', - }, - ], - 'import/no-extraneous-dependencies': 'off', - 'import/named': 'error', - 'import/no-relative-packages': 'warn', - 'import/no-import-module-exports': 'warn', - 'import/no-cycle': 'warn', - }, -} diff --git a/examples/auth/cms/eslint-config/rules/prettier.js b/examples/auth/cms/eslint-config/rules/prettier.js deleted file mode 100644 index 373ce0e610..0000000000 --- a/examples/auth/cms/eslint-config/rules/prettier.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - plugins: ['prettier'], - extends: ['plugin:prettier/recommended'], - rules: { - 'prettier/prettier': 'error', - }, -} diff --git a/examples/auth/cms/eslint-config/rules/style.js b/examples/auth/cms/eslint-config/rules/style.js deleted file mode 100644 index 7584f503b9..0000000000 --- a/examples/auth/cms/eslint-config/rules/style.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - rules: { - 'prefer-named-exports': 'off', - 'prefer-destructuring': 'off', - 'comma-dangle': ['error', 'always-multiline'], - 'class-methods-use-this': 'off', - 'function-paren-newline': ['error', 'consistent'], - 'eol-last': ['error', 'always'], - 'no-restricted-syntax': 'off', - 'no-await-in-loop': 'off', - 'no-console': 'error', - }, -} diff --git a/examples/auth/cms/eslint-config/rules/typescript.js b/examples/auth/cms/eslint-config/rules/typescript.js deleted file mode 100644 index a92068284e..0000000000 --- a/examples/auth/cms/eslint-config/rules/typescript.js +++ /dev/null @@ -1,322 +0,0 @@ -module.exports = { - plugins: ['@typescript-eslint'], - overrides: [ - { - files: ['**/**.ts', '**/**.d.ts'], - rules: { - 'no-undef': 'off', - camelcase: 'off', - '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], - '@typescript-eslint/await-thenable': 'off', - '@typescript-eslint/consistent-type-assertions': [ - 'error', - { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }, - ], - '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], - '@typescript-eslint/consistent-type-imports': 'warn', - '@typescript-eslint/explicit-function-return-type': [ - 'error', - { - allowExpressions: true, - allowTypedFunctionExpressions: true, - allowHigherOrderFunctions: true, - allowConciseArrowFunctionExpressionsStartingWithVoid: false, - }, - ], - '@typescript-eslint/explicit-member-accessibility': [ - 'error', - { accessibility: 'no-public' }, - ], - '@typescript-eslint/member-delimiter-style': [ - 'error', - { - multiline: { - delimiter: 'none', - requireLast: true, - }, - singleline: { - delimiter: 'semi', - requireLast: false, - }, - }, - ], - '@typescript-eslint/method-signature-style': 'off', - '@typescript-eslint/naming-convention': [ - 'off', - { - selector: 'default', - format: ['camelCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: 'variable', - format: ['camelCase', 'UPPER_CASE'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: 'typeParameter', - format: ['PascalCase'], - prefix: ['T', 'U'], - }, - { - selector: 'variable', - types: ['boolean'], - format: ['PascalCase'], - prefix: ['is', 'should', 'has', 'can', 'did', 'will'], - }, - { - selector: 'interface', - format: ['PascalCase'], - custom: { - regex: '^I[A-Z]', - match: false, - }, - }, - { - selector: [ - 'function', - 'parameter', - 'property', - 'parameterProperty', - 'method', - 'accessor', - ], - format: ['camelCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: ['class', 'interface', 'typeAlias', 'enum', 'typeParameter'], - format: ['PascalCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - ], - '@typescript-eslint/no-base-to-string': 'off', - '@typescript-eslint/no-confusing-non-null-assertion': 'error', - '@typescript-eslint/no-dynamic-delete': 'error', - '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/no-explicit-any': [ - 'warn', - { - ignoreRestArgs: true, - // enable later - fixToUnknown: false, - }, - ], - '@typescript-eslint/no-extra-non-null-assertion': 'error', - '@typescript-eslint/no-extraneous-class': [ - 'error', - { - allowConstructorOnly: false, - allowEmpty: false, - allowStaticOnly: false, - allowWithDecorator: false, - }, - ], - '@typescript-eslint/no-floating-promises': 'off', - '@typescript-eslint/no-for-in-array': 'off', - '@typescript-eslint/no-implicit-any-catch': [ - 'error', - { - allowExplicitAny: false, - }, - ], - '@typescript-eslint/no-implied-eval': 'off', - '@typescript-eslint/no-inferrable-types': [ - 'error', - { - ignoreParameters: false, - ignoreProperties: false, - }, - ], - '@typescript-eslint/no-invalid-void-type': [ - 'off', - { - allowInGenericTypeArguments: true, - }, - ], - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-misused-promises': 'off', - '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', - '@typescript-eslint/no-non-null-assertion': 'warn', - '@typescript-eslint/no-parameter-properties': 'error', - '@typescript-eslint/no-require-imports': 'error', - '@typescript-eslint/no-this-alias': 'error', - '@typescript-eslint/no-throw-literal': 'off', - '@typescript-eslint/no-type-alias': [ - 'off', - { - allowAliases: 'always', - allowCallbacks: 'always', - allowConditionalTypes: 'always', - allowConstructors: 'never', - allowLiterals: 'in-unions-and-intersections', - allowMappedTypes: 'always', - allowTupleTypes: 'always', - }, - ], - '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', - '@typescript-eslint/no-unnecessary-condition': 'off', - '@typescript-eslint/no-unnecessary-qualifier': 'off', - '@typescript-eslint/no-unnecessary-type-arguments': 'off', - '@typescript-eslint/no-unnecessary-type-assertion': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/prefer-as-const': 'error', - '@typescript-eslint/prefer-enum-initializers': 'off', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-includes': 'off', - '@typescript-eslint/prefer-literal-enum-member': 'error', - '@typescript-eslint/prefer-namespace-keyword': 'off', - '@typescript-eslint/prefer-nullish-coalescing': 'off', - '@typescript-eslint/prefer-optional-chain': 'warn', - '@typescript-eslint/prefer-readonly': 'off', - '@typescript-eslint/prefer-readonly-parameter-types': 'off', - '@typescript-eslint/prefer-reduce-type-parameter': 'off', - '@typescript-eslint/prefer-regexp-exec': 'off', - '@typescript-eslint/prefer-string-starts-ends-with': 'off', - '@typescript-eslint/prefer-ts-expect-error': 'warn', - '@typescript-eslint/promise-function-async': 'off', - '@typescript-eslint/require-array-sort-compare': 'off', - '@typescript-eslint/restrict-plus-operands': 'off', - '@typescript-eslint/restrict-template-expressions': 'off', - '@typescript-eslint/strict-boolean-expressions': 'off', - '@typescript-eslint/switch-exhaustiveness-check': 'off', - '@typescript-eslint/triple-slash-reference': 'error', - '@typescript-eslint/type-annotation-spacing': [ - 'error', - { - before: false, - after: true, - overrides: { - arrow: { - before: true, - after: true, - }, - }, - }, - ], - '@typescript-eslint/typedef': [ - 'error', - { - arrayDestructuring: false, - arrowParameter: false, - memberVariableDeclaration: false, - objectDestructuring: false, - parameter: false, - propertyDeclaration: true, - variableDeclaration: false, - variableDeclarationIgnoreFunction: false, - }, - ], - '@typescript-eslint/unbound-method': 'off', - '@typescript-eslint/unified-signatures': 'off', - 'brace-style': 'off', - '@typescript-eslint/brace-style': 'error', - 'comma-spacing': 'off', - '@typescript-eslint/comma-spacing': 'error', - 'default-param-last': 'off', - '@typescript-eslint/default-param-last': 'error', - 'dot-notation': 'error', - '@typescript-eslint/dot-notation': 'off', - 'func-call-spacing': 'off', - '@typescript-eslint/func-call-spacing': 'error', - indent: 'off', - '@typescript-eslint/indent': 'off', - '@typescript-eslint/init-declarations': 'off', - 'keyword-spacing': 'off', - '@typescript-eslint/keyword-spacing': 'error', - 'lines-between-class-members': 'off', - '@typescript-eslint/lines-between-class-members': [ - 'error', - 'always', - { - exceptAfterSingleLine: true, - exceptAfterOverload: true, - }, - ], - 'no-array-constructor': 'off', - '@typescript-eslint/no-array-constructor': 'error', - 'no-dupe-class-members': 'off', - '@typescript-eslint/no-dupe-class-members': 'error', - 'no-extra-parens': 'off', - '@typescript-eslint/no-extra-parens': 'off', - 'no-extra-semi': 'off', - '@typescript-eslint/no-extra-semi': 'error', - 'no-invalid-this': 'off', - '@typescript-eslint/no-invalid-this': 'error', - 'no-loss-of-precision': 'off', - '@typescript-eslint/no-loss-of-precision': 'error', - 'no-magic-numbers': 'off', - '@typescript-eslint/no-magic-numbers': [ - 'off', - { - ignoreArrayIndexes: true, - ignoreDefaultValues: true, - enforceConst: true, - ignoreEnums: true, - ignoreNumericLiteralTypes: true, - ignoreReadonlyClassProperties: true, - }, - ], - 'no-redeclare': 'off', - '@typescript-eslint/no-redeclare': [ - 'error', - { - builtinGlobals: true, - }, - ], - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': [ - 'error', - { - ignoreTypeValueShadow: false, - }, - ], - 'no-unused-expressions': 'off', - '@typescript-eslint/no-unused-expressions': 'error', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - ignoreRestSiblings: true, - }, - ], - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'error', - quotes: 'off', - '@typescript-eslint/quotes': [ - 'error', - 'single', - { - avoidEscape: true, - allowTemplateLiterals: true, - }, - ], - '@typescript-eslint/require-await': 'off', - '@typescript-eslint/return-await': 'off', - semi: 'off', - '@typescript-eslint/semi': ['error', 'never'], - 'space-before-function-paren': 'off', - '@typescript-eslint/space-before-function-paren': [ - 'error', - { - anonymous: 'never', - named: 'never', - asyncArrow: 'always', - }, - ], - }, - }, - ], -} diff --git a/examples/auth/cms/package.json b/examples/auth/cms/package.json index eb0a23059e..eff3be653c 100644 --- a/examples/auth/cms/package.json +++ b/examples/auth/cms/package.json @@ -22,16 +22,21 @@ "payload": "^1.6.4" }, "devDependencies": { + "@types/node": "18.11.3", + "@types/react": "18.0.21", "@types/express": "^4.17.9", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", + "@payloadcms/eslint-config": "^0.0.1", "copyfiles": "^2.4.1", "cross-env": "^7.0.3", "eslint": "^8.19.0", - "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^8.5.0", + "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-import": "2.25.4", "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-simple-import-sort": "^10.0.0", "nodemon": "^2.0.6", "prettier": "^2.7.1", "ts-node": "^9.1.1", diff --git a/examples/auth/cms/src/collections/Users.ts b/examples/auth/cms/src/collections/Users.ts index 7e7be517f6..7006e42cb7 100644 --- a/examples/auth/cms/src/collections/Users.ts +++ b/examples/auth/cms/src/collections/Users.ts @@ -1,6 +1,7 @@ import type { CollectionConfig } from 'payload/types' -import adminsAndUser from './access/adminsAndUser' + import { admins } from './access/admins' +import adminsAndUser from './access/adminsAndUser' import { anyone } from './access/anyone' import { checkRole } from './access/checkRole' import { loginAfterCreate } from './hooks/loginAfterCreate' diff --git a/examples/auth/cms/src/collections/access/admins.ts b/examples/auth/cms/src/collections/access/admins.ts index 172af8fedb..a2b45d7db1 100644 --- a/examples/auth/cms/src/collections/access/admins.ts +++ b/examples/auth/cms/src/collections/access/admins.ts @@ -1,4 +1,5 @@ import type { Access } from 'payload/config' + import { checkRole } from './checkRole' export const admins: Access = ({ req: { user } }) => checkRole(['admin'], user) diff --git a/examples/auth/cms/src/collections/access/adminsAndUser.ts b/examples/auth/cms/src/collections/access/adminsAndUser.ts index 1d14fe084d..75f4aec30f 100644 --- a/examples/auth/cms/src/collections/access/adminsAndUser.ts +++ b/examples/auth/cms/src/collections/access/adminsAndUser.ts @@ -1,4 +1,5 @@ import type { Access } from 'payload/config' + import { checkRole } from './checkRole' const adminsAndUser: Access = ({ req: { user } }) => { diff --git a/examples/auth/cms/src/payload-types.ts b/examples/auth/cms/src/payload-types.ts index 5eede4b683..5396e1ab4c 100644 --- a/examples/auth/cms/src/payload-types.ts +++ b/examples/auth/cms/src/payload-types.ts @@ -7,21 +7,21 @@ export interface Config { collections: { - users: User; - }; - globals: {}; + users: User + } + globals: {} } export interface User { - id: string; - firstName?: string; - lastName?: string; - roles?: ('admin' | 'user')[]; - email?: string; - resetPasswordToken?: string; - resetPasswordExpiration?: string; - loginAttempts?: number; - lockUntil?: string; - createdAt: string; - updatedAt: string; - password?: string; + id: string + firstName?: string + lastName?: string + roles?: Array<'admin' | 'user'> + email?: string + resetPasswordToken?: string + resetPasswordExpiration?: string + loginAttempts?: number + lockUntil?: string + createdAt: string + updatedAt: string + password?: string } diff --git a/examples/auth/cms/src/payload.config.ts b/examples/auth/cms/src/payload.config.ts index dbddac480f..43deca14c6 100644 --- a/examples/auth/cms/src/payload.config.ts +++ b/examples/auth/cms/src/payload.config.ts @@ -1,5 +1,6 @@ -import { buildConfig } from 'payload/config' import path from 'path' +import { buildConfig } from 'payload/config' + import { Users } from './collections/Users' export default buildConfig({ diff --git a/examples/auth/cms/src/server.ts b/examples/auth/cms/src/server.ts index 72762bdbcc..04f44ff405 100644 --- a/examples/auth/cms/src/server.ts +++ b/examples/auth/cms/src/server.ts @@ -1,6 +1,7 @@ -import path from 'path' import express from 'express' +import path from 'path' import payload from 'payload' + import { seed } from './seed' // eslint-disable-next-line diff --git a/examples/auth/cms/yarn.lock b/examples/auth/cms/yarn.lock index 8f1bc7d9d3..f183994df4 100644 --- a/examples/auth/cms/yarn.lock +++ b/examples/auth/cms/yarn.lock @@ -447,6 +447,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@payloadcms/eslint-config@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@payloadcms/eslint-config/-/eslint-config-0.0.1.tgz#4324702ddef6c773b3f3033795a13e6b50c95a92" + integrity sha512-Il59+0C4E/bI6uM2hont3I+oABWkJZbfbItubje5SGMrXkymUq8jT/UZRk0eCt918bB7gihxDXx8guFnR/aNIw== + "@polka/url@^1.0.0-next.20": version "1.0.0-next.21" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" @@ -670,6 +675,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.19.tgz#35e26df9ec441ab99d73e99e9aca82935eea216d" integrity sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw== +"@types/node@18.11.3": + version "18.11.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.3.tgz#78a6d7ec962b596fc2d2ec102c4dd3ef073fea6a" + integrity sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A== + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -714,6 +724,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@18.0.21": + version "18.0.21" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.21.tgz#b8209e9626bb00a34c76f55482697edd2b43cc67" + integrity sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" @@ -1592,11 +1611,6 @@ conf@^10.2.0: pkg-up "^3.1.0" semver "^7.3.5" -confusing-browser-globals@^1.0.10: - version "1.0.11" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" - integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== - connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" @@ -2335,15 +2349,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" - integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.2" - eslint-config-prettier@^8.5.0: version "8.6.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" @@ -2365,6 +2370,16 @@ eslint-module-utils@^2.7.2: dependencies: debug "^3.2.7" +eslint-plugin-filenames@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz#7094f00d7aefdd6999e3ac19f72cea058e590cf7" + integrity sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w== + dependencies: + lodash.camelcase "4.3.0" + lodash.kebabcase "4.1.1" + lodash.snakecase "4.1.1" + lodash.upperfirst "4.3.1" + eslint-plugin-import@2.25.4: version "2.25.4" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" @@ -2391,6 +2406,16 @@ eslint-plugin-prettier@^4.0.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-react-hooks@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== + +eslint-plugin-simple-import-sort@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz#cc4ceaa81ba73252427062705b64321946f61351" + integrity sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw== + eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -3739,6 +3764,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.camelcase@4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -3749,6 +3779,11 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== +lodash.kebabcase@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g== + lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -3759,11 +3794,21 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.snakecase@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== +lodash.upperfirst@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== + lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -4226,7 +4271,7 @@ object-to-formdata@^4.4.2: resolved "https://registry.yarnpkg.com/object-to-formdata/-/object-to-formdata-4.4.2.tgz#f89013f90493c58cb5f6ab9f50b7aeec30745ea6" integrity sha512-fu6UDjsqIfFUu/B3GXJ2IFnNAL/YbsC1PPzqDIFXcfkhdYjTD3K4zqhyD/lZ6+KdP9O/64YIPckIOiS5ouXwLA== -object.assign@^4.1.2, object.assign@^4.1.4: +object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -4236,15 +4281,6 @@ object.assign@^4.1.2, object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.2: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" - integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - object.values@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" diff --git a/examples/auth/nextjs/.eslintrc.js b/examples/auth/nextjs/.eslintrc.js index a96e2fe286..bfbefd5afa 100644 --- a/examples/auth/nextjs/.eslintrc.js +++ b/examples/auth/nextjs/.eslintrc.js @@ -1,4 +1,4 @@ module.exports = { root: true, - extends: ['./eslint-config'], + extends: ['plugin:@next/next/recommended', '@payloadcms'], } diff --git a/examples/auth/nextjs/eslint-config/constants.js b/examples/auth/nextjs/eslint-config/constants.js deleted file mode 100644 index 81d154ee34..0000000000 --- a/examples/auth/nextjs/eslint-config/constants.js +++ /dev/null @@ -1,14 +0,0 @@ -const TEST_FILE_PATTERNS = [ - '**/**.it-test.ts', - '**/**.test.ts', - '**/**.spec.ts', - '**/__mocks__/**.ts', - '**/test/**.ts', -] - -const CODE_FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.scss', '.json'] - -module.exports = { - TEST_FILE_PATTERNS, - CODE_FILE_EXTENSIONS, -} diff --git a/examples/auth/nextjs/eslint-config/index.js b/examples/auth/nextjs/eslint-config/index.js deleted file mode 100644 index 1b15a18f2f..0000000000 --- a/examples/auth/nextjs/eslint-config/index.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - extends: [ - 'airbnb-base', - 'plugin:@next/next/recommended', - require.resolve('./rules/typescript.js'), - require.resolve('./rules/import.js'), - require.resolve('./rules/prettier.js'), - require.resolve('./rules/style.js'), - require.resolve('./rules/react.js'), - ], - env: { - es6: true, - browser: true, - node: true, - }, - globals: { - NodeJS: true, - }, -} diff --git a/examples/auth/nextjs/eslint-config/rules/filenames.js b/examples/auth/nextjs/eslint-config/rules/filenames.js deleted file mode 100644 index 53e47139f1..0000000000 --- a/examples/auth/nextjs/eslint-config/rules/filenames.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: ['filenames'], - rules: { - 'filenames/match-regex': ['error', '^[a-z0-9-.]+$', true], - }, -} diff --git a/examples/auth/nextjs/eslint-config/rules/import.js b/examples/auth/nextjs/eslint-config/rules/import.js deleted file mode 100644 index df9a77fd18..0000000000 --- a/examples/auth/nextjs/eslint-config/rules/import.js +++ /dev/null @@ -1,52 +0,0 @@ -const { CODE_FILE_EXTENSIONS } = require('../constants') - -module.exports = { - env: { - es6: true, - }, - extends: ['plugin:import/errors', 'plugin:import/warnings', 'plugin:import/typescript'], - plugins: ['import', 'simple-import-sort'], - settings: { - 'import/resolver': { - node: { - extensions: CODE_FILE_EXTENSIONS, - }, - }, - 'import/extensions': CODE_FILE_EXTENSIONS, - 'import/parsers': { - '@typescript-eslint/parser': ['.ts'], - }, - }, - rules: { - 'import/no-unresolved': 'off', - 'import/no-default-export': 'off', - 'import/prefer-default-export': 'off', - 'import/extensions': [ - 'error', - 'ignorePackages', - { - ts: 'never', - tsx: 'never', - js: 'never', - jsx: 'never', - }, - ], - 'simple-import-sort/imports': [ - 'error', - { - groups: [ - ['^react', '^@?\\w'], - ['^(@components|@root|@utils|@scss|@hooks)(/.*|$)', '^\\.((?!.scss).)*$'], - ['^[^.]'], - ], - }, - ], - 'simple-import-sort/exports': 'error', - 'import/no-extraneous-dependencies': 'off', - 'import/named': 'error', - 'import/no-relative-packages': 'warn', - 'import/no-import-module-exports': 'warn', - 'import/no-cycle': 'warn', - 'import/no-duplicates': 'error', - }, -} diff --git a/examples/auth/nextjs/eslint-config/rules/prettier.js b/examples/auth/nextjs/eslint-config/rules/prettier.js deleted file mode 100644 index 373ce0e610..0000000000 --- a/examples/auth/nextjs/eslint-config/rules/prettier.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - plugins: ['prettier'], - extends: ['plugin:prettier/recommended'], - rules: { - 'prettier/prettier': 'error', - }, -} diff --git a/examples/auth/nextjs/eslint-config/rules/react.js b/examples/auth/nextjs/eslint-config/rules/react.js deleted file mode 100644 index fbfa6c2415..0000000000 --- a/examples/auth/nextjs/eslint-config/rules/react.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: ['plugin:react-hooks/recommended'], -} diff --git a/examples/auth/nextjs/eslint-config/rules/style.js b/examples/auth/nextjs/eslint-config/rules/style.js deleted file mode 100644 index 26e4e670c2..0000000000 --- a/examples/auth/nextjs/eslint-config/rules/style.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - rules: { - 'prefer-named-exports': 'off', - 'prefer-destructuring': 'off', - 'comma-dangle': ['error', 'always-multiline'], - 'class-methods-use-this': 'off', - 'function-paren-newline': ['error', 'consistent'], - 'eol-last': ['error', 'always'], - 'no-restricted-syntax': 'off', - 'no-await-in-loop': 'off', - 'no-console': ['warn', { allow: ['warn', 'error'] }], - 'space-infix-ops': 'off', - '@typescript-eslint/space-infix-ops': 'warn', - }, -} diff --git a/examples/auth/nextjs/eslint-config/rules/typescript.js b/examples/auth/nextjs/eslint-config/rules/typescript.js deleted file mode 100644 index a92068284e..0000000000 --- a/examples/auth/nextjs/eslint-config/rules/typescript.js +++ /dev/null @@ -1,322 +0,0 @@ -module.exports = { - plugins: ['@typescript-eslint'], - overrides: [ - { - files: ['**/**.ts', '**/**.d.ts'], - rules: { - 'no-undef': 'off', - camelcase: 'off', - '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], - '@typescript-eslint/await-thenable': 'off', - '@typescript-eslint/consistent-type-assertions': [ - 'error', - { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }, - ], - '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], - '@typescript-eslint/consistent-type-imports': 'warn', - '@typescript-eslint/explicit-function-return-type': [ - 'error', - { - allowExpressions: true, - allowTypedFunctionExpressions: true, - allowHigherOrderFunctions: true, - allowConciseArrowFunctionExpressionsStartingWithVoid: false, - }, - ], - '@typescript-eslint/explicit-member-accessibility': [ - 'error', - { accessibility: 'no-public' }, - ], - '@typescript-eslint/member-delimiter-style': [ - 'error', - { - multiline: { - delimiter: 'none', - requireLast: true, - }, - singleline: { - delimiter: 'semi', - requireLast: false, - }, - }, - ], - '@typescript-eslint/method-signature-style': 'off', - '@typescript-eslint/naming-convention': [ - 'off', - { - selector: 'default', - format: ['camelCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: 'variable', - format: ['camelCase', 'UPPER_CASE'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: 'typeParameter', - format: ['PascalCase'], - prefix: ['T', 'U'], - }, - { - selector: 'variable', - types: ['boolean'], - format: ['PascalCase'], - prefix: ['is', 'should', 'has', 'can', 'did', 'will'], - }, - { - selector: 'interface', - format: ['PascalCase'], - custom: { - regex: '^I[A-Z]', - match: false, - }, - }, - { - selector: [ - 'function', - 'parameter', - 'property', - 'parameterProperty', - 'method', - 'accessor', - ], - format: ['camelCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: ['class', 'interface', 'typeAlias', 'enum', 'typeParameter'], - format: ['PascalCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - ], - '@typescript-eslint/no-base-to-string': 'off', - '@typescript-eslint/no-confusing-non-null-assertion': 'error', - '@typescript-eslint/no-dynamic-delete': 'error', - '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/no-explicit-any': [ - 'warn', - { - ignoreRestArgs: true, - // enable later - fixToUnknown: false, - }, - ], - '@typescript-eslint/no-extra-non-null-assertion': 'error', - '@typescript-eslint/no-extraneous-class': [ - 'error', - { - allowConstructorOnly: false, - allowEmpty: false, - allowStaticOnly: false, - allowWithDecorator: false, - }, - ], - '@typescript-eslint/no-floating-promises': 'off', - '@typescript-eslint/no-for-in-array': 'off', - '@typescript-eslint/no-implicit-any-catch': [ - 'error', - { - allowExplicitAny: false, - }, - ], - '@typescript-eslint/no-implied-eval': 'off', - '@typescript-eslint/no-inferrable-types': [ - 'error', - { - ignoreParameters: false, - ignoreProperties: false, - }, - ], - '@typescript-eslint/no-invalid-void-type': [ - 'off', - { - allowInGenericTypeArguments: true, - }, - ], - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-misused-promises': 'off', - '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', - '@typescript-eslint/no-non-null-assertion': 'warn', - '@typescript-eslint/no-parameter-properties': 'error', - '@typescript-eslint/no-require-imports': 'error', - '@typescript-eslint/no-this-alias': 'error', - '@typescript-eslint/no-throw-literal': 'off', - '@typescript-eslint/no-type-alias': [ - 'off', - { - allowAliases: 'always', - allowCallbacks: 'always', - allowConditionalTypes: 'always', - allowConstructors: 'never', - allowLiterals: 'in-unions-and-intersections', - allowMappedTypes: 'always', - allowTupleTypes: 'always', - }, - ], - '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', - '@typescript-eslint/no-unnecessary-condition': 'off', - '@typescript-eslint/no-unnecessary-qualifier': 'off', - '@typescript-eslint/no-unnecessary-type-arguments': 'off', - '@typescript-eslint/no-unnecessary-type-assertion': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/prefer-as-const': 'error', - '@typescript-eslint/prefer-enum-initializers': 'off', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-includes': 'off', - '@typescript-eslint/prefer-literal-enum-member': 'error', - '@typescript-eslint/prefer-namespace-keyword': 'off', - '@typescript-eslint/prefer-nullish-coalescing': 'off', - '@typescript-eslint/prefer-optional-chain': 'warn', - '@typescript-eslint/prefer-readonly': 'off', - '@typescript-eslint/prefer-readonly-parameter-types': 'off', - '@typescript-eslint/prefer-reduce-type-parameter': 'off', - '@typescript-eslint/prefer-regexp-exec': 'off', - '@typescript-eslint/prefer-string-starts-ends-with': 'off', - '@typescript-eslint/prefer-ts-expect-error': 'warn', - '@typescript-eslint/promise-function-async': 'off', - '@typescript-eslint/require-array-sort-compare': 'off', - '@typescript-eslint/restrict-plus-operands': 'off', - '@typescript-eslint/restrict-template-expressions': 'off', - '@typescript-eslint/strict-boolean-expressions': 'off', - '@typescript-eslint/switch-exhaustiveness-check': 'off', - '@typescript-eslint/triple-slash-reference': 'error', - '@typescript-eslint/type-annotation-spacing': [ - 'error', - { - before: false, - after: true, - overrides: { - arrow: { - before: true, - after: true, - }, - }, - }, - ], - '@typescript-eslint/typedef': [ - 'error', - { - arrayDestructuring: false, - arrowParameter: false, - memberVariableDeclaration: false, - objectDestructuring: false, - parameter: false, - propertyDeclaration: true, - variableDeclaration: false, - variableDeclarationIgnoreFunction: false, - }, - ], - '@typescript-eslint/unbound-method': 'off', - '@typescript-eslint/unified-signatures': 'off', - 'brace-style': 'off', - '@typescript-eslint/brace-style': 'error', - 'comma-spacing': 'off', - '@typescript-eslint/comma-spacing': 'error', - 'default-param-last': 'off', - '@typescript-eslint/default-param-last': 'error', - 'dot-notation': 'error', - '@typescript-eslint/dot-notation': 'off', - 'func-call-spacing': 'off', - '@typescript-eslint/func-call-spacing': 'error', - indent: 'off', - '@typescript-eslint/indent': 'off', - '@typescript-eslint/init-declarations': 'off', - 'keyword-spacing': 'off', - '@typescript-eslint/keyword-spacing': 'error', - 'lines-between-class-members': 'off', - '@typescript-eslint/lines-between-class-members': [ - 'error', - 'always', - { - exceptAfterSingleLine: true, - exceptAfterOverload: true, - }, - ], - 'no-array-constructor': 'off', - '@typescript-eslint/no-array-constructor': 'error', - 'no-dupe-class-members': 'off', - '@typescript-eslint/no-dupe-class-members': 'error', - 'no-extra-parens': 'off', - '@typescript-eslint/no-extra-parens': 'off', - 'no-extra-semi': 'off', - '@typescript-eslint/no-extra-semi': 'error', - 'no-invalid-this': 'off', - '@typescript-eslint/no-invalid-this': 'error', - 'no-loss-of-precision': 'off', - '@typescript-eslint/no-loss-of-precision': 'error', - 'no-magic-numbers': 'off', - '@typescript-eslint/no-magic-numbers': [ - 'off', - { - ignoreArrayIndexes: true, - ignoreDefaultValues: true, - enforceConst: true, - ignoreEnums: true, - ignoreNumericLiteralTypes: true, - ignoreReadonlyClassProperties: true, - }, - ], - 'no-redeclare': 'off', - '@typescript-eslint/no-redeclare': [ - 'error', - { - builtinGlobals: true, - }, - ], - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': [ - 'error', - { - ignoreTypeValueShadow: false, - }, - ], - 'no-unused-expressions': 'off', - '@typescript-eslint/no-unused-expressions': 'error', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - ignoreRestSiblings: true, - }, - ], - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'error', - quotes: 'off', - '@typescript-eslint/quotes': [ - 'error', - 'single', - { - avoidEscape: true, - allowTemplateLiterals: true, - }, - ], - '@typescript-eslint/require-await': 'off', - '@typescript-eslint/return-await': 'off', - semi: 'off', - '@typescript-eslint/semi': ['error', 'never'], - 'space-before-function-paren': 'off', - '@typescript-eslint/space-before-function-paren': [ - 'error', - { - anonymous: 'never', - named: 'never', - asyncArrow: 'always', - }, - ], - }, - }, - ], -} diff --git a/examples/auth/nextjs/package.json b/examples/auth/nextjs/package.json index b8ef666672..e2b935497b 100644 --- a/examples/auth/nextjs/package.json +++ b/examples/auth/nextjs/package.json @@ -22,8 +22,8 @@ "@types/react": "18.0.21", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", + "@payloadcms/eslint-config": "^0.0.1", "eslint": "8.25.0", - "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-import": "2.25.4", diff --git a/examples/auth/nextjs/pages/app.module.css b/examples/auth/nextjs/pages/app.module.css new file mode 100644 index 0000000000..c3692377df --- /dev/null +++ b/examples/auth/nextjs/pages/app.module.css @@ -0,0 +1,12 @@ +.app { + font-family: system-ui; + max-width: 800px; + margin: 0 auto; + padding: 0 30px; +} + +.header { + display: flex; + justify-content: space-between; + margin: 25px 0; +} diff --git a/examples/auth/nextjs/yarn.lock b/examples/auth/nextjs/yarn.lock index f16fb78135..0abe5a1a3b 100644 --- a/examples/auth/nextjs/yarn.lock +++ b/examples/auth/nextjs/yarn.lock @@ -134,6 +134,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@payloadcms/eslint-config@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@payloadcms/eslint-config/-/eslint-config-0.0.1.tgz#4324702ddef6c773b3f3033795a13e6b50c95a92" + integrity sha512-Il59+0C4E/bI6uM2hont3I+oABWkJZbfbItubje5SGMrXkymUq8jT/UZRk0eCt918bB7gihxDXx8guFnR/aNIw== + "@swc/helpers@0.4.14": version "0.4.14" resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74" @@ -327,11 +332,6 @@ array.prototype.flat@^1.2.5: es-abstract "^1.19.2" es-shim-unscopables "^1.0.0" -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -400,11 +400,6 @@ concat-map@0.0.1: resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -confusing-browser-globals@^1.0.10: - version "1.0.11" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" - integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== - cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -503,54 +498,6 @@ es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19 string.prototype.trimstart "^1.0.5" unbox-primitive "^1.0.2" -es-abstract@^1.20.4: - version "1.21.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" - integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.4" - is-array-buffer "^3.0.1" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.10" - is-weakref "^1.0.2" - object-inspect "^1.12.2" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" - -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" - es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" @@ -577,15 +524,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" - integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.2" - eslint-config-prettier@^8.5.0: version "8.6.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" @@ -840,13 +778,6 @@ flatted@^3.1.0: resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2" integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ== -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -881,15 +812,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" -get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" - integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -950,13 +872,6 @@ globals@^13.19.0: dependencies: type-fest "^0.20.2" -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - globby@^11.1.0: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -969,13 +884,6 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - grapheme-splitter@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" @@ -998,11 +906,6 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -1067,24 +970,6 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -internal-slot@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - -is-array-buffer@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a" - integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-typed-array "^1.1.10" - is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -1100,11 +985,6 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-callable@^1.1.3, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" @@ -1194,17 +1074,6 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -1390,17 +1259,12 @@ object-inspect@^1.12.0, object-inspect@^1.9.0: resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== -object-inspect@^1.12.2: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - object-keys@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.2, object.assign@^4.1.4: +object.assign@^4.1.2: version "4.1.4" resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -1410,15 +1274,6 @@ object.assign@^4.1.2, object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.2: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" - integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - object.values@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" @@ -1606,15 +1461,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - scheduler@^0.23.0: version "0.23.0" resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" @@ -1678,15 +1524,6 @@ string.prototype.trimend@^1.0.5: define-properties "^1.1.4" es-abstract "^1.19.5" -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - string.prototype.trimstart@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" @@ -1696,15 +1533,6 @@ string.prototype.trimstart@^1.0.5: define-properties "^1.1.4" es-abstract "^1.19.5" -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -1797,15 +1625,6 @@ type-fest@^0.20.2: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - typescript@4.8.4: version "4.8.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" @@ -1839,18 +1658,6 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - which@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" diff --git a/examples/preview/cms/.eslintrc.js b/examples/preview/cms/.eslintrc.js index a96e2fe286..b69f00e730 100644 --- a/examples/preview/cms/.eslintrc.js +++ b/examples/preview/cms/.eslintrc.js @@ -1,4 +1,4 @@ module.exports = { root: true, - extends: ['./eslint-config'], + extends: ['@payloadcms'], } diff --git a/examples/preview/cms/eslint-config/index.js b/examples/preview/cms/eslint-config/index.js deleted file mode 100644 index 600ef87602..0000000000 --- a/examples/preview/cms/eslint-config/index.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - extends: [ - 'airbnb-base', - require.resolve('./rules/style.js'), - require.resolve('./rules/import.js'), - require.resolve('./rules/typescript.js'), - require.resolve('./rules/prettier.js'), - ], - env: { - es6: true, - browser: true, - node: true, - }, -} diff --git a/examples/preview/cms/eslint-config/rules/import.js b/examples/preview/cms/eslint-config/rules/import.js deleted file mode 100644 index 802555aff1..0000000000 --- a/examples/preview/cms/eslint-config/rules/import.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = { - env: { - es6: true, - }, - extends: ['plugin:import/errors', 'plugin:import/warnings', 'plugin:import/typescript'], - plugins: ['import'], - settings: { - 'import/parsers': { - '@typescript-eslint/parser': ['.ts'], - }, - }, - rules: { - 'import/no-unresolved': ['error', { commonjs: true, caseSensitive: true }], - 'import/no-default-export': 'off', - 'import/prefer-default-export': 'off', - 'import/extensions': [ - 'error', - 'ignorePackages', - { - ts: 'never', - tsx: 'never', - js: 'never', - jsx: 'never', - }, - ], - 'import/no-extraneous-dependencies': 'off', - 'import/named': 'error', - 'import/no-relative-packages': 'warn', - 'import/no-import-module-exports': 'warn', - 'import/no-cycle': 'warn', - }, -} diff --git a/examples/preview/cms/eslint-config/rules/prettier.js b/examples/preview/cms/eslint-config/rules/prettier.js deleted file mode 100644 index 373ce0e610..0000000000 --- a/examples/preview/cms/eslint-config/rules/prettier.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - plugins: ['prettier'], - extends: ['plugin:prettier/recommended'], - rules: { - 'prettier/prettier': 'error', - }, -} diff --git a/examples/preview/cms/eslint-config/rules/style.js b/examples/preview/cms/eslint-config/rules/style.js deleted file mode 100644 index 7584f503b9..0000000000 --- a/examples/preview/cms/eslint-config/rules/style.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - rules: { - 'prefer-named-exports': 'off', - 'prefer-destructuring': 'off', - 'comma-dangle': ['error', 'always-multiline'], - 'class-methods-use-this': 'off', - 'function-paren-newline': ['error', 'consistent'], - 'eol-last': ['error', 'always'], - 'no-restricted-syntax': 'off', - 'no-await-in-loop': 'off', - 'no-console': 'error', - }, -} diff --git a/examples/preview/cms/eslint-config/rules/typescript.js b/examples/preview/cms/eslint-config/rules/typescript.js deleted file mode 100644 index a92068284e..0000000000 --- a/examples/preview/cms/eslint-config/rules/typescript.js +++ /dev/null @@ -1,322 +0,0 @@ -module.exports = { - plugins: ['@typescript-eslint'], - overrides: [ - { - files: ['**/**.ts', '**/**.d.ts'], - rules: { - 'no-undef': 'off', - camelcase: 'off', - '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], - '@typescript-eslint/await-thenable': 'off', - '@typescript-eslint/consistent-type-assertions': [ - 'error', - { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }, - ], - '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], - '@typescript-eslint/consistent-type-imports': 'warn', - '@typescript-eslint/explicit-function-return-type': [ - 'error', - { - allowExpressions: true, - allowTypedFunctionExpressions: true, - allowHigherOrderFunctions: true, - allowConciseArrowFunctionExpressionsStartingWithVoid: false, - }, - ], - '@typescript-eslint/explicit-member-accessibility': [ - 'error', - { accessibility: 'no-public' }, - ], - '@typescript-eslint/member-delimiter-style': [ - 'error', - { - multiline: { - delimiter: 'none', - requireLast: true, - }, - singleline: { - delimiter: 'semi', - requireLast: false, - }, - }, - ], - '@typescript-eslint/method-signature-style': 'off', - '@typescript-eslint/naming-convention': [ - 'off', - { - selector: 'default', - format: ['camelCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: 'variable', - format: ['camelCase', 'UPPER_CASE'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: 'typeParameter', - format: ['PascalCase'], - prefix: ['T', 'U'], - }, - { - selector: 'variable', - types: ['boolean'], - format: ['PascalCase'], - prefix: ['is', 'should', 'has', 'can', 'did', 'will'], - }, - { - selector: 'interface', - format: ['PascalCase'], - custom: { - regex: '^I[A-Z]', - match: false, - }, - }, - { - selector: [ - 'function', - 'parameter', - 'property', - 'parameterProperty', - 'method', - 'accessor', - ], - format: ['camelCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: ['class', 'interface', 'typeAlias', 'enum', 'typeParameter'], - format: ['PascalCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - ], - '@typescript-eslint/no-base-to-string': 'off', - '@typescript-eslint/no-confusing-non-null-assertion': 'error', - '@typescript-eslint/no-dynamic-delete': 'error', - '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/no-explicit-any': [ - 'warn', - { - ignoreRestArgs: true, - // enable later - fixToUnknown: false, - }, - ], - '@typescript-eslint/no-extra-non-null-assertion': 'error', - '@typescript-eslint/no-extraneous-class': [ - 'error', - { - allowConstructorOnly: false, - allowEmpty: false, - allowStaticOnly: false, - allowWithDecorator: false, - }, - ], - '@typescript-eslint/no-floating-promises': 'off', - '@typescript-eslint/no-for-in-array': 'off', - '@typescript-eslint/no-implicit-any-catch': [ - 'error', - { - allowExplicitAny: false, - }, - ], - '@typescript-eslint/no-implied-eval': 'off', - '@typescript-eslint/no-inferrable-types': [ - 'error', - { - ignoreParameters: false, - ignoreProperties: false, - }, - ], - '@typescript-eslint/no-invalid-void-type': [ - 'off', - { - allowInGenericTypeArguments: true, - }, - ], - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-misused-promises': 'off', - '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', - '@typescript-eslint/no-non-null-assertion': 'warn', - '@typescript-eslint/no-parameter-properties': 'error', - '@typescript-eslint/no-require-imports': 'error', - '@typescript-eslint/no-this-alias': 'error', - '@typescript-eslint/no-throw-literal': 'off', - '@typescript-eslint/no-type-alias': [ - 'off', - { - allowAliases: 'always', - allowCallbacks: 'always', - allowConditionalTypes: 'always', - allowConstructors: 'never', - allowLiterals: 'in-unions-and-intersections', - allowMappedTypes: 'always', - allowTupleTypes: 'always', - }, - ], - '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', - '@typescript-eslint/no-unnecessary-condition': 'off', - '@typescript-eslint/no-unnecessary-qualifier': 'off', - '@typescript-eslint/no-unnecessary-type-arguments': 'off', - '@typescript-eslint/no-unnecessary-type-assertion': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/prefer-as-const': 'error', - '@typescript-eslint/prefer-enum-initializers': 'off', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-includes': 'off', - '@typescript-eslint/prefer-literal-enum-member': 'error', - '@typescript-eslint/prefer-namespace-keyword': 'off', - '@typescript-eslint/prefer-nullish-coalescing': 'off', - '@typescript-eslint/prefer-optional-chain': 'warn', - '@typescript-eslint/prefer-readonly': 'off', - '@typescript-eslint/prefer-readonly-parameter-types': 'off', - '@typescript-eslint/prefer-reduce-type-parameter': 'off', - '@typescript-eslint/prefer-regexp-exec': 'off', - '@typescript-eslint/prefer-string-starts-ends-with': 'off', - '@typescript-eslint/prefer-ts-expect-error': 'warn', - '@typescript-eslint/promise-function-async': 'off', - '@typescript-eslint/require-array-sort-compare': 'off', - '@typescript-eslint/restrict-plus-operands': 'off', - '@typescript-eslint/restrict-template-expressions': 'off', - '@typescript-eslint/strict-boolean-expressions': 'off', - '@typescript-eslint/switch-exhaustiveness-check': 'off', - '@typescript-eslint/triple-slash-reference': 'error', - '@typescript-eslint/type-annotation-spacing': [ - 'error', - { - before: false, - after: true, - overrides: { - arrow: { - before: true, - after: true, - }, - }, - }, - ], - '@typescript-eslint/typedef': [ - 'error', - { - arrayDestructuring: false, - arrowParameter: false, - memberVariableDeclaration: false, - objectDestructuring: false, - parameter: false, - propertyDeclaration: true, - variableDeclaration: false, - variableDeclarationIgnoreFunction: false, - }, - ], - '@typescript-eslint/unbound-method': 'off', - '@typescript-eslint/unified-signatures': 'off', - 'brace-style': 'off', - '@typescript-eslint/brace-style': 'error', - 'comma-spacing': 'off', - '@typescript-eslint/comma-spacing': 'error', - 'default-param-last': 'off', - '@typescript-eslint/default-param-last': 'error', - 'dot-notation': 'error', - '@typescript-eslint/dot-notation': 'off', - 'func-call-spacing': 'off', - '@typescript-eslint/func-call-spacing': 'error', - indent: 'off', - '@typescript-eslint/indent': 'off', - '@typescript-eslint/init-declarations': 'off', - 'keyword-spacing': 'off', - '@typescript-eslint/keyword-spacing': 'error', - 'lines-between-class-members': 'off', - '@typescript-eslint/lines-between-class-members': [ - 'error', - 'always', - { - exceptAfterSingleLine: true, - exceptAfterOverload: true, - }, - ], - 'no-array-constructor': 'off', - '@typescript-eslint/no-array-constructor': 'error', - 'no-dupe-class-members': 'off', - '@typescript-eslint/no-dupe-class-members': 'error', - 'no-extra-parens': 'off', - '@typescript-eslint/no-extra-parens': 'off', - 'no-extra-semi': 'off', - '@typescript-eslint/no-extra-semi': 'error', - 'no-invalid-this': 'off', - '@typescript-eslint/no-invalid-this': 'error', - 'no-loss-of-precision': 'off', - '@typescript-eslint/no-loss-of-precision': 'error', - 'no-magic-numbers': 'off', - '@typescript-eslint/no-magic-numbers': [ - 'off', - { - ignoreArrayIndexes: true, - ignoreDefaultValues: true, - enforceConst: true, - ignoreEnums: true, - ignoreNumericLiteralTypes: true, - ignoreReadonlyClassProperties: true, - }, - ], - 'no-redeclare': 'off', - '@typescript-eslint/no-redeclare': [ - 'error', - { - builtinGlobals: true, - }, - ], - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': [ - 'error', - { - ignoreTypeValueShadow: false, - }, - ], - 'no-unused-expressions': 'off', - '@typescript-eslint/no-unused-expressions': 'error', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - ignoreRestSiblings: true, - }, - ], - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'error', - quotes: 'off', - '@typescript-eslint/quotes': [ - 'error', - 'single', - { - avoidEscape: true, - allowTemplateLiterals: true, - }, - ], - '@typescript-eslint/require-await': 'off', - '@typescript-eslint/return-await': 'off', - semi: 'off', - '@typescript-eslint/semi': ['error', 'never'], - 'space-before-function-paren': 'off', - '@typescript-eslint/space-before-function-paren': [ - 'error', - { - anonymous: 'never', - named: 'never', - asyncArrow: 'always', - }, - ], - }, - }, - ], -} diff --git a/examples/preview/cms/package.json b/examples/preview/cms/package.json index 0ba43f87d6..c45c210ab7 100644 --- a/examples/preview/cms/package.json +++ b/examples/preview/cms/package.json @@ -22,16 +22,21 @@ "payload": "^1.6.4" }, "devDependencies": { + "@types/node": "18.11.3", + "@types/react": "18.0.21", "@types/express": "^4.17.9", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", + "@payloadcms/eslint-config": "^0.0.1", "copyfiles": "^2.4.1", "cross-env": "^7.0.3", "eslint": "^8.19.0", - "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^8.5.0", + "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-import": "2.25.4", "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-simple-import-sort": "^10.0.0", "nodemon": "^2.0.6", "prettier": "^2.7.1", "ts-node": "^9.1.1", diff --git a/examples/preview/cms/yarn.lock b/examples/preview/cms/yarn.lock index 8f1bc7d9d3..f183994df4 100644 --- a/examples/preview/cms/yarn.lock +++ b/examples/preview/cms/yarn.lock @@ -447,6 +447,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@payloadcms/eslint-config@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@payloadcms/eslint-config/-/eslint-config-0.0.1.tgz#4324702ddef6c773b3f3033795a13e6b50c95a92" + integrity sha512-Il59+0C4E/bI6uM2hont3I+oABWkJZbfbItubje5SGMrXkymUq8jT/UZRk0eCt918bB7gihxDXx8guFnR/aNIw== + "@polka/url@^1.0.0-next.20": version "1.0.0-next.21" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" @@ -670,6 +675,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.19.tgz#35e26df9ec441ab99d73e99e9aca82935eea216d" integrity sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw== +"@types/node@18.11.3": + version "18.11.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.3.tgz#78a6d7ec962b596fc2d2ec102c4dd3ef073fea6a" + integrity sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A== + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -714,6 +724,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@18.0.21": + version "18.0.21" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.21.tgz#b8209e9626bb00a34c76f55482697edd2b43cc67" + integrity sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" @@ -1592,11 +1611,6 @@ conf@^10.2.0: pkg-up "^3.1.0" semver "^7.3.5" -confusing-browser-globals@^1.0.10: - version "1.0.11" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" - integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== - connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" @@ -2335,15 +2349,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" - integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.2" - eslint-config-prettier@^8.5.0: version "8.6.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" @@ -2365,6 +2370,16 @@ eslint-module-utils@^2.7.2: dependencies: debug "^3.2.7" +eslint-plugin-filenames@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz#7094f00d7aefdd6999e3ac19f72cea058e590cf7" + integrity sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w== + dependencies: + lodash.camelcase "4.3.0" + lodash.kebabcase "4.1.1" + lodash.snakecase "4.1.1" + lodash.upperfirst "4.3.1" + eslint-plugin-import@2.25.4: version "2.25.4" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" @@ -2391,6 +2406,16 @@ eslint-plugin-prettier@^4.0.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-react-hooks@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== + +eslint-plugin-simple-import-sort@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz#cc4ceaa81ba73252427062705b64321946f61351" + integrity sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw== + eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -3739,6 +3764,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.camelcase@4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -3749,6 +3779,11 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== +lodash.kebabcase@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g== + lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -3759,11 +3794,21 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.snakecase@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== +lodash.upperfirst@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== + lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -4226,7 +4271,7 @@ object-to-formdata@^4.4.2: resolved "https://registry.yarnpkg.com/object-to-formdata/-/object-to-formdata-4.4.2.tgz#f89013f90493c58cb5f6ab9f50b7aeec30745ea6" integrity sha512-fu6UDjsqIfFUu/B3GXJ2IFnNAL/YbsC1PPzqDIFXcfkhdYjTD3K4zqhyD/lZ6+KdP9O/64YIPckIOiS5ouXwLA== -object.assign@^4.1.2, object.assign@^4.1.4: +object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -4236,15 +4281,6 @@ object.assign@^4.1.2, object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.2: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" - integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - object.values@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" diff --git a/examples/preview/nextjs/.eslintrc.js b/examples/preview/nextjs/.eslintrc.js index a96e2fe286..bfbefd5afa 100644 --- a/examples/preview/nextjs/.eslintrc.js +++ b/examples/preview/nextjs/.eslintrc.js @@ -1,4 +1,4 @@ module.exports = { root: true, - extends: ['./eslint-config'], + extends: ['plugin:@next/next/recommended', '@payloadcms'], } diff --git a/examples/preview/nextjs/eslint-config/constants.js b/examples/preview/nextjs/eslint-config/constants.js deleted file mode 100644 index 81d154ee34..0000000000 --- a/examples/preview/nextjs/eslint-config/constants.js +++ /dev/null @@ -1,14 +0,0 @@ -const TEST_FILE_PATTERNS = [ - '**/**.it-test.ts', - '**/**.test.ts', - '**/**.spec.ts', - '**/__mocks__/**.ts', - '**/test/**.ts', -] - -const CODE_FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.scss', '.json'] - -module.exports = { - TEST_FILE_PATTERNS, - CODE_FILE_EXTENSIONS, -} diff --git a/examples/preview/nextjs/eslint-config/index.js b/examples/preview/nextjs/eslint-config/index.js deleted file mode 100644 index 1b15a18f2f..0000000000 --- a/examples/preview/nextjs/eslint-config/index.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - extends: [ - 'airbnb-base', - 'plugin:@next/next/recommended', - require.resolve('./rules/typescript.js'), - require.resolve('./rules/import.js'), - require.resolve('./rules/prettier.js'), - require.resolve('./rules/style.js'), - require.resolve('./rules/react.js'), - ], - env: { - es6: true, - browser: true, - node: true, - }, - globals: { - NodeJS: true, - }, -} diff --git a/examples/preview/nextjs/eslint-config/rules/filenames.js b/examples/preview/nextjs/eslint-config/rules/filenames.js deleted file mode 100644 index 53e47139f1..0000000000 --- a/examples/preview/nextjs/eslint-config/rules/filenames.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: ['filenames'], - rules: { - 'filenames/match-regex': ['error', '^[a-z0-9-.]+$', true], - }, -} diff --git a/examples/preview/nextjs/eslint-config/rules/import.js b/examples/preview/nextjs/eslint-config/rules/import.js deleted file mode 100644 index df9a77fd18..0000000000 --- a/examples/preview/nextjs/eslint-config/rules/import.js +++ /dev/null @@ -1,52 +0,0 @@ -const { CODE_FILE_EXTENSIONS } = require('../constants') - -module.exports = { - env: { - es6: true, - }, - extends: ['plugin:import/errors', 'plugin:import/warnings', 'plugin:import/typescript'], - plugins: ['import', 'simple-import-sort'], - settings: { - 'import/resolver': { - node: { - extensions: CODE_FILE_EXTENSIONS, - }, - }, - 'import/extensions': CODE_FILE_EXTENSIONS, - 'import/parsers': { - '@typescript-eslint/parser': ['.ts'], - }, - }, - rules: { - 'import/no-unresolved': 'off', - 'import/no-default-export': 'off', - 'import/prefer-default-export': 'off', - 'import/extensions': [ - 'error', - 'ignorePackages', - { - ts: 'never', - tsx: 'never', - js: 'never', - jsx: 'never', - }, - ], - 'simple-import-sort/imports': [ - 'error', - { - groups: [ - ['^react', '^@?\\w'], - ['^(@components|@root|@utils|@scss|@hooks)(/.*|$)', '^\\.((?!.scss).)*$'], - ['^[^.]'], - ], - }, - ], - 'simple-import-sort/exports': 'error', - 'import/no-extraneous-dependencies': 'off', - 'import/named': 'error', - 'import/no-relative-packages': 'warn', - 'import/no-import-module-exports': 'warn', - 'import/no-cycle': 'warn', - 'import/no-duplicates': 'error', - }, -} diff --git a/examples/preview/nextjs/eslint-config/rules/prettier.js b/examples/preview/nextjs/eslint-config/rules/prettier.js deleted file mode 100644 index 373ce0e610..0000000000 --- a/examples/preview/nextjs/eslint-config/rules/prettier.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - plugins: ['prettier'], - extends: ['plugin:prettier/recommended'], - rules: { - 'prettier/prettier': 'error', - }, -} diff --git a/examples/preview/nextjs/eslint-config/rules/react.js b/examples/preview/nextjs/eslint-config/rules/react.js deleted file mode 100644 index fbfa6c2415..0000000000 --- a/examples/preview/nextjs/eslint-config/rules/react.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: ['plugin:react-hooks/recommended'], -} diff --git a/examples/preview/nextjs/eslint-config/rules/style.js b/examples/preview/nextjs/eslint-config/rules/style.js deleted file mode 100644 index 26e4e670c2..0000000000 --- a/examples/preview/nextjs/eslint-config/rules/style.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - rules: { - 'prefer-named-exports': 'off', - 'prefer-destructuring': 'off', - 'comma-dangle': ['error', 'always-multiline'], - 'class-methods-use-this': 'off', - 'function-paren-newline': ['error', 'consistent'], - 'eol-last': ['error', 'always'], - 'no-restricted-syntax': 'off', - 'no-await-in-loop': 'off', - 'no-console': ['warn', { allow: ['warn', 'error'] }], - 'space-infix-ops': 'off', - '@typescript-eslint/space-infix-ops': 'warn', - }, -} diff --git a/examples/preview/nextjs/eslint-config/rules/typescript.js b/examples/preview/nextjs/eslint-config/rules/typescript.js deleted file mode 100644 index a92068284e..0000000000 --- a/examples/preview/nextjs/eslint-config/rules/typescript.js +++ /dev/null @@ -1,322 +0,0 @@ -module.exports = { - plugins: ['@typescript-eslint'], - overrides: [ - { - files: ['**/**.ts', '**/**.d.ts'], - rules: { - 'no-undef': 'off', - camelcase: 'off', - '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], - '@typescript-eslint/await-thenable': 'off', - '@typescript-eslint/consistent-type-assertions': [ - 'error', - { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }, - ], - '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], - '@typescript-eslint/consistent-type-imports': 'warn', - '@typescript-eslint/explicit-function-return-type': [ - 'error', - { - allowExpressions: true, - allowTypedFunctionExpressions: true, - allowHigherOrderFunctions: true, - allowConciseArrowFunctionExpressionsStartingWithVoid: false, - }, - ], - '@typescript-eslint/explicit-member-accessibility': [ - 'error', - { accessibility: 'no-public' }, - ], - '@typescript-eslint/member-delimiter-style': [ - 'error', - { - multiline: { - delimiter: 'none', - requireLast: true, - }, - singleline: { - delimiter: 'semi', - requireLast: false, - }, - }, - ], - '@typescript-eslint/method-signature-style': 'off', - '@typescript-eslint/naming-convention': [ - 'off', - { - selector: 'default', - format: ['camelCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: 'variable', - format: ['camelCase', 'UPPER_CASE'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: 'typeParameter', - format: ['PascalCase'], - prefix: ['T', 'U'], - }, - { - selector: 'variable', - types: ['boolean'], - format: ['PascalCase'], - prefix: ['is', 'should', 'has', 'can', 'did', 'will'], - }, - { - selector: 'interface', - format: ['PascalCase'], - custom: { - regex: '^I[A-Z]', - match: false, - }, - }, - { - selector: [ - 'function', - 'parameter', - 'property', - 'parameterProperty', - 'method', - 'accessor', - ], - format: ['camelCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - { - selector: ['class', 'interface', 'typeAlias', 'enum', 'typeParameter'], - format: ['PascalCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - }, - ], - '@typescript-eslint/no-base-to-string': 'off', - '@typescript-eslint/no-confusing-non-null-assertion': 'error', - '@typescript-eslint/no-dynamic-delete': 'error', - '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/no-explicit-any': [ - 'warn', - { - ignoreRestArgs: true, - // enable later - fixToUnknown: false, - }, - ], - '@typescript-eslint/no-extra-non-null-assertion': 'error', - '@typescript-eslint/no-extraneous-class': [ - 'error', - { - allowConstructorOnly: false, - allowEmpty: false, - allowStaticOnly: false, - allowWithDecorator: false, - }, - ], - '@typescript-eslint/no-floating-promises': 'off', - '@typescript-eslint/no-for-in-array': 'off', - '@typescript-eslint/no-implicit-any-catch': [ - 'error', - { - allowExplicitAny: false, - }, - ], - '@typescript-eslint/no-implied-eval': 'off', - '@typescript-eslint/no-inferrable-types': [ - 'error', - { - ignoreParameters: false, - ignoreProperties: false, - }, - ], - '@typescript-eslint/no-invalid-void-type': [ - 'off', - { - allowInGenericTypeArguments: true, - }, - ], - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-misused-promises': 'off', - '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', - '@typescript-eslint/no-non-null-assertion': 'warn', - '@typescript-eslint/no-parameter-properties': 'error', - '@typescript-eslint/no-require-imports': 'error', - '@typescript-eslint/no-this-alias': 'error', - '@typescript-eslint/no-throw-literal': 'off', - '@typescript-eslint/no-type-alias': [ - 'off', - { - allowAliases: 'always', - allowCallbacks: 'always', - allowConditionalTypes: 'always', - allowConstructors: 'never', - allowLiterals: 'in-unions-and-intersections', - allowMappedTypes: 'always', - allowTupleTypes: 'always', - }, - ], - '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', - '@typescript-eslint/no-unnecessary-condition': 'off', - '@typescript-eslint/no-unnecessary-qualifier': 'off', - '@typescript-eslint/no-unnecessary-type-arguments': 'off', - '@typescript-eslint/no-unnecessary-type-assertion': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/prefer-as-const': 'error', - '@typescript-eslint/prefer-enum-initializers': 'off', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-includes': 'off', - '@typescript-eslint/prefer-literal-enum-member': 'error', - '@typescript-eslint/prefer-namespace-keyword': 'off', - '@typescript-eslint/prefer-nullish-coalescing': 'off', - '@typescript-eslint/prefer-optional-chain': 'warn', - '@typescript-eslint/prefer-readonly': 'off', - '@typescript-eslint/prefer-readonly-parameter-types': 'off', - '@typescript-eslint/prefer-reduce-type-parameter': 'off', - '@typescript-eslint/prefer-regexp-exec': 'off', - '@typescript-eslint/prefer-string-starts-ends-with': 'off', - '@typescript-eslint/prefer-ts-expect-error': 'warn', - '@typescript-eslint/promise-function-async': 'off', - '@typescript-eslint/require-array-sort-compare': 'off', - '@typescript-eslint/restrict-plus-operands': 'off', - '@typescript-eslint/restrict-template-expressions': 'off', - '@typescript-eslint/strict-boolean-expressions': 'off', - '@typescript-eslint/switch-exhaustiveness-check': 'off', - '@typescript-eslint/triple-slash-reference': 'error', - '@typescript-eslint/type-annotation-spacing': [ - 'error', - { - before: false, - after: true, - overrides: { - arrow: { - before: true, - after: true, - }, - }, - }, - ], - '@typescript-eslint/typedef': [ - 'error', - { - arrayDestructuring: false, - arrowParameter: false, - memberVariableDeclaration: false, - objectDestructuring: false, - parameter: false, - propertyDeclaration: true, - variableDeclaration: false, - variableDeclarationIgnoreFunction: false, - }, - ], - '@typescript-eslint/unbound-method': 'off', - '@typescript-eslint/unified-signatures': 'off', - 'brace-style': 'off', - '@typescript-eslint/brace-style': 'error', - 'comma-spacing': 'off', - '@typescript-eslint/comma-spacing': 'error', - 'default-param-last': 'off', - '@typescript-eslint/default-param-last': 'error', - 'dot-notation': 'error', - '@typescript-eslint/dot-notation': 'off', - 'func-call-spacing': 'off', - '@typescript-eslint/func-call-spacing': 'error', - indent: 'off', - '@typescript-eslint/indent': 'off', - '@typescript-eslint/init-declarations': 'off', - 'keyword-spacing': 'off', - '@typescript-eslint/keyword-spacing': 'error', - 'lines-between-class-members': 'off', - '@typescript-eslint/lines-between-class-members': [ - 'error', - 'always', - { - exceptAfterSingleLine: true, - exceptAfterOverload: true, - }, - ], - 'no-array-constructor': 'off', - '@typescript-eslint/no-array-constructor': 'error', - 'no-dupe-class-members': 'off', - '@typescript-eslint/no-dupe-class-members': 'error', - 'no-extra-parens': 'off', - '@typescript-eslint/no-extra-parens': 'off', - 'no-extra-semi': 'off', - '@typescript-eslint/no-extra-semi': 'error', - 'no-invalid-this': 'off', - '@typescript-eslint/no-invalid-this': 'error', - 'no-loss-of-precision': 'off', - '@typescript-eslint/no-loss-of-precision': 'error', - 'no-magic-numbers': 'off', - '@typescript-eslint/no-magic-numbers': [ - 'off', - { - ignoreArrayIndexes: true, - ignoreDefaultValues: true, - enforceConst: true, - ignoreEnums: true, - ignoreNumericLiteralTypes: true, - ignoreReadonlyClassProperties: true, - }, - ], - 'no-redeclare': 'off', - '@typescript-eslint/no-redeclare': [ - 'error', - { - builtinGlobals: true, - }, - ], - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': [ - 'error', - { - ignoreTypeValueShadow: false, - }, - ], - 'no-unused-expressions': 'off', - '@typescript-eslint/no-unused-expressions': 'error', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - ignoreRestSiblings: true, - }, - ], - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'error', - quotes: 'off', - '@typescript-eslint/quotes': [ - 'error', - 'single', - { - avoidEscape: true, - allowTemplateLiterals: true, - }, - ], - '@typescript-eslint/require-await': 'off', - '@typescript-eslint/return-await': 'off', - semi: 'off', - '@typescript-eslint/semi': ['error', 'never'], - 'space-before-function-paren': 'off', - '@typescript-eslint/space-before-function-paren': [ - 'error', - { - anonymous: 'never', - named: 'never', - asyncArrow: 'always', - }, - ], - }, - }, - ], -} diff --git a/examples/preview/nextjs/package.json b/examples/preview/nextjs/package.json index c03896e2c3..c9bbdd1424 100644 --- a/examples/preview/nextjs/package.json +++ b/examples/preview/nextjs/package.json @@ -25,8 +25,8 @@ "@types/react": "18.0.21", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", + "@payloadcms/eslint-config": "^0.0.1", "eslint": "8.25.0", - "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-import": "2.25.4", diff --git a/examples/preview/nextjs/yarn.lock b/examples/preview/nextjs/yarn.lock index d837b1e7df..88f0aa9dd2 100644 --- a/examples/preview/nextjs/yarn.lock +++ b/examples/preview/nextjs/yarn.lock @@ -134,6 +134,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@payloadcms/eslint-config@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@payloadcms/eslint-config/-/eslint-config-0.0.1.tgz#4324702ddef6c773b3f3033795a13e6b50c95a92" + integrity sha512-Il59+0C4E/bI6uM2hont3I+oABWkJZbfbItubje5SGMrXkymUq8jT/UZRk0eCt918bB7gihxDXx8guFnR/aNIw== + "@swc/helpers@0.4.14": version "0.4.14" resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74" @@ -450,11 +455,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -confusing-browser-globals@^1.0.10: - version "1.0.11" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" - integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== - cookie@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" @@ -603,15 +603,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" - integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.2" - eslint-config-prettier@^8.5.0: version "8.6.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" @@ -1414,7 +1405,7 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.2, object.assign@^4.1.4: +object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -1424,15 +1415,6 @@ object.assign@^4.1.2, object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.2: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" - integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - object.values@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" diff --git a/examples/redirects/cms/.eslintrc.js b/examples/redirects/cms/.eslintrc.js new file mode 100644 index 0000000000..b69f00e730 --- /dev/null +++ b/examples/redirects/cms/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: ['@payloadcms'], +} diff --git a/examples/redirects/cms/.eslintrc.json b/examples/redirects/cms/.eslintrc.json deleted file mode 100644 index 5807323e5a..0000000000 --- a/examples/redirects/cms/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "quote-props": "disabled" -} diff --git a/examples/redirects/cms/.prettierrc.js b/examples/redirects/cms/.prettierrc.js new file mode 100644 index 0000000000..70c17c995f --- /dev/null +++ b/examples/redirects/cms/.prettierrc.js @@ -0,0 +1,8 @@ +module.exports = { + printWidth: 100, + parser: "typescript", + semi: false, + singleQuote: true, + trailingComma: "all", + arrowParens: "avoid", +}; diff --git a/examples/redirects/cms/package.json b/examples/redirects/cms/package.json index 9c27c7f77f..6fadaaf54d 100644 --- a/examples/redirects/cms/package.json +++ b/examples/redirects/cms/package.json @@ -12,7 +12,9 @@ "serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js", "copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/", "generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types", - "generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema" + "generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema", + "lint": "eslint src", + "lint:fix": "eslint --fix --ext .ts,.tsx src" }, "dependencies": { "@payloadcms/plugin-redirects": "^1.0.0", @@ -21,11 +23,24 @@ "payload": "^1.6.2" }, "devDependencies": { + "@types/node": "18.11.3", + "@types/react": "18.0.21", "@types/express": "^4.17.9", + "@typescript-eslint/eslint-plugin": "^5.51.0", + "@typescript-eslint/parser": "^5.51.0", + "@payloadcms/eslint-config": "^0.0.1", "copyfiles": "^2.4.1", "cross-env": "^7.0.3", + "eslint": "^8.19.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-filenames": "^1.3.2", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-simple-import-sort": "^10.0.0", "nodemon": "^2.0.6", + "prettier": "^2.7.1", "ts-node": "^9.1.1", - "typescript": "^4.1.3" + "typescript": "^4.8.4" } } diff --git a/examples/redirects/cms/src/collections/Pages.ts b/examples/redirects/cms/src/collections/Pages.ts index b901f97105..ef6b03a967 100644 --- a/examples/redirects/cms/src/collections/Pages.ts +++ b/examples/redirects/cms/src/collections/Pages.ts @@ -1,6 +1,7 @@ -import { CollectionConfig } from 'payload/types'; -import { slugField } from '../fields/slug'; -import richText from '../fields/richText'; +import type { CollectionConfig } from 'payload/types' + +import richText from '../fields/richText' +import { slugField } from '../fields/slug' export const Pages: CollectionConfig = { slug: 'pages', @@ -23,4 +24,4 @@ export const Pages: CollectionConfig = { richText(), slugField(), ], -}; +} diff --git a/examples/redirects/cms/src/collections/Users.ts b/examples/redirects/cms/src/collections/Users.ts index af4abbb72c..b92b1e2486 100644 --- a/examples/redirects/cms/src/collections/Users.ts +++ b/examples/redirects/cms/src/collections/Users.ts @@ -1,4 +1,4 @@ -import { CollectionConfig } from 'payload/types'; +import type { CollectionConfig } from 'payload/types' export const Users: CollectionConfig = { slug: 'users', @@ -7,4 +7,4 @@ export const Users: CollectionConfig = { useAsTitle: 'email', }, fields: [], -}; +} diff --git a/examples/redirects/cms/src/fields/link.ts b/examples/redirects/cms/src/fields/link.ts index 18c5f7afc3..8161fe2c96 100644 --- a/examples/redirects/cms/src/fields/link.ts +++ b/examples/redirects/cms/src/fields/link.ts @@ -1,5 +1,6 @@ -import { Field } from 'payload/types'; -import deepMerge from '../utilities/deepMerge'; +import type { Field } from 'payload/types' + +import deepMerge from '../utilities/deepMerge' export const appearanceOptions = { primary: { @@ -14,23 +15,17 @@ export const appearanceOptions = { label: 'Default', value: 'default', }, -}; +} export type LinkAppearances = 'primary' | 'secondary' | 'default' -type LinkType = ( - options?: { - appearances?: LinkAppearances[] | false - disableLabel?: boolean - overrides?: Record - } -) => Field; +type LinkType = (options?: { + appearances?: LinkAppearances[] | false + disableLabel?: boolean + overrides?: Record +}) => Field -const link: LinkType = ({ - appearances, - disableLabel = false, - overrides = {}, -} = {}) => { +const link: LinkType = ({ appearances, disableLabel = false, overrides = {} } = {}) => { let linkResult: Field = { name: 'link', type: 'group', @@ -68,13 +63,13 @@ const link: LinkType = ({ width: '50%', style: { alignSelf: 'flex-end', - } - } - } + }, + }, + }, ], }, ], - }; + } let linkTypes: Field[] = [ { @@ -100,8 +95,8 @@ const link: LinkType = ({ ] if (!disableLabel) { - linkTypes[0].admin.width = '50%'; - linkTypes[1].admin.width = '50%'; + linkTypes[0].admin.width = '50%' + linkTypes[1].admin.width = '50%' linkResult.fields.push({ type: 'row', @@ -114,15 +109,14 @@ const link: LinkType = ({ required: true, admin: { width: '50%', - } - } - ] + }, + }, + ], }) } else { - linkResult.fields = [...linkResult.fields, ...linkTypes]; + linkResult.fields = [...linkResult.fields, ...linkTypes] } - if (appearances !== false) { let appearanceOptionsToUse = [ appearanceOptions.default, @@ -131,7 +125,7 @@ const link: LinkType = ({ ] if (appearances) { - appearanceOptionsToUse = appearances.map((appearance) => appearanceOptions[appearance]) + appearanceOptionsToUse = appearances.map(appearance => appearanceOptions[appearance]) } linkResult.fields.push({ @@ -140,12 +134,12 @@ const link: LinkType = ({ defaultValue: 'default', options: appearanceOptionsToUse, admin: { - description: 'Choose how the link should be rendered.' - } - }); + description: 'Choose how the link should be rendered.', + }, + }) } - return deepMerge(linkResult, overrides); -}; + return deepMerge(linkResult, overrides) +} -export default link; +export default link diff --git a/examples/redirects/cms/src/fields/richText/elements.ts b/examples/redirects/cms/src/fields/richText/elements.ts index 5d428fdefa..657ed9e1ea 100644 --- a/examples/redirects/cms/src/fields/richText/elements.ts +++ b/examples/redirects/cms/src/fields/richText/elements.ts @@ -1,13 +1,5 @@ -import { RichTextElement } from 'payload/dist/fields/config/types'; +import type { RichTextElement } from 'payload/dist/fields/config/types' -const elements: RichTextElement[] = [ - 'blockquote', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'link', -]; +const elements: RichTextElement[] = ['blockquote', 'h2', 'h3', 'h4', 'h5', 'h6', 'link'] -export default elements; +export default elements diff --git a/examples/redirects/cms/src/fields/richText/index.ts b/examples/redirects/cms/src/fields/richText/index.ts index f49bbc3558..b000334c17 100644 --- a/examples/redirects/cms/src/fields/richText/index.ts +++ b/examples/redirects/cms/src/fields/richText/index.ts @@ -1,15 +1,16 @@ -import { RichTextElement, RichTextField, RichTextLeaf } from 'payload/dist/fields/config/types'; -import deepMerge from '../../utilities/deepMerge'; -import elements from './elements'; -import leaves from './leaves'; -import link from '../link'; +import type { RichTextElement, RichTextField, RichTextLeaf } from 'payload/dist/fields/config/types' + +import deepMerge from '../../utilities/deepMerge' +import link from '../link' +import elements from './elements' +import leaves from './leaves' type RichText = ( overrides?: Partial, additions?: { elements?: RichTextElement[] leaves?: RichTextLeaf[] - } + }, ) => RichTextField const richText: RichText = ( @@ -18,77 +19,68 @@ const richText: RichText = ( elements: [], leaves: [], }, -) => deepMerge>( - { - name: 'richText', - type: 'richText', - required: true, - admin: { - upload: { - collections: { - media: { - fields: [ - { - type: 'richText', - name: 'caption', - label: 'Caption', - admin: { - elements: [ - ...elements, - ], - leaves: [ - ...leaves, - ], - }, - }, - { - type: 'radio', - name: 'alignment', - label: 'Alignment', - options: [ - { - label: 'Left', - value: 'left', - }, - { - label: 'Center', - value: 'center', - }, - { - label: 'Right', - value: 'right', - }, - ], - }, - { - name: 'enableLink', - type: 'checkbox', - label: 'Enable Link', - }, - link({ - appearances: false, - disableLabel: true, - overrides: { +) => + deepMerge>( + { + name: 'richText', + type: 'richText', + required: true, + admin: { + upload: { + collections: { + media: { + fields: [ + { + type: 'richText', + name: 'caption', + label: 'Caption', admin: { - condition: (_, data) => Boolean(data?.enableLink), + elements: [...elements], + leaves: [...leaves], }, }, - }), - ], + { + type: 'radio', + name: 'alignment', + label: 'Alignment', + options: [ + { + label: 'Left', + value: 'left', + }, + { + label: 'Center', + value: 'center', + }, + { + label: 'Right', + value: 'right', + }, + ], + }, + { + name: 'enableLink', + type: 'checkbox', + label: 'Enable Link', + }, + link({ + appearances: false, + disableLabel: true, + overrides: { + admin: { + condition: (_, data) => Boolean(data?.enableLink), + }, + }, + }), + ], + }, }, }, + elements: [...elements, ...(additions.elements || [])], + leaves: [...leaves, ...(additions.leaves || [])], }, - elements: [ - ...elements, - ...additions.elements || [], - ], - leaves: [ - ...leaves, - ...additions.leaves || [], - ], }, - }, - overrides, -); + overrides, + ) -export default richText; +export default richText diff --git a/examples/redirects/cms/src/fields/richText/leaves.ts b/examples/redirects/cms/src/fields/richText/leaves.ts index 29235710ab..ed53cba185 100644 --- a/examples/redirects/cms/src/fields/richText/leaves.ts +++ b/examples/redirects/cms/src/fields/richText/leaves.ts @@ -1,9 +1,5 @@ -import { RichTextLeaf } from 'payload/dist/fields/config/types'; +import type { RichTextLeaf } from 'payload/dist/fields/config/types' -const defaultLeaves: RichTextLeaf[] = [ - 'bold', - 'italic', - 'underline', -]; +const defaultLeaves: RichTextLeaf[] = ['bold', 'italic', 'underline'] -export default defaultLeaves; +export default defaultLeaves diff --git a/examples/redirects/cms/src/fields/slug.ts b/examples/redirects/cms/src/fields/slug.ts index 6c85a69c17..6de6fceada 100644 --- a/examples/redirects/cms/src/fields/slug.ts +++ b/examples/redirects/cms/src/fields/slug.ts @@ -1,23 +1,23 @@ -import { Field } from 'payload/types'; -import formatSlug from '../utilities/formatSlug'; -import deepMerge from '../utilities/deepMerge'; +import type { Field } from 'payload/types' + +import deepMerge from '../utilities/deepMerge' +import formatSlug from '../utilities/formatSlug' type Slug = (fieldToUse?: string, overrides?: Partial) => Field -export const slugField: Slug = (fieldToUse = 'title', overrides) => deepMerge>( - { - name: 'slug', - label: 'Slug', - type: 'text', - index: true, - admin: { - position: 'sidebar', +export const slugField: Slug = (fieldToUse = 'title', overrides = {}) => + deepMerge>( + { + name: 'slug', + label: 'Slug', + type: 'text', + index: true, + admin: { + position: 'sidebar', + }, + hooks: { + beforeValidate: [formatSlug(fieldToUse)], + }, }, - hooks: { - beforeValidate: [ - formatSlug(fieldToUse), - ], - }, - }, - overrides, -); + overrides, + ) diff --git a/examples/redirects/cms/src/globals/MainMenu.ts b/examples/redirects/cms/src/globals/MainMenu.ts index 687c43ce3a..430039d0b5 100644 --- a/examples/redirects/cms/src/globals/MainMenu.ts +++ b/examples/redirects/cms/src/globals/MainMenu.ts @@ -1,5 +1,6 @@ -import { GlobalConfig } from "payload/types"; -import link from "../fields/link"; +import type { GlobalConfig } from 'payload/types' + +import link from '../fields/link' export const MainMenu: GlobalConfig = { slug: 'main-menu', @@ -15,7 +16,7 @@ export const MainMenu: GlobalConfig = { link({ appearances: false, }), - ] - } - ] -} \ No newline at end of file + ], + }, + ], +} diff --git a/examples/redirects/cms/src/payload-types.ts b/examples/redirects/cms/src/payload-types.ts index 9ee62e5a6d..792f4aa362 100644 --- a/examples/redirects/cms/src/payload-types.ts +++ b/examples/redirects/cms/src/payload-types.ts @@ -7,65 +7,65 @@ export interface Config { collections: { - pages: Page; - users: User; - redirects: Redirect; - }; + pages: Page + users: User + redirects: Redirect + } globals: { - 'main-menu': MainMenu; - }; + 'main-menu': MainMenu + } } export interface Page { - id: string; - title: string; - richText: { - [k: string]: unknown; - }[]; - slug?: string; - _status?: 'draft' | 'published'; - createdAt: string; - updatedAt: string; - password?: string; + id: string + title: string + richText: Array<{ + [k: string]: unknown + }> + slug?: string + _status?: 'draft' | 'published' + createdAt: string + updatedAt: string + password?: string } export interface User { - id: string; - email?: string; - resetPasswordToken?: string; - resetPasswordExpiration?: string; - loginAttempts?: number; - lockUntil?: string; - createdAt: string; - updatedAt: string; - password?: string; + id: string + email?: string + resetPasswordToken?: string + resetPasswordExpiration?: string + loginAttempts?: number + lockUntil?: string + createdAt: string + updatedAt: string + password?: string } export interface Redirect { - id: string; - from: string; + id: string + from: string to: { - type?: 'reference' | 'custom'; + type?: 'reference' | 'custom' reference: { - value: string | Page; - relationTo: 'pages'; - }; - url: string; - }; - createdAt: string; - updatedAt: string; - password?: string; + value: string | Page + relationTo: 'pages' + } + url: string + } + createdAt: string + updatedAt: string + password?: string } export interface MainMenu { - id: string; - navItems: { + id: string + navItems: Array<{ link: { - type?: 'reference' | 'custom'; - newTab?: boolean; + type?: 'reference' | 'custom' + newTab?: boolean reference: { - value: string | Page; - relationTo: 'pages'; - }; - url: string; - label: string; - }; - id?: string; - }[]; + value: string | Page + relationTo: 'pages' + } + url: string + label: string + } + id?: string + }> } diff --git a/examples/redirects/cms/src/payload.config.ts b/examples/redirects/cms/src/payload.config.ts index 6aef740c99..e3eb47bd14 100644 --- a/examples/redirects/cms/src/payload.config.ts +++ b/examples/redirects/cms/src/payload.config.ts @@ -1,30 +1,21 @@ -import { buildConfig } from 'payload/config'; -import redirects from '@payloadcms/plugin-redirects'; -import path from 'path'; -import { Users } from './collections/Users'; -import { Pages } from './collections/Pages'; -import { MainMenu } from './globals/MainMenu'; +import redirects from '@payloadcms/plugin-redirects' +import path from 'path' +import { buildConfig } from 'payload/config' + +import { Pages } from './collections/Pages' +import { Users } from './collections/Users' +import { MainMenu } from './globals/MainMenu' export default buildConfig({ - collections: [ - Pages, - Users, - ], - cors: [ - 'http://localhost:3000', - process.env.PAYLOAD_PUBLIC_SITE_URL, - ], - globals: [ - MainMenu, - ], + collections: [Pages, Users], + cors: ['http://localhost:3000', process.env.PAYLOAD_PUBLIC_SITE_URL], + globals: [MainMenu], typescript: { outputFile: path.resolve(__dirname, 'payload-types.ts'), }, plugins: [ redirects({ - collections: [ - 'pages', - ], + collections: ['pages'], }), ], -}); +}) diff --git a/examples/redirects/cms/src/seed/externalRedirect.ts b/examples/redirects/cms/src/seed/externalRedirect.ts index 77cdd2c6a3..b6871c6b67 100644 --- a/examples/redirects/cms/src/seed/externalRedirect.ts +++ b/examples/redirects/cms/src/seed/externalRedirect.ts @@ -1,12 +1,12 @@ -import { Redirect } from "../payload-types"; +import type { Redirect } from '../payload-types' export const externalRedirect: Partial = { - "from": "http://localhost:3000/redirect-to-external", - "to": { - "type": "custom", - "url": "https://www.payloadcms.com", + from: 'http://localhost:3000/redirect-to-external', + to: { + type: 'custom', + url: 'https://www.payloadcms.com', reference: null, }, - "createdAt": "2023-02-01T20:35:34.257Z", - "updatedAt": "2023-02-01T20:35:34.257Z" + createdAt: '2023-02-01T20:35:34.257Z', + updatedAt: '2023-02-01T20:35:34.257Z', } diff --git a/examples/redirects/cms/src/seed/home.ts b/examples/redirects/cms/src/seed/home.ts index 95c769be4a..d5b7db2b69 100644 --- a/examples/redirects/cms/src/seed/home.ts +++ b/examples/redirects/cms/src/seed/home.ts @@ -1,99 +1,99 @@ -import { Page } from "../payload-types"; +import type { Page } from '../payload-types' export const home: Partial = { - "title": "Home Page", - "slug": "home", - "richText": [ + title: 'Home Page', + slug: 'home', + richText: [ { - "children": [ + children: [ { - text: "This is a " + text: 'This is a ', }, { - "type": "link", - "linkType": "custom", - url: "https://nextjs.org/", - "children": [ + type: 'link', + linkType: 'custom', + url: 'https://nextjs.org/', + children: [ { - "text": "Next.js" - } - ] + text: 'Next.js', + }, + ], }, { - text: " app made explicitly for Payload's " + text: " app made explicitly for Payload's ", }, { - "type": "link", - "linkType": "custom", - url: "https://github.com/payloadcms/payload/tree/master/examples/redirects/cms", - "children": [ + type: 'link', + linkType: 'custom', + url: 'https://github.com/payloadcms/payload/tree/master/examples/redirects/cms', + children: [ { - "text": "Redirects Example" - } - ] + text: 'Redirects Example', + }, + ], }, { - text: ". This example demonstrates how to implement http redirects into Payload CMS using the official " + text: '. This example demonstrates how to implement http redirects into Payload CMS using the official ', }, { - "type": "link", - "linkType": "custom", - url: "https://github.com/payloadcms/plugin-redirects", - "children": [ + type: 'link', + linkType: 'custom', + url: 'https://github.com/payloadcms/plugin-redirects', + children: [ { - "text": "Redirects Plugin" - } - ] + text: 'Redirects Plugin', + }, + ], }, { - text: "." - } + text: '.', + }, ], }, { - "children": [ + children: [ { - "text": "Paste " + text: 'Paste ', }, { - "text": "http://localhost:3000/redirect-to-internal", - "bold": true + text: 'http://localhost:3000/redirect-to-internal', + bold: true, }, { - "text": " into your browser to be redirected to " + text: ' into your browser to be redirected to ', }, { - "type": "link", - "linkType": "internal", - "doc": { - "value": "{{REDIRECT_PAGE_ID}}", - "relationTo": "pages" + type: 'link', + linkType: 'internal', + doc: { + value: '{{REDIRECT_PAGE_ID}}', + relationTo: 'pages', }, - "children": [ + children: [ { - "text": "this page" - } - ] + text: 'this page', + }, + ], }, { - "text": ", or paste " + text: ', or paste ', }, { - "text": "http://localhost:3000/redirect-to-external", - "bold": true + text: 'http://localhost:3000/redirect-to-external', + bold: true, }, { - "text": " into your browser to be redirected to " + text: ' into your browser to be redirected to ', }, { - "text": "payloadcms.com", - "bold": true + text: 'payloadcms.com', + bold: true, }, { - "text": "." - } - ] + text: '.', + }, + ], }, ], - "_status": "published", -}; + _status: 'published', +} diff --git a/examples/redirects/cms/src/seed/index.ts b/examples/redirects/cms/src/seed/index.ts index 551272f3db..d0f0958ef8 100644 --- a/examples/redirects/cms/src/seed/index.ts +++ b/examples/redirects/cms/src/seed/index.ts @@ -1,47 +1,50 @@ -import { Payload } from 'payload'; -import { redirectPage } from './redirectPage'; -import { home } from './home'; -import { internalRedirect } from './internalRedirect'; -import { externalRedirect } from './externalRedirect'; +import type { Payload } from 'payload' -export const seed = async (payload: Payload) => { +import { externalRedirect } from './externalRedirect' +import { home } from './home' +import { internalRedirect } from './internalRedirect' +import { redirectPage } from './redirectPage' + +export const seed = async (payload: Payload): Promise => { await payload.create({ collection: 'users', data: { email: 'dev@payloadcms.com', password: 'test', }, - }); + }) - const redirectPageJSON = JSON.parse(JSON.stringify(redirectPage)); + const redirectPageJSON = JSON.parse(JSON.stringify(redirectPage)) const { id: redirectPageID } = await payload.create({ collection: 'pages', data: redirectPageJSON, - }); + }) - const internalRedirectJSON = JSON.parse(JSON.stringify(internalRedirect) - .replace(/{{REDIRECT_PAGE_ID}}/g, redirectPageID)); + const internalRedirectJSON = JSON.parse( + JSON.stringify(internalRedirect).replace(/{{REDIRECT_PAGE_ID}}/g, redirectPageID), + ) - await payload.create({ + await payload.create({ collection: 'redirects', data: internalRedirectJSON, }) - const externalRedirectJSON = JSON.parse(JSON.stringify(externalRedirect)); + const externalRedirectJSON = JSON.parse(JSON.stringify(externalRedirect)) await payload.create({ collection: 'redirects', data: externalRedirectJSON, }) - const homepageJSON = JSON.parse(JSON.stringify(home) - .replace(/{{REDIRECT_PAGE_ID}}/g, redirectPageID)); + const homepageJSON = JSON.parse( + JSON.stringify(home).replace(/{{REDIRECT_PAGE_ID}}/g, redirectPageID), + ) await payload.create({ collection: 'pages', data: homepageJSON, - }); + }) await payload.updateGlobal({ slug: 'main-menu', @@ -50,14 +53,15 @@ export const seed = async (payload: Payload) => { { link: { type: 'reference', + url: '', reference: { relationTo: 'pages', - value: redirectPageID + value: redirectPageID, }, label: 'Redirect Page', - } + }, }, - ] - } + ], + }, }) -}; +} diff --git a/examples/redirects/cms/src/seed/internalRedirect.ts b/examples/redirects/cms/src/seed/internalRedirect.ts index 7bc3997610..85e591a8b5 100644 --- a/examples/redirects/cms/src/seed/internalRedirect.ts +++ b/examples/redirects/cms/src/seed/internalRedirect.ts @@ -1,13 +1,13 @@ -import { Redirect } from "../payload-types"; +import type { Redirect } from '../payload-types' export const internalRedirect: Partial = { - "from": "http://localhost:3000/redirect-to-internal", - "to": { - "type": "reference", - "reference": { - "value": "{{REDIRECT_PAGE_ID}}", - "relationTo": "pages" + from: 'http://localhost:3000/redirect-to-internal', + to: { + type: 'reference', + reference: { + value: '{{REDIRECT_PAGE_ID}}', + relationTo: 'pages', }, - url: "" + url: '', }, -}; +} diff --git a/examples/redirects/cms/src/seed/redirectPage.ts b/examples/redirects/cms/src/seed/redirectPage.ts index 57212ada57..f51d56c3d9 100644 --- a/examples/redirects/cms/src/seed/redirectPage.ts +++ b/examples/redirects/cms/src/seed/redirectPage.ts @@ -1,30 +1,30 @@ -import { Page } from "../payload-types"; +import type { Page } from '../payload-types' export const redirectPage: Partial = { - "title": "Redirect Page", - "slug": "redirected", - "richText": [ + title: 'Redirect Page', + slug: 'redirected', + richText: [ { - "children": [ + children: [ { - "text": "You have been successfully redirected to this page if you navigated from " + text: 'You have been successfully redirected to this page if you navigated from ', }, { - "text": "http://localhost:3000/redirect-to-internal", - "bold": true + text: 'http://localhost:3000/redirect-to-internal', + bold: true, }, { - "text": "." - } - ] + text: '.', + }, + ], }, { - "children": [ + children: [ { - "text": "" - } - ] + text: '', + }, + ], }, ], - "_status": "published", -}; + _status: 'published', +} diff --git a/examples/redirects/cms/src/server.ts b/examples/redirects/cms/src/server.ts index 94ed28ba88..e35f0f0f4b 100644 --- a/examples/redirects/cms/src/server.ts +++ b/examples/redirects/cms/src/server.ts @@ -1,35 +1,37 @@ -import path from 'path'; -import express from 'express'; -import payload from 'payload'; -import { seed } from './seed'; +import express from 'express' +import path from 'path' +import payload from 'payload' +import { seed } from './seed' + +// eslint-disable-next-line require('dotenv').config({ path: path.resolve(__dirname, '../.env'), -}); +}) -const app = express(); +const app = express() // Redirect root to Admin panel app.get('/', (_, res) => { - res.redirect('/admin'); -}); + res.redirect('/admin') +}) -const start = async () => { +const start = async (): Promise => { await payload.init({ secret: process.env.PAYLOAD_SECRET, mongoURL: process.env.MONGODB_URI, express: app, onInit: () => { - payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`); + payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`) }, - }); + }) if (process.env.PAYLOAD_SEED === 'true') { - payload.logger.info('---- SEEDING DATABASE ----'); - await seed(payload); + payload.logger.info('---- SEEDING DATABASE ----') + await seed(payload) } - app.listen(8000); -}; + app.listen(8000) +} -start(); +start() diff --git a/examples/redirects/cms/src/utilities/deepMerge.ts b/examples/redirects/cms/src/utilities/deepMerge.ts index 4060879202..7dd1ecb1ab 100644 --- a/examples/redirects/cms/src/utilities/deepMerge.ts +++ b/examples/redirects/cms/src/utilities/deepMerge.ts @@ -6,7 +6,7 @@ * @returns {boolean} */ export function isObject(item: unknown): boolean { - return (item && typeof item === 'object' && !Array.isArray(item)); + return item && typeof item === 'object' && !Array.isArray(item) } /** @@ -15,20 +15,20 @@ export function isObject(item: unknown): boolean { * @param ...sources */ export default function deepMerge(target: T, source: R): T { - const output = { ...target }; + const output = { ...target } if (isObject(target) && isObject(source)) { - Object.keys(source).forEach((key) => { + Object.keys(source).forEach(key => { if (isObject(source[key])) { if (!(key in target)) { - Object.assign(output, { [key]: source[key] }); + Object.assign(output, { [key]: source[key] }) } else { - output[key] = deepMerge(target[key], source[key]); + output[key] = deepMerge(target[key], source[key]) } } else { - Object.assign(output, { [key]: source[key] }); + Object.assign(output, { [key]: source[key] }) } - }); + }) } - return output; + return output } diff --git a/examples/redirects/cms/src/utilities/formatSlug.ts b/examples/redirects/cms/src/utilities/formatSlug.ts index 5e2a7f9338..bb33fc1f54 100644 --- a/examples/redirects/cms/src/utilities/formatSlug.ts +++ b/examples/redirects/cms/src/utilities/formatSlug.ts @@ -1,21 +1,27 @@ -import { FieldHook } from 'payload/types'; +import type { FieldHook } from 'payload/types' -const format = (val: string): string => val.replace(/ /g, '-').replace(/[^\w-]+/g, '').toLowerCase(); +const format = (val: string): string => + val + .replace(/ /g, '-') + .replace(/[^\w-]+/g, '') + .toLowerCase() -const formatSlug = (fallback: string): FieldHook => ({ operation, value, originalDoc, data }) => { - if (typeof value === 'string') { - return format(value); - } - - if (operation === 'create') { - const fallbackData = (data && data[fallback]) || (originalDoc && originalDoc[fallback]); - - if (fallbackData && typeof fallbackData === 'string') { - return format(fallbackData); +const formatSlug = + (fallback: string): FieldHook => + ({ operation, value, originalDoc, data }) => { + if (typeof value === 'string') { + return format(value) } + + if (operation === 'create') { + const fallbackData = data?.[fallback] || originalDoc?.[fallback] + + if (fallbackData && typeof fallbackData === 'string') { + return format(fallbackData) + } + } + + return value } - return value; -}; - -export default formatSlug; +export default formatSlug diff --git a/examples/redirects/cms/yarn.lock b/examples/redirects/cms/yarn.lock index bd6febd2bf..64cfb99f7c 100644 --- a/examples/redirects/cms/yarn.lock +++ b/examples/redirects/cms/yarn.lock @@ -292,6 +292,21 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== +"@eslint/eslintrc@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" + integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.4.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + "@faceless-ui/modal@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@faceless-ui/modal/-/modal-2.0.1.tgz#8a47299442eff450c09432cfaef35c5471becad6" @@ -324,6 +339,25 @@ dependencies: "@hapi/hoek" "^9.0.0" +"@humanwhocodes/config-array@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" + integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@hypnosphi/create-react-context@^0.3.1": version "0.3.1" resolved "https://registry.yarnpkg.com/@hypnosphi/create-react-context/-/create-react-context-0.3.1.tgz#f8bfebdc7665f5d426cba3753e0e9c7d3154d7c6" @@ -392,6 +426,32 @@ "@monaco-editor/loader" "^1.3.2" prop-types "^15.7.2" +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@payloadcms/eslint-config@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@payloadcms/eslint-config/-/eslint-config-0.0.1.tgz#4324702ddef6c773b3f3033795a13e6b50c95a92" + integrity sha512-Il59+0C4E/bI6uM2hont3I+oABWkJZbfbItubje5SGMrXkymUq8jT/UZRk0eCt918bB7gihxDXx8guFnR/aNIw== + "@payloadcms/plugin-redirects@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@payloadcms/plugin-redirects/-/plugin-redirects-1.0.0.tgz#e03243cb0582b9305cac9cc3ef571a9c0beb1665" @@ -595,6 +655,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/lodash@^4.14.149", "@types/lodash@^4.14.182": version "4.14.191" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa" @@ -615,6 +680,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.19.tgz#35e26df9ec441ab99d73e99e9aca82935eea216d" integrity sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw== +"@types/node@18.11.3": + version "18.11.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.3.tgz#78a6d7ec962b596fc2d2ec102c4dd3ef073fea6a" + integrity sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A== + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -659,11 +729,25 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@18.0.21": + version "18.0.21" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.21.tgz#b8209e9626bb00a34c76f55482697edd2b43cc67" + integrity sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/semver@^7.3.12": + version "7.3.13" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" + integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== + "@types/serve-static@*": version "1.15.0" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.0.tgz#c7930ff61afb334e121a9da780aac0d9b8f34155" @@ -692,6 +776,90 @@ "@types/node" "*" "@types/webidl-conversions" "*" +"@typescript-eslint/eslint-plugin@^5.51.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz#5fb0d43574c2411f16ea80f5fc335b8eaa7b28a8" + integrity sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg== + dependencies: + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/type-utils" "5.52.0" + "@typescript-eslint/utils" "5.52.0" + debug "^4.3.4" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@^5.51.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.52.0.tgz#73c136df6c0133f1d7870de7131ccf356f5be5a4" + integrity sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA== + dependencies: + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/typescript-estree" "5.52.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz#a993d89a0556ea16811db48eabd7c5b72dcb83d1" + integrity sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw== + dependencies: + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/visitor-keys" "5.52.0" + +"@typescript-eslint/type-utils@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz#9fd28cd02e6f21f5109e35496df41893f33167aa" + integrity sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw== + dependencies: + "@typescript-eslint/typescript-estree" "5.52.0" + "@typescript-eslint/utils" "5.52.0" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.52.0.tgz#19e9abc6afb5bd37a1a9bea877a1a836c0b3241b" + integrity sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ== + +"@typescript-eslint/typescript-estree@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz#6408cb3c2ccc01c03c278cb201cf07e73347dfca" + integrity sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ== + dependencies: + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/visitor-keys" "5.52.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.52.0.tgz#b260bb5a8f6b00a0ed51db66bdba4ed5e4845a72" + integrity sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/typescript-estree" "5.52.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + +"@typescript-eslint/visitor-keys@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz#e38c971259f44f80cfe49d97dbffa38e3e75030f" + integrity sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA== + dependencies: + "@typescript-eslint/types" "5.52.0" + eslint-visitor-keys "^3.3.0" + "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" @@ -865,12 +1033,17 @@ acorn-import-assertions@^1.7.6: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + acorn-walk@^8.0.0: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1: +acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.0: version "8.8.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== @@ -894,7 +1067,7 @@ ajv-keywords@^5.0.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -966,6 +1139,32 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== +array-includes@^3.1.4: + version "3.1.6" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" + integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + get-intrinsic "^1.1.3" + is-string "^1.0.7" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.flat@^1.2.5: + version "1.3.1" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" + integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + atomic-sleep@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" @@ -1095,7 +1294,7 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@~3.0.2: +braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -1217,7 +1416,7 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1511,7 +1710,7 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@^7.0.1, cross-spawn@^7.0.3: +cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1719,7 +1918,7 @@ debounce-fn@^4.0.0: dependencies: mimic-fn "^3.0.0" -debug@2, debug@2.6.9: +debug@2, debug@2.6.9, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -1733,7 +1932,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4.x: +debug@4.x, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1794,6 +1993,11 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + deepmerge@^4.0.0, deepmerge@^4.2.2: version "4.3.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.0.tgz#65491893ec47756d44719ae520e0e2609233b59b" @@ -1837,11 +2041,32 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + direction@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/direction/-/direction-1.0.4.tgz#2b86fb686967e987088caf8b89059370d4837442" integrity sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ== +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" @@ -1989,6 +2214,45 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.19.0, es-abstract@^1.20.4: + version "1.21.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" + integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.3" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.4" + is-array-buffer "^3.0.1" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.10" + is-weakref "^1.0.2" + object-inspect "^1.12.2" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.4.3" + safe-regex-test "^1.0.0" + string.prototype.trimend "^1.0.6" + string.prototype.trimstart "^1.0.6" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.9" + es-get-iterator@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -2009,6 +2273,31 @@ es-module-lexer@^0.9.0: resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: version "0.10.62" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" @@ -2060,7 +2349,79 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -eslint-scope@5.1.1: +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-prettier@^8.5.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" + integrity sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA== + +eslint-import-resolver-node@^0.3.6: + version "0.3.7" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" + integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== + dependencies: + debug "^3.2.7" + is-core-module "^2.11.0" + resolve "^1.22.1" + +eslint-module-utils@^2.7.2: + version "2.7.4" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== + dependencies: + debug "^3.2.7" + +eslint-plugin-filenames@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz#7094f00d7aefdd6999e3ac19f72cea058e590cf7" + integrity sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w== + dependencies: + lodash.camelcase "4.3.0" + lodash.kebabcase "4.1.1" + lodash.snakecase "4.1.1" + lodash.upperfirst "4.3.1" + +eslint-plugin-import@2.25.4: + version "2.25.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" + integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.2" + has "^1.0.3" + is-core-module "^2.8.0" + is-glob "^4.0.3" + minimatch "^3.0.4" + object.values "^1.1.5" + resolve "^1.20.0" + tsconfig-paths "^3.12.0" + +eslint-plugin-prettier@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-react-hooks@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== + +eslint-plugin-simple-import-sort@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz#cc4ceaa81ba73252427062705b64321946f61351" + integrity sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw== + +eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -2068,6 +2429,92 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.19.0: + version "8.34.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.34.0.tgz#fe0ab0ef478104c1f9ebc5537e303d25a8fb22d6" + integrity sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg== + dependencies: + "@eslint/eslintrc" "^1.4.1" + "@humanwhocodes/config-array" "^0.11.8" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.4.0" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-sdsl "^4.1.4" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + +espree@^9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" + integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + +esquery@^1.4.0: + version "1.4.2" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.2.tgz#c6d3fee05dd665808e2ad870631f221f5617b1d1" + integrity sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -2080,11 +2527,16 @@ estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.2.0: +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" @@ -2189,11 +2641,32 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-glob@^3.2.9: + version "3.2.12" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fast-redact@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.1.2.tgz#d58e69e9084ce9fa4c1a6fa98a3e1ecf5d7839aa" @@ -2209,6 +2682,20 @@ fastest-levenshtein@^1.0.12: resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + file-loader@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" @@ -2266,6 +2753,22 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + flatley@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/flatley/-/flatley-5.2.0.tgz#3a645837c669be8d978335e37ae3afffcfbdedb7" @@ -2278,6 +2781,11 @@ flatstr@^1.0.12: resolved "https://registry.yarnpkg.com/flatstr/-/flatstr-1.0.12.tgz#c2ba6a08173edbb6c9640e3055b95e287ceb5931" integrity sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw== +flatted@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + focus-trap@^6.9.2: version "6.9.4" resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-6.9.4.tgz#436da1a1d935c48b97da63cd8f361c6f3aa16444" @@ -2341,6 +2849,16 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + functions-have-names@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -2370,18 +2888,33 @@ get-stdin@^8.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + github-from-package@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== -glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-promise@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/glob-promise/-/glob-promise-4.2.2.tgz#15f44bcba0e14219cd93af36da6bb905ff007877" @@ -2394,7 +2927,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.0.5, glob@^7.1.6: +glob@^7.0.5, glob@^7.1.3, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -2417,6 +2950,32 @@ glob@^8.0.0: minimatch "^5.0.1" once "^1.3.0" +globals@^13.19.0: + version "13.20.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" + integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== + dependencies: + type-fest "^0.20.2" + +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -2429,6 +2988,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + graphql-playground-html@^1.6.30: version "1.6.30" resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.6.30.tgz#14c2a8eb7fc17bfeb1a746bbb28a11e34bf0b391" @@ -2479,7 +3043,7 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" -has-bigints@^1.0.1: +has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== @@ -2501,6 +3065,11 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -2666,6 +3235,11 @@ ignore-by-default@^1.0.1: resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== +ignore@^5.2.0: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + immer@^9.0.6: version "9.0.19" resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.19.tgz#67fb97310555690b5f9cd8380d38fc0aabb6b38b" @@ -2676,7 +3250,7 @@ immutable@^4.0.0: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.2.3.tgz#a203cdda37a5a30bc351b982a1794c1930198815" integrity sha512-IHpmvaOIX4VLJwPOuQr1NpeBr2ZG6vpIj3blsLVxXRWJscLioaJRStqC+NcBsLeCDsnGlPpXd5/WZmnE7MbsKA== -import-fresh@^3.1.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -2692,6 +3266,11 @@ import-local@^3.0.2: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -2788,12 +3367,12 @@ is-buffer@^1.1.6, is-buffer@~1.1.6: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.3: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.9.0: +is-core-module@^2.11.0, is-core-module@^2.8.0, is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== @@ -2817,7 +3396,7 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -2839,6 +3418,11 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" @@ -2856,6 +3440,11 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -2900,14 +3489,14 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-symbol@^1.0.3: +is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10: +is-typed-array@^1.1.10, is-typed-array@^1.1.9: version "1.1.10" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== @@ -2923,6 +3512,13 @@ is-weakmap@^2.0.1: resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-weakset@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" @@ -2989,6 +3585,11 @@ joycon@^3.1.1: resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== +js-sdsl@^4.1.4: + version "4.3.0" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711" + integrity sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3041,6 +3642,18 @@ json-schema-typed@^7.0.3: resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-7.0.3.tgz#23ff481b8b4eebcd2ca123b4fa0409e66469a2d9" integrity sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A== +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + json5@^2.1.2: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -3102,6 +3715,14 @@ klona@^2.0.4, klona@^2.0.5: resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + lilconfig@^2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" @@ -3141,6 +3762,18 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.camelcase@4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -3151,16 +3784,36 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== +lodash.kebabcase@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g== + lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.snakecase@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== +lodash.upperfirst@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== + lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -3274,6 +3927,11 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + method-override@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/method-override/-/method-override-3.0.0.tgz#6ab0d5d574e3208f15b0c9cf45ab52000468d7a2" @@ -3294,6 +3952,14 @@ micro-memoize@^4.0.14: resolved "https://registry.yarnpkg.com/micro-memoize/-/micro-memoize-4.0.14.tgz#d1239ce2e5831125ac518509f5a23b54e7ca3e17" integrity sha512-2tzWP1w2Hh+r7kCYa4f//jpBEA6dAueiuLco38NxfjF9Py3KCCI7wVOTdCvOhmTC043t+ulclVBdl3v+s+UJIQ== +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -3335,7 +4001,7 @@ mini-css-extract-plugin@1.6.2: schema-utils "^3.0.0" webpack-sources "^1.1.0" -minimatch@^3.0.3, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -3458,6 +4124,16 @@ napi-build-utils@^1.0.1: resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + needle@^2.5.2: version "2.9.1" resolved "https://registry.yarnpkg.com/needle/-/needle-2.9.1.tgz#22d1dffbe3490c2b83e301f7709b6736cd8f2684" @@ -3577,7 +4253,7 @@ object-assign@^4.0.1, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-inspect@^1.9.0: +object-inspect@^1.12.2, object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== @@ -3610,6 +4286,15 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.values@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" + integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + on-exit-leak-free@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz#5c703c968f7e7f851885f6459bf8a8a57edc9cc4" @@ -3646,6 +4331,18 @@ opener@^1.5.2: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -3658,6 +4355,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -3672,6 +4376,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -3945,7 +4656,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -4537,11 +5248,28 @@ prebuild-install@^7.1.1: tar-fs "^2.0.0" tunnel-agent "^0.6.0" +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier@^2.6.2: version "2.8.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== +prettier@^2.7.1: + version "2.8.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" + integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== + pretty-error@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-4.0.0.tgz#90a703f46dd7234adb46d0f84823e9d1cb8f10d6" @@ -4628,6 +5356,11 @@ qs@~6.4.0: resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.1.tgz#2bad97710a5b661c366b378b1e3a44a592ff45e6" integrity sha512-LQy1Q1fcva/UsnP/6Iaa4lVeM49WiOitu2T4hZCyA/elLKu37L99qcBJk4VCCk+rdLvnMzfKyiN3SZTqdAZGSQ== +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + quick-format-unescaped@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" @@ -4952,6 +5685,11 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + relateurl@^0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" @@ -5000,7 +5738,7 @@ resolve-pathname@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== -resolve@^1.12.0, resolve@^1.9.0: +resolve@^1.12.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.9.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -5009,6 +5747,25 @@ resolve@^1.12.0, resolve@^1.9.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -5019,6 +5776,15 @@ safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -5108,7 +5874,7 @@ semver@^5.7.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^7.3.5, semver@^7.3.8: +semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: version "7.3.8" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== @@ -5245,6 +6011,11 @@ sirv@^1.0.7: mrmime "^1.0.0" totalist "^1.0.0" +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slate-history@^0.86.0: version "0.86.0" resolved "https://registry.yarnpkg.com/slate-history/-/slate-history-0.86.0.tgz#5554612271d2fc1018a7918be3961bb66e620c58" @@ -5398,6 +6169,24 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string.prototype.trimend@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" + integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimstart@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" + integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -5424,7 +6213,12 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-json-comments@^3.1.1: +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -5559,6 +6353,11 @@ terser@^5.10.0, terser@^5.14.1: commander "^2.20.0" source-map-support "~0.5.20" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" @@ -5682,6 +6481,21 @@ ts-node@^9.1.1: source-map-support "^0.5.17" yn "3.1.1" +tsconfig-paths@^3.12.0: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + tslib@^2.0.0, tslib@^2.0.3: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" @@ -5692,6 +6506,13 @@ tslib@~2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -5699,6 +6520,18 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -5717,16 +6550,35 @@ type@^2.7.2: resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + typed-styles@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/typed-styles/-/typed-styles-0.0.7.tgz#93392a008794c4595119ff62dde6809dbc40a3d9" integrity sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q== -typescript@^4.1.3: +typescript@^4.8.4: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + undefsafe@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" @@ -6017,6 +6869,11 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -6086,3 +6943,8 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/examples/redirects/nextjs/.env.example b/examples/redirects/nextjs/.env.example index 0971981f03..d847bb1350 100644 --- a/examples/redirects/nextjs/.env.example +++ b/examples/redirects/nextjs/.env.example @@ -1,3 +1,2 @@ NEXT_PUBLIC_APP_URL=http://localhost:3000 NEXT_PUBLIC_CMS_URL=http://localhost:8000 -NEXT_PUBLIC_OFFLINE_MODE=true diff --git a/examples/redirects/nextjs/.eslintrc.js b/examples/redirects/nextjs/.eslintrc.js new file mode 100644 index 0000000000..bfbefd5afa --- /dev/null +++ b/examples/redirects/nextjs/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: ['plugin:@next/next/recommended', '@payloadcms'], +} diff --git a/examples/redirects/nextjs/.eslintrc.json b/examples/redirects/nextjs/.eslintrc.json deleted file mode 100644 index bffb357a71..0000000000 --- a/examples/redirects/nextjs/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/examples/redirects/nextjs/.prettierrc.js b/examples/redirects/nextjs/.prettierrc.js new file mode 100644 index 0000000000..70c17c995f --- /dev/null +++ b/examples/redirects/nextjs/.prettierrc.js @@ -0,0 +1,8 @@ +module.exports = { + printWidth: 100, + parser: "typescript", + semi: false, + singleQuote: true, + trailingComma: "all", + arrowParens: "avoid", +}; diff --git a/examples/redirects/nextjs/components/Button/index.tsx b/examples/redirects/nextjs/components/Button/index.tsx index 7b69672733..8eefbebd34 100644 --- a/examples/redirects/nextjs/components/Button/index.tsx +++ b/examples/redirects/nextjs/components/Button/index.tsx @@ -1,6 +1,7 @@ -import Link from 'next/link'; -import React from 'react'; -import classes from './index.module.scss'; +import React from 'react' +import Link from 'next/link' + +import classes from './index.module.scss' export type Props = { label: string @@ -24,19 +25,23 @@ export const Button: React.FC = ({ newTab, href, appearance, - className: classNameFromProps + className: classNameFromProps, }) => { - const Element = elements[el]; - const className = [classNameFromProps, classes[`appearance--${appearance}`], classes.button].filter(Boolean).join(' '); + const Element = elements[el] + const className = [classNameFromProps, classes[`appearance--${appearance}`], classes.button] + .filter(Boolean) + .join(' ') return ( {label} diff --git a/examples/redirects/nextjs/components/CMSLink/index.tsx b/examples/redirects/nextjs/components/CMSLink/index.tsx index fe70b732cc..b271641637 100644 --- a/examples/redirects/nextjs/components/CMSLink/index.tsx +++ b/examples/redirects/nextjs/components/CMSLink/index.tsx @@ -1,7 +1,8 @@ -import Link from 'next/link'; -import React from 'react'; -import { Page } from '../../payload-types'; -import { Button } from '../Button'; +import React from 'react' +import Link from 'next/link' + +import { Page } from '../../payload-types' +import { Button } from '../Button' type CMSLinkType = { type?: 'custom' | 'reference' @@ -27,10 +28,13 @@ export const CMSLink: React.FC = ({ children, className, }) => { - const href = (type === 'reference' && typeof reference?.value === 'object' && reference.value.slug) ? `/${reference.value.slug}` : url; + const href = + type === 'reference' && typeof reference?.value === 'object' && reference.value.slug + ? `/${reference.value.slug}` + : url if (!appearance) { - const newTabProps = newTab ? { target: '_blank', rel: 'noopener noreferrer' } : {}; + const newTabProps = newTab ? { target: '_blank', rel: 'noopener noreferrer' } : {} if (type === 'custom') { return ( @@ -43,11 +47,7 @@ export const CMSLink: React.FC = ({ if (href) { return ( - + {label && label} {children && children} @@ -62,7 +62,5 @@ export const CMSLink: React.FC = ({ label, } - return ( -