Skip to content

Commit 2dad540

Browse files
IvanGoncharovyaacovCR
authored andcommitted
tests: remove empty strings in string literals (graphql#3970)
1 parent 8c4ed1f commit 2dad540

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.eslintrc.cjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,14 @@ module.exports = {
347347
'no-restricted-globals': 'off',
348348
'no-restricted-imports': 'off',
349349
'no-restricted-properties': 'off',
350-
'no-restricted-syntax': 'off',
350+
'no-restricted-syntax': [
351+
'error',
352+
{
353+
selector: 'TemplateElement[value.raw=/ \\n/]',
354+
message:
355+
'String literals should not contain trailing spaces. If needed for tests please disable locally using eslint comment',
356+
},
357+
],
351358
'no-return-assign': 'error',
352359
'no-return-await': 'error',
353360
'no-script-url': 'error',

src/__testUtils__/kitchenSinkQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ query queryName(
1515
...frag @onFragmentSpread
1616
}
1717
}
18-
18+
1919
field3!
2020
field4?
2121
requiredField5: field5!

src/utilities/__tests__/printSchema-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ describe('Type System Printer', () => {
680680
schema {
681681
query: Query
682682
}
683-
683+
684684
""""""
685685
directive @someDirective(
686686
""""""

0 commit comments

Comments
 (0)