Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed Apr 17, 2024
1 parent 24d070f commit 0e699b4
Show file tree
Hide file tree
Showing 120 changed files with 4,512 additions and 5,532 deletions.
38 changes: 0 additions & 38 deletions .eslintignore

This file was deleted.

54 changes: 0 additions & 54 deletions .eslintrc.js

This file was deleted.

183 changes: 183 additions & 0 deletions eslint.config.js
@@ -0,0 +1,183 @@
const globals = require('globals');
const { parserOptions, ...moon } = require('eslint-config-moon');
// const moonNode = require('eslint-config-moon/node');

const brokenRules = [
'unicorn/import-index',
'import/no-mutable-exports',
'import/newline-after-import',
'promise/no-return-wrap',
'import/no-commonjs',
'promise/no-nesting',
'promise/no-multiple-resolved',
'promise/no-promise-in-callback',
'import/no-amd',
];

function flattenConfig({
plugins = [],
parserOptions,
parser,
extends: configs,
env,
globals,
reportUnusedDisableDirectives,
overrides,
rules,
...rest
}) {
if (rules) {
for (const rule of brokenRules) {
if (rules[rule]) {
delete rules[rule];
}
}
}
return [
...(configs?.flatMap((config) =>
flattenConfig(config.startsWith('/') ? require(config) : require(`eslint-config-${config}`)),
) ?? []),
{
plugins: plugins.reduce(
(obj, plugin) => ({
...obj,
[plugin]: plugin.startsWith('@')
? require(plugin.slice(1)).plugin
: require(`eslint-plugin-${plugin}`),
}),
{},
),
linterOptions: {
reportUnusedDisableDirectives: true,
},

languageOptions: {
parser: require('@typescript-eslint/parser'),
parserOptions: {
...parserOptions,
tsconfigRootDir: __dirname,
project: 'tsconfig.eslint.json',
},
globals: { ...globals },
},
rules: {
...rules,
},
...rest,
},
...(overrides ?? []).flatMap((override) => flattenConfig(override)),
];
}
const ignores = [
'.*.js',
'.turbo',
'*.generated.ts',
'*.generated.ts',
'*.generated.tsx',
'*.tsbuildinfo',
'**/*.d.cts',
'**/*.d.mts',
'**/*.d.ts',
'**/*.map',
'**/*.min.js',
'**/*.snap',
'**/build/',
'**/cjs/',
'**/coverage/',
'**/dist/',
'**/dts/',
'**/esm/',
'**/lib/',
'**/mjs/',
'**/node_modules/',
'**/umd/',
'eslint.config.js',
'examples/*/prisma',
'examples/*/prisma/generated.ts',
'generated.ts',
'packages/*/prisma',
'packages/*/tests/generated.ts',
'packages/deno/',
'packages/plugin-prisma-utils/bin/generator.js',
'packages/plugin-prisma-utils/tests/client',
'packages/plugin-prisma/bin/generator.js',
'packages/plugin-prisma/prisma',
'packages/plugin-prisma/tests/client',
'packages/plugin-prisma/tests/generated.ts',
'scripts',
'tests/client/*',
'website/public',
'website/tailwind.config.js',
'website/util/search-index.js',
];

module.exports = [
{
ignores,
},
...flattenConfig(moon),
// moonNode,
{
linterOptions: {
reportUnusedDisableDirectives: true,
},
languageOptions: {
parser: require('@typescript-eslint/parser'),
parserOptions: {
...parserOptions,
tsconfigRootDir: __dirname,
project: 'tsconfig.eslint.json',
},
globals: {
...globals.node,
},
},
rules: {
'import/no-cycle': 2,
'import/no-unresolved': 'off',
'import/no-default-export': 'off',
'sort-keys': 'off',
'promise/prefer-await-to-callbacks': 'off',
'node/no-unpublished-import': 'off',
'promise/prefer-await-to-then': 'off',
complexity: 'off',
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/sort-type-union-intersection-members': 'off',
'@typescript-eslint/key-spacing': 'off',
},
},
{
files: ['{packages,examples,website}/**/*.js', '{packages,examples,website}/**/*.mjs'],

rules: {
'import/no-commonjs': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
},
},
{
files: ['packages/*/tests/**/*'],

rules: {
'no-magic-numbers': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
{
files: ['packages/*/tests/examples?/**/*', 'examples/**/*'],

rules: {
'no-console': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-misused-promises': 'off',
},
},
];
24 changes: 12 additions & 12 deletions examples/complex-app/package.json
Expand Up @@ -16,7 +16,7 @@
"seed": "tsx prisma/seed.ts"
},
"dependencies": {
"@faker-js/faker": "^8.3.1",
"@faker-js/faker": "^8.4.1",
"@graphql-typed-document-node/core": "^3.2.0",
"@pothos/core": "^3.40.1",
"@pothos/plugin-dataloader": "workspace:*",
Expand All @@ -26,24 +26,24 @@
"@pothos/plugin-scope-auth": "workspace:*",
"@pothos/plugin-simple-objects": "workspace:*",
"@pothos/plugin-validation": "workspace:*",
"@prisma/client": "^5.6.0",
"@prisma/client": "^5.12.1",
"graphql": "16.8.1",
"graphql-scalars": "^1.22.4",
"graphql-yoga": "5.0.1",
"prisma": "^5.6.0",
"graphql-scalars": "^1.23.0",
"graphql-yoga": "5.3.0",
"prisma": "^5.12.1",
"react": "^18.2.0",
"urql": "^4.0.6",
"urql": "^4.0.7",
"zod": "^3.22.4"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@graphql-codegen/introspection": "4.0.0",
"@graphql-codegen/schema-ast": "^4.0.0",
"@types/node": "^20.10.1",
"typescript": "^5.3.2"
"@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/client-preset": "4.2.5",
"@graphql-codegen/introspection": "4.0.3",
"@graphql-codegen/schema-ast": "^4.0.2",
"@types/node": "^20.12.7",
"typescript": "^5.4.5"
}
}
4 changes: 2 additions & 2 deletions examples/envelope-helix-fastify/package.json
Expand Up @@ -10,9 +10,9 @@
},
"dependencies": {
"@envelop/core": "^5.0.0",
"@faker-js/faker": "^8.3.1",
"@faker-js/faker": "^8.4.1",
"@pothos/core": "workspace:*",
"fastify": "^4.24.3",
"fastify": "^4.26.2",
"graphql": "16.8.1",
"graphql-helix": "^1.13.0"
},
Expand Down
12 changes: 6 additions & 6 deletions examples/federation/package.json
Expand Up @@ -14,16 +14,16 @@
"seed": "node -r @swc-node/register prisma/seed.ts"
},
"dependencies": {
"@apollo/gateway": "2.6.1",
"@apollo/server": "^4.9.5",
"@apollo/subgraph": "2.6.1",
"@faker-js/faker": "^8.3.1",
"@apollo/gateway": "2.7.2",
"@apollo/server": "^4.10.2",
"@apollo/subgraph": "2.7.2",
"@faker-js/faker": "^8.4.1",
"@pothos/core": "workspace:*",
"@pothos/plugin-directives": "workspace:*",
"@pothos/plugin-federation": "workspace:*",
"@prisma/client": "^5.6.0",
"@prisma/client": "^5.12.1",
"graphql": "16.8.1",
"prisma": "^5.6.0"
"prisma": "^5.12.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions examples/graphql-shield/package.json
Expand Up @@ -9,12 +9,12 @@
"type": "tsc --noEmit"
},
"dependencies": {
"@faker-js/faker": "^8.3.1",
"@faker-js/faker": "^8.4.1",
"@pothos/core": "workspace:*",
"graphql": "16.8.1",
"graphql-middleware": "^6.1.35",
"graphql-shield": "^7.6.5",
"graphql-yoga": "5.0.1"
"graphql-yoga": "5.3.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion examples/helix/package.json
Expand Up @@ -9,7 +9,7 @@
"type": "tsc --noEmit"
},
"dependencies": {
"@faker-js/faker": "^8.3.1",
"@faker-js/faker": "^8.4.1",
"@pothos/core": "workspace:*",
"graphql": "16.8.1",
"graphql-helix": "^1.13.0"
Expand Down
5 changes: 1 addition & 4 deletions examples/nextjs/codegen.yml
@@ -1,10 +1,7 @@
overwrite: true
schema: graphql/build-schema.js
schema: schema.graphql
documents: 'components/**/!(*.generated).tsx'
generates:
schema.graphql:
plugins:
- schema-ast
components/__generated__/types.generated.ts:
plugins:
- typescript
Expand Down

0 comments on commit 0e699b4

Please sign in to comment.