-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove
prettier
rule, add related docs (#397)
* feat: remove `prettier` rule, add related docs * docs: add changeset for the feat change
- Loading branch information
Showing
19 changed files
with
189 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@graphql-eslint/eslint-plugin": minor | ||
--- | ||
|
||
feat: remove `prettier` rule, add related docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module.exports = { | ||
extends: ['plugin:prettier/recommended'], | ||
overrides: [ | ||
{ | ||
files: ['*.tsx', '*.ts', '*.jsx', '*.js'], | ||
processor: '@graphql-eslint/graphql', | ||
}, | ||
{ | ||
files: ['*.graphql'], | ||
parser: '@graphql-eslint/eslint-plugin', | ||
plugins: ['@graphql-eslint'], | ||
// the following is required for `eslint-plugin-prettier@<=3.4.0` temporarily | ||
// after https://github.com/prettier/eslint-plugin-prettier/pull/413 | ||
// been merged and released, it can be deleted safely | ||
rules: { | ||
'prettier/prettier': [ | ||
2, | ||
{ | ||
parser: 'graphql', | ||
}, | ||
], | ||
}, | ||
}, | ||
// the following is required for `eslint-plugin-prettier@<=3.4.0` temporarily | ||
// after https://github.com/prettier/eslint-plugin-prettier/pull/415 | ||
// been merged and released, it can be deleted safely | ||
{ | ||
files: ['*.js/*.graphql'], | ||
rules: { | ||
'prettier/prettier': 0, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
query GetUser($userId: ID!) { | ||
user(id: $userId) { | ||
id, | ||
name, | ||
isViewerFriend, | ||
profilePicture(size: 50) { | ||
...PictureFragment | ||
} | ||
} | ||
} | ||
|
||
fragment PictureFragment on Picture { | ||
uri, | ||
width, | ||
height | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const quqery = /* GraphQL */ `query GetUser($userId: ID!) { | ||
user(id: $userId) { | ||
id, | ||
name, | ||
isViewerFriend, | ||
profilePicture(size: 50) { | ||
...PictureFragment | ||
} | ||
} | ||
} | ||
fragment PictureFragment on Picture { | ||
uri, | ||
width, | ||
height | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "@graphql-eslint/example-prettier", | ||
"private": true, | ||
"version": "0.0.1", | ||
"repository": "https://github.com/dotansimha/graphql-eslint", | ||
"author": "JounQin <admin@1stg.me>", | ||
"license": "MIT", | ||
"scripts": { | ||
"lint": "eslint --ext graphql,js ." | ||
}, | ||
"dependencies": { | ||
"eslint": "7.24.0", | ||
"eslint-config-prettier": "8.2.0", | ||
"eslint-plugin-prettier": "3.4.0", | ||
"@graphql-eslint/eslint-plugin": "0.9.1", | ||
"graphql": "15.5.0", | ||
"prettier": "1.19.1", | ||
"typescript": "4.1.5" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scalar Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const content = /* GraphQL */ ` | ||
scalar Test | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.