@graphql-eslint/eslint-plugin 4.0.0-alpha.4 → 4.0.0-alpha.6

Sign up to get free protection for your applications and to get access to all the features.
package/cjs/index.d.cts CHANGED
@@ -18,7 +18,7 @@ declare const processors: {
18
18
  graphql: {
19
19
  meta: {
20
20
  name: string;
21
- version: string;
21
+ version: string | undefined;
22
22
  };
23
23
  supportsAutofix: true;
24
24
  preprocess(code: string, filePath: string): (string | Block)[];
package/cjs/meta.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- declare const version: string;
1
+ declare const version: string | undefined;
2
2
 
3
3
  export { version };
package/cjs/meta.js CHANGED
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __export = (target, all) => {
8
7
  for (var name in all)
9
8
  __defProp(target, name, { get: all[name], enumerable: !0 });
@@ -13,21 +12,13 @@ var __export = (target, all) => {
13
12
  !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
13
  return to;
15
14
  };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
- mod
23
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
16
  var meta_exports = {};
25
17
  __export(meta_exports, {
26
18
  version: () => version
27
19
  });
28
20
  module.exports = __toCommonJS(meta_exports);
29
- var import_package = __toESM(require("../package.json"), 1);
30
- const { version } = import_package.default;
21
+ const version = "4.0.0-alpha.6";
31
22
  // Annotate the CommonJS export names for ESM import in node:
32
23
  0 && (module.exports = {
33
24
  version
package/cjs/parser.d.cts CHANGED
@@ -13,7 +13,7 @@ declare const parser: {
13
13
  parseForESLint: typeof parseForESLint;
14
14
  meta: {
15
15
  name: string;
16
- version: string;
16
+ version: string | undefined;
17
17
  };
18
18
  };
19
19
 
@@ -7,7 +7,7 @@ type Block = Linter.ProcessorFile & {
7
7
  declare const processor: {
8
8
  meta: {
9
9
  name: string;
10
- version: string;
10
+ version: string | undefined;
11
11
  };
12
12
  supportsAutofix: true;
13
13
  preprocess(code: string, filePath: string): (string | Block)[];
@@ -21,7 +21,7 @@ declare const rules: {
21
21
  groups?: string[] | undefined;
22
22
  }[]>;
23
23
  'description-style': GraphQLESLintRule<{
24
- style?: "block" | "inline" | undefined;
24
+ style: "block" | "inline";
25
25
  }[]>;
26
26
  'input-name': GraphQLESLintRule<{
27
27
  checkInputType?: boolean | undefined;
@@ -83,7 +83,7 @@ declare const rules: {
83
83
  'no-unreachable-types': GraphQLESLintRule;
84
84
  'no-unused-fields': GraphQLESLintRule;
85
85
  'relay-arguments': GraphQLESLintRule<{
86
- includeBoth?: boolean | undefined;
86
+ includeBoth: boolean;
87
87
  }[], true>;
88
88
  'relay-connection-types': GraphQLESLintRule;
89
89
  'relay-edge-types': GraphQLESLintRule<{
@@ -102,7 +102,7 @@ declare const rules: {
102
102
  'require-nullable-fields-with-oneof': GraphQLESLintRule;
103
103
  'require-nullable-result-in-root': GraphQLESLintRule;
104
104
  'require-selections': GraphQLESLintRule<{
105
- fieldName?: string | string[] | undefined;
105
+ fieldName: string | string[];
106
106
  }[], true>;
107
107
  'require-type-pattern-with-oneof': GraphQLESLintRule;
108
108
  'selection-set-depth': GraphQLESLintRule<{
@@ -38,7 +38,9 @@ declare const schema: {
38
38
  };
39
39
  };
40
40
  };
41
- type RuleOptions = FromSchema<typeof schema>;
41
+ type RuleOptions = FromSchema<typeof schema, {
42
+ keepDefaultedPropertiesOptional: true;
43
+ }>;
42
44
  declare const rule: GraphQLESLintRule<RuleOptions>;
43
45
 
44
46
  export { type RuleOptions, rule };
@@ -102,7 +102,9 @@ declare const schema: {
102
102
  readonly description: string;
103
103
  };
104
104
  };
105
- type RuleOptions = FromSchema<typeof schema>;
105
+ type RuleOptions = FromSchema<typeof schema, {
106
+ keepDefaultedPropertiesOptional: true;
107
+ }>;
106
108
  declare const rule: GraphQLESLintRule<RuleOptions>;
107
109
 
108
110
  export { type RuleOptions, rule };
@@ -34,7 +34,9 @@ declare const schema: {
34
34
  };
35
35
  };
36
36
  };
37
- type RuleOptions = FromSchema<typeof schema>;
37
+ type RuleOptions = FromSchema<typeof schema, {
38
+ keepDefaultedPropertiesOptional: true;
39
+ }>;
38
40
  declare const rule: GraphQLESLintRule<RuleOptions, true>;
39
41
 
40
42
  export { type RuleOptions, rule };
@@ -60,7 +60,9 @@ declare const schema: {
60
60
  };
61
61
  };
62
62
  };
63
- type RuleOptions = FromSchema<typeof schema>;
63
+ type RuleOptions = FromSchema<typeof schema, {
64
+ keepDefaultedPropertiesOptional: true;
65
+ }>;
64
66
  declare const rule: GraphQLESLintRule<RuleOptions>;
65
67
 
66
68
  export { type RuleOptions, rule };
package/esm/index.d.ts CHANGED
@@ -18,7 +18,7 @@ declare const processors: {
18
18
  graphql: {
19
19
  meta: {
20
20
  name: string;
21
- version: string;
21
+ version: string | undefined;
22
22
  };
23
23
  supportsAutofix: true;
24
24
  preprocess(code: string, filePath: string): (string | Block)[];
package/esm/meta.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- declare const version: string;
1
+ declare const version: string | undefined;
2
2
 
3
3
  export { version };
package/esm/meta.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import "./chunk-UIAXBAMD.js";
2
- import packageJson from "../package.json" with { type: "json" };
3
- const { version } = packageJson;
2
+ const version = "4.0.0-alpha.6";
4
3
  export {
5
4
  version
6
5
  };
package/esm/parser.d.ts CHANGED
@@ -13,7 +13,7 @@ declare const parser: {
13
13
  parseForESLint: typeof parseForESLint;
14
14
  meta: {
15
15
  name: string;
16
- version: string;
16
+ version: string | undefined;
17
17
  };
18
18
  };
19
19
 
@@ -7,7 +7,7 @@ type Block = Linter.ProcessorFile & {
7
7
  declare const processor: {
8
8
  meta: {
9
9
  name: string;
10
- version: string;
10
+ version: string | undefined;
11
11
  };
12
12
  supportsAutofix: true;
13
13
  preprocess(code: string, filePath: string): (string | Block)[];
@@ -21,7 +21,7 @@ declare const rules: {
21
21
  groups?: string[] | undefined;
22
22
  }[]>;
23
23
  'description-style': GraphQLESLintRule<{
24
- style?: "block" | "inline" | undefined;
24
+ style: "block" | "inline";
25
25
  }[]>;
26
26
  'input-name': GraphQLESLintRule<{
27
27
  checkInputType?: boolean | undefined;
@@ -83,7 +83,7 @@ declare const rules: {
83
83
  'no-unreachable-types': GraphQLESLintRule;
84
84
  'no-unused-fields': GraphQLESLintRule;
85
85
  'relay-arguments': GraphQLESLintRule<{
86
- includeBoth?: boolean | undefined;
86
+ includeBoth: boolean;
87
87
  }[], true>;
88
88
  'relay-connection-types': GraphQLESLintRule;
89
89
  'relay-edge-types': GraphQLESLintRule<{
@@ -102,7 +102,7 @@ declare const rules: {
102
102
  'require-nullable-fields-with-oneof': GraphQLESLintRule;
103
103
  'require-nullable-result-in-root': GraphQLESLintRule;
104
104
  'require-selections': GraphQLESLintRule<{
105
- fieldName?: string | string[] | undefined;
105
+ fieldName: string | string[];
106
106
  }[], true>;
107
107
  'require-type-pattern-with-oneof': GraphQLESLintRule;
108
108
  'selection-set-depth': GraphQLESLintRule<{
@@ -38,7 +38,9 @@ declare const schema: {
38
38
  };
39
39
  };
40
40
  };
41
- type RuleOptions = FromSchema<typeof schema>;
41
+ type RuleOptions = FromSchema<typeof schema, {
42
+ keepDefaultedPropertiesOptional: true;
43
+ }>;
42
44
  declare const rule: GraphQLESLintRule<RuleOptions>;
43
45
 
44
46
  export { type RuleOptions, rule };
@@ -102,7 +102,9 @@ declare const schema: {
102
102
  readonly description: string;
103
103
  };
104
104
  };
105
- type RuleOptions = FromSchema<typeof schema>;
105
+ type RuleOptions = FromSchema<typeof schema, {
106
+ keepDefaultedPropertiesOptional: true;
107
+ }>;
106
108
  declare const rule: GraphQLESLintRule<RuleOptions>;
107
109
 
108
110
  export { type RuleOptions, rule };
@@ -34,7 +34,9 @@ declare const schema: {
34
34
  };
35
35
  };
36
36
  };
37
- type RuleOptions = FromSchema<typeof schema>;
37
+ type RuleOptions = FromSchema<typeof schema, {
38
+ keepDefaultedPropertiesOptional: true;
39
+ }>;
38
40
  declare const rule: GraphQLESLintRule<RuleOptions, true>;
39
41
 
40
42
  export { type RuleOptions, rule };
@@ -60,7 +60,9 @@ declare const schema: {
60
60
  };
61
61
  };
62
62
  };
63
- type RuleOptions = FromSchema<typeof schema>;
63
+ type RuleOptions = FromSchema<typeof schema, {
64
+ keepDefaultedPropertiesOptional: true;
65
+ }>;
64
66
  declare const rule: GraphQLESLintRule<RuleOptions>;
65
67
 
66
68
  export { type RuleOptions, rule };
package/index.browser.js CHANGED
@@ -387,83 +387,8 @@ function convertToESTree(node, schema15) {
387
387
  );
388
388
  }
389
389
 
390
- // package.json
391
- var package_default = {
392
- name: "@graphql-eslint/eslint-plugin",
393
- version: "4.0.0-alpha.4",
394
- type: "module",
395
- description: "GraphQL plugin for ESLint",
396
- repository: "https://github.com/B2o5T/graphql-eslint",
397
- author: "Dotan Simha <dotansimha@gmail.com>",
398
- license: "MIT",
399
- engines: {
400
- node: ">=18"
401
- },
402
- main: "dist/cjs/index.js",
403
- exports: {
404
- "./package.json": "./package.json",
405
- ".": {
406
- require: {
407
- types: "./dist/cjs/index.d.ts",
408
- default: "./dist/cjs/index.js"
409
- },
410
- import: {
411
- types: "./dist/esm/index.d.ts",
412
- default: "./dist/esm/index.js"
413
- },
414
- default: {
415
- types: "./dist/esm/index.d.ts",
416
- default: "./dist/esm/index.js"
417
- }
418
- }
419
- },
420
- types: "dist/esm/index.d.ts",
421
- keywords: [
422
- "eslint",
423
- "eslintplugin",
424
- "eslint-plugin",
425
- "graphql"
426
- ],
427
- scripts: {
428
- build: "tsup",
429
- test: "vitest",
430
- typecheck: "tsc --noEmit"
431
- },
432
- peerDependencies: {
433
- eslint: ">=8.44.0",
434
- graphql: "^16"
435
- },
436
- dependencies: {
437
- "@graphql-tools/code-file-loader": "^8.0.0",
438
- "@graphql-tools/graphql-tag-pluck": "8.3.2",
439
- "@graphql-tools/utils": "^10.0.0",
440
- debug: "^4.3.4",
441
- "fast-glob": "^3.2.12",
442
- "graphql-config": "^5.1.0",
443
- "graphql-depth-limit": "^1.1.0",
444
- "lodash.lowercase": "^4.3.0"
445
- },
446
- devDependencies: {
447
- "@theguild/eslint-rule-tester": "workspace:*",
448
- "@types/debug": "4.1.12",
449
- "@types/eslint": "9.6.0",
450
- "@types/estree": "1.0.5",
451
- "@types/graphql-depth-limit": "1.1.6",
452
- "@types/json-schema": "7.0.15",
453
- "@types/lodash.lowercase": "4.3.9",
454
- graphql: "16.9.0",
455
- "json-schema-to-ts": "2.12.0",
456
- "vite-tsconfig-paths": "^5.0.0"
457
- },
458
- publishConfig: {
459
- directory: "dist",
460
- access: "public"
461
- },
462
- sideEffects: !1
463
- };
464
-
465
390
  // src/meta.ts
466
- var { version } = package_default;
391
+ var version = process.env.VERSION;
467
392
 
468
393
  // src/siblings.ts
469
394
  import {
@@ -1939,7 +1864,7 @@ var RULE_ID2 = "lone-executable-definition", definitionTypes = ["fragment", ...O
1939
1864
  };
1940
1865
 
1941
1866
  // src/rules/match-document-filename.ts
1942
- import { basename, extname } from "path";
1867
+ import { basename, extname } from "node:path";
1943
1868
  import { Kind as Kind7 } from "graphql";
1944
1869
  var MATCH_EXTENSION = "MATCH_EXTENSION", MATCH_STYLE = "MATCH_STYLE", CASE_STYLES = [
1945
1870
  "camelCase",
@@ -2968,7 +2893,7 @@ var RULE_ID6 = "HASHTAG_COMMENT", rule10 = {
2968
2893
  };
2969
2894
 
2970
2895
  // src/rules/no-one-place-fragments.ts
2971
- import { relative } from "path";
2896
+ import { relative } from "node:path";
2972
2897
  import { visit as visit4 } from "graphql";
2973
2898
  var RULE_ID7 = "no-one-place-fragments", rule11 = {
2974
2899
  meta: {
@@ -4338,7 +4263,7 @@ var RULE_ID15 = "require-field-of-type-query-in-mutation-result", rule24 = {
4338
4263
  };
4339
4264
 
4340
4265
  // src/rules/require-import-fragment.ts
4341
- import path from "path";
4266
+ import path from "node:path";
4342
4267
  var RULE_ID16 = "require-import-fragment", SUGGESTION_ID = "add-import-expression", rule25 = {
4343
4268
  meta: {
4344
4269
  type: "suggestion",
@@ -5178,7 +5103,7 @@ var rule32 = {
5178
5103
  };
5179
5104
 
5180
5105
  // src/rules/unique-fragment-name.ts
5181
- import { relative as relative2 } from "path";
5106
+ import { relative as relative2 } from "node:path";
5182
5107
  import { Kind as Kind25 } from "graphql";
5183
5108
  var RULE_ID23 = "unique-fragment-name", checkNode = (context, node, ruleId) => {
5184
5109
  let documentName = node.name.value, siblings = requireSiblingsOperations(ruleId, context), siblingDocuments = node.kind === Kind25.FRAGMENT_DEFINITION ? siblings.getFragment(documentName) : siblings.getOperation(documentName), filepath = context.filename, conflictingDocuments = siblingDocuments.filter((f) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "4.0.0-alpha.4",
3
+ "version": "4.0.0-alpha.6",
4
4
  "type": "module",
5
5
  "description": "GraphQL plugin for ESLint",
6
6
  "repository": "https://github.com/B2o5T/graphql-eslint",
@@ -9,21 +9,16 @@
9
9
  "engines": {
10
10
  "node": ">=18"
11
11
  },
12
- "main": "cjs/index.js",
13
12
  "exports": {
14
13
  "./package.json": "./package.json",
15
14
  ".": {
16
15
  "require": {
17
- "types": "./cjs/index.d.ts",
16
+ "types": "./cjs/index.d.cts",
18
17
  "default": "./cjs/index.js"
19
18
  },
20
19
  "import": {
21
20
  "types": "./esm/index.d.ts",
22
21
  "default": "./esm/index.js"
23
- },
24
- "default": {
25
- "types": "./esm/index.d.ts",
26
- "default": "./esm/index.js"
27
22
  }
28
23
  }
29
24
  },
@@ -40,7 +35,7 @@
40
35
  },
41
36
  "dependencies": {
42
37
  "@graphql-tools/code-file-loader": "^8.0.0",
43
- "@graphql-tools/graphql-tag-pluck": "8.3.2",
38
+ "@graphql-tools/graphql-tag-pluck": "8.3.3",
44
39
  "@graphql-tools/utils": "^10.0.0",
45
40
  "debug": "^4.3.4",
46
41
  "fast-glob": "^3.2.12",