graphql-schema-linter
Advanced tools
Comparing version 0.0.11 to 0.0.12
# Changelog | ||
## 0.0.12 (August 16th, 2017) | ||
- Add `enum-values-all-caps` rule. [#30](https://github.com/cjoudrey/graphql-schema-linter/pull/30) (Thanks @goldcaddy77) | ||
## 0.0.11 (August 15th, 2017) | ||
@@ -9,3 +13,3 @@ | ||
- Add ability to configure `graphql-schema-linter` via configuration files. [#26](https://github.com/cjoudrey/graphql-schema-linter/pull/26) | ||
- Add ability to configure `graphql-schema-linter` via configuration files. [#26](https://github.com/cjoudrey/graphql-schema-linter/pull/26) (Thanks @goldcaddy77) | ||
@@ -12,0 +16,0 @@ ## 0.0.9 (August 10th, 2017) |
@@ -41,6 +41,6 @@ 'use strict'; | ||
var fieldName = node.name.value; | ||
var enumValueName = node.name.value; | ||
var parentName = ancestors[ancestors.length - 1].name.value; | ||
context.reportError(new _error.GraphQLError('The enum value `' + parentName + '.' + fieldName + '` is deprecated but has no deprecation reason.', [deprecatedDirective])); | ||
context.reportError(new _error.GraphQLError('The enum value `' + parentName + '.' + enumValueName + '` is deprecated but has no deprecation reason.', [deprecatedDirective])); | ||
} | ||
@@ -47,0 +47,0 @@ }; |
@@ -18,3 +18,3 @@ 'use strict'; | ||
if (!arraysEqual(enumValues, enumValues.slice().sort())) { | ||
context.reportError(new _error.GraphQLError('The enum `' + node.name.value + '` should be sorted alphabetically', [node])); | ||
context.reportError(new _error.GraphQLError('The enum `' + node.name.value + '` should be sorted alphabetically.', [node])); | ||
} | ||
@@ -21,0 +21,0 @@ } |
@@ -13,2 +13,4 @@ 'use strict'; | ||
module.exports = [_enum_values_sorted_alphabetically.EnumValuesSortedAlphabetically, _fields_have_descriptions.FieldsHaveDescriptions, _deprecations_have_a_reason.DeprecationsHaveAReason, _types_have_descriptions.TypesHaveDescriptions, _types_are_capitalized.TypesAreCapitalized]; | ||
var _enum_values_all_caps = require('./enum_values_all_caps'); | ||
module.exports = [_enum_values_sorted_alphabetically.EnumValuesSortedAlphabetically, _enum_values_all_caps.EnumValuesAllCaps, _fields_have_descriptions.FieldsHaveDescriptions, _deprecations_have_a_reason.DeprecationsHaveAReason, _types_have_descriptions.TypesHaveDescriptions, _types_are_capitalized.TypesAreCapitalized]; |
{ | ||
"name": "graphql-schema-linter", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Command line tool and package to validate GraphQL schemas against a set of rules.", | ||
@@ -10,3 +10,3 @@ "author": "Christian Joudrey", | ||
"test": "mocha test/index.js", | ||
"prepublish": "babel ./src --ignore test --out-dir ./lib" | ||
"prepare": "babel ./src --ignore test --out-dir ./lib" | ||
}, | ||
@@ -13,0 +13,0 @@ "homepage": "https://github.com/cjoudrey/graphql-schema-linter", |
@@ -96,2 +96,6 @@ # graphql-schema-linter [![Travis CI](https://travis-ci.org/cjoudrey/graphql-schema-linter.svg?branch=master)](https://travis-ci.org/cjoudrey/graphql-schema-linter) [![npm version](https://badge.fury.io/js/graphql-schema-linter.svg)](https://yarnpkg.com/en/package/graphql-schema-linter) | ||
### `enum-values-all-caps` | ||
This rule will validate that all enum values are capitalized. | ||
### `enum-values-sorted-alphabetically` | ||
@@ -98,0 +102,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
219025
30
487
171