Skip to content

Commit

Permalink
Merge pull request #8 from nicksrandall/patch-1
Browse files Browse the repository at this point in the history
Proposal: Allow underscores in enum values
  • Loading branch information
happylinks committed Nov 15, 2017
2 parents 0a9f7cd + 6b868ff commit f23d859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/enum.casing.js
@@ -1,5 +1,5 @@
const { visit, getLocation } = require('graphql/language');
const { upperCase } = require('lodash');
const { toUpper } = require('lodash');

const getMessage = (text, node) => {
const message = `Property '${node.name
Expand All @@ -24,7 +24,7 @@ module.exports = function(ast, text) {

visit(node, {
EnumValueDefinition(node) {
const uppercased = upperCase(node.name.value);
const uppercased = toUpper(node.name.value);
if (uppercased !== node.name.value) {
valid = false;
}
Expand Down

0 comments on commit f23d859

Please sign in to comment.