Skip to content

Commit 6687ac4

Browse files
committed
initial commit
1 parent 9bb41ac commit 6687ac4

31 files changed

+8468
-0
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
examples
2+
packages/core/test-helpers/test-helpers.ts

.eslintrc.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"eslint:recommended",
5+
"standard",
6+
"prettier",
7+
"plugin:@typescript-eslint/recommended",
8+
"prettier/@typescript-eslint"
9+
],
10+
"plugins": ["@typescript-eslint"],
11+
"rules": {
12+
"no-empty": "off",
13+
"no-console": "error",
14+
"no-prototype-builtins": "off",
15+
"no-useless-constructor": "off",
16+
"@typescript-eslint/no-unused-vars": ["warn", {"args": "none"}],
17+
"@typescript-eslint/no-use-before-define": "off",
18+
"@typescript-eslint/no-namespace": "off",
19+
"@typescript-eslint/no-empty-interface": "off",
20+
"@typescript-eslint/no-empty-function": "off",
21+
"@typescript-eslint/no-var-requires": "off",
22+
"@typescript-eslint/no-explicit-any": "off",
23+
"@typescript-eslint/no-non-null-assertion": "off",
24+
"@typescript-eslint/explicit-function-return-type": "off",
25+
"@typescript-eslint/ban-ts-ignore": "off",
26+
"@typescript-eslint/ban-types": "off"
27+
},
28+
"env": {
29+
"es6": true,
30+
"node": true
31+
},
32+
"overrides": [
33+
{
34+
"files": [
35+
"**/tests/**/*.ts",
36+
"**/graphql-codegen-testing/**/*.ts",
37+
"*.spec.ts"
38+
],
39+
"env": {
40+
"jest": true
41+
},
42+
"rules": {
43+
"@typescript-eslint/no-unused-vars": "off"
44+
}
45+
}
46+
],
47+
"ignorePatterns": ["dist", "node_modules", "dev-test", "website"]
48+
}

.gitignore

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port
105+
106+
107+
.bob
108+
temp
109+
.idea

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
src
2+
tests
3+
node_modules
4+
.bob
5+
temp

bob.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
ignore: ['@graphql-eslint/example'],
3+
};

example/.eslintrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parser": "@graphql-eslint/parser",
3+
"parserOptions": {
4+
"schemaPath": "./**/schema.graphql"
5+
},
6+
"plugins": ["@graphql-eslint"],
7+
"rules": {
8+
"@graphql-eslint/validate-against-schema": "error",
9+
"@graphql-eslint/no-anonymous-operations": "error",
10+
"@graphql-eslint/no-operation-name-suffix": "error"
11+
}
12+
}

example/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@graphql-eslint/example",
3+
"private": true,
4+
"version": "0.0.1",
5+
"repository": "https://github.com/dotansimha/graphql-eslint",
6+
"author": "Dotan Simha <[email protected]>",
7+
"license": "MIT",
8+
"scripts": {
9+
"lint": "eslint --ext graphql ."
10+
},
11+
"dependencies": {
12+
"eslint": "7.8.1",
13+
"@graphql-eslint/parser": "0.0.1",
14+
"@graphql-eslint/eslint-plugin": "0.0.1",
15+
"graphql": "15.3.0",
16+
"typescript": "4.0.2"
17+
}
18+
}

example/query.graphql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
query my {
2+
hello
3+
}

example/schema.graphql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
type Query {
2+
hello: String!
3+
}

jest.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { pathsToModuleNameMapper } = require('ts-jest/utils');
2+
const { compilerOptions } = require('./tsconfig.json');
3+
4+
module.exports = {
5+
preset: 'ts-jest',
6+
testEnvironment: 'node',
7+
modulePathIgnorePatterns: ["/dist/"],
8+
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
9+
globals: {
10+
'ts-jest': {
11+
diagnostics: false
12+
}
13+
},
14+
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' })
15+
};

0 commit comments

Comments
 (0)