Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 4745f60

Browse files
committed
ESLint: enable checking of 'examples' dir
1 parent 8229498 commit 4745f60

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.eslintrc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,3 +662,11 @@ overrides:
662662
import/no-commonjs: off
663663
no-await-in-loop: off
664664
no-console: off
665+
- files: 'examples/**'
666+
parserOptions:
667+
sourceType: module
668+
rules:
669+
internal-rules/no-dir-import: off
670+
node/no-unpublished-import: off
671+
import/no-extraneous-dependencies: [error, { devDependencies: true }]
672+
no-console: off

examples/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
/* eslint-disable */
21
import express from 'express';
3-
import graphqlHTTP from '../src/';
42
import { buildSchema } from 'graphql';
53

4+
import { graphqlHTTP } from '../src';
5+
66
// Construct a schema, using GraphQL schema language
7-
var schema = buildSchema(`
7+
const schema = buildSchema(`
88
type Query {
99
hello: String
1010
}
1111
`);
1212

1313
// The root provides a resolver function for each API endpoint
14-
var root = {
14+
const rootValue = {
1515
hello: () => 'Hello world!',
1616
};
1717

18-
var app = express();
18+
const app = express();
1919
app.use(
2020
'/graphql',
2121
graphqlHTTP({
22-
schema: schema,
23-
rootValue: root,
22+
schema,
23+
rootValue,
2424
graphiql: true,
2525
}),
2626
);

0 commit comments

Comments
 (0)