Skip to content

Commit c90ddab

Browse files
committed
chore: configure eslint
1 parent b591ce4 commit c90ddab

File tree

3 files changed

+484
-55
lines changed

3 files changed

+484
-55
lines changed

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// This is a workaround for https://github.com/eslint/eslint/issues/3458
2+
require('@rushstack/eslint-config/patch/modern-module-resolution')
3+
4+
module.exports = {
5+
extends: [
6+
'@rushstack/eslint-config/profile/node',
7+
'@rushstack/eslint-config/mixins/friendly-locals',
8+
'@rushstack/eslint-config/mixins/tsdoc',
9+
],
10+
parserOptions: { tsconfigRootDir: __dirname },
11+
}

package.json

Lines changed: 41 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
{
22
"name": "graphql-codegen-golang",
33
"description": "Graphql Code Generator plugin for generating Golang",
4+
"keywords": [
5+
"graphql-codegen",
6+
"graphql",
7+
"golang"
8+
],
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/ctison/graphql-codegen-golang.git"
12+
},
13+
"license": "MIT",
14+
"main": "dist/index.js",
15+
"files": [
16+
"README.md",
17+
"dist/"
18+
],
419
"scripts": {
5-
"dev": "yarn run build && yarn run codegen",
620
"build": "tsc",
7-
"codegen": "yarn run graphql-codegen",
8-
"test": "go test -v ./pkg/rickandmorty/",
9-
"mock": "graphql-inspector serve graphql/schema.graphql",
10-
"format": "prettier --write '**/*.{js,jsx,ts,tsx,json,yaml,gql,md,html,css}'",
21+
"format": "prettier --write .",
22+
"gen": "graphql-codegen",
1123
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
12-
"build:precommit": "yarn run dev && :"
13-
},
14-
"dependencies": {
15-
"@graphql-codegen/plugin-helpers": "1.17.8",
16-
"graphql": "15.3.0",
17-
"liquidjs": "9.15.0"
18-
},
19-
"devDependencies": {
20-
"@graphql-codegen/cli": "1.17.8",
21-
"@graphql-inspector/cli": "2.2.0",
22-
"@graphql-tools/utils": "6.1.0",
23-
"@typescript-eslint/eslint-plugin": "3.10.1",
24-
"@typescript-eslint/parser": "3.10.1",
25-
"eslint": "7.7.0",
26-
"eslint-plugin-import": "2.22.0",
27-
"husky": "4.2.5",
28-
"lint-staged": "10.2.12",
29-
"prettier": "2.1.0",
30-
"typescript": "4.0.2"
24+
"mock": "graphql-inspector serve pkg/graphql/schema.graphql",
25+
"test": "go test -v ./pkg/rickandmorty/"
3126
},
3227
"husky": {
3328
"hooks": {
@@ -41,46 +36,38 @@
4136
"*.{js,jsx,ts,tsx}": [
4237
"eslint"
4338
],
44-
"*": [
45-
"yarn run build:precommit"
39+
"package.json": [
40+
"sort-package-json"
4641
]
4742
},
4843
"prettier": {
4944
"arrowParens": "avoid",
5045
"semi": false,
5146
"singleQuote": true
5247
},
53-
"eslintConfig": {
54-
"parser": "@typescript-eslint/parser",
55-
"extends": [
56-
"eslint:recommended",
57-
"plugin:import/errors",
58-
"plugin:import/warnings",
59-
"plugin:import/typescript",
60-
"plugin:@typescript-eslint/recommended"
61-
],
62-
"ignorePatterns": [
63-
"dist/"
64-
]
48+
"dependencies": {
49+
"@graphql-codegen/plugin-helpers": "1.17.8",
50+
"graphql": "15.3.0",
51+
"liquidjs": "9.15.0"
52+
},
53+
"devDependencies": {
54+
"@graphql-codegen/cli": "1.17.8",
55+
"@graphql-inspector/cli": "2.2.0",
56+
"@graphql-tools/utils": "6.1.0",
57+
"@rushstack/eslint-config": "2.5.2",
58+
"@typescript-eslint/eslint-plugin": "3.10.1",
59+
"@typescript-eslint/parser": "3.10.1",
60+
"eslint": "7.7.0",
61+
"eslint-plugin-import": "2.22.0",
62+
"husky": "4.2.5",
63+
"lint-staged": "10.2.12",
64+
"prettier": "2.1.0",
65+
"sort-package-json": "1.54.0",
66+
"typescript": "4.0.2"
6567
},
6668
"renovate": {
6769
"extends": [
6870
"github>ctison/renovate"
6971
]
70-
},
71-
"main": "dist/index.js",
72-
"files": [
73-
"README.md",
74-
"dist/"
75-
],
76-
"repository": {
77-
"url": "https://github.com/ctison/graphql-codegen-golang.git",
78-
"type": "git"
79-
},
80-
"license": "MIT",
81-
"keywords": [
82-
"graphql-codegen",
83-
"graphql",
84-
"golang"
85-
]
72+
}
8673
}

0 commit comments

Comments
 (0)