@20minutes/eslint-plugin-graphql 中文文档教程
@20minutes/eslint-plugin-graphql
一个 ESLint 插件,用于检查 JavaScript 中的标记查询字符串,或 .graphql
文件中的查询,针对GraphQL 架构。
这与 eslint-plugin-graphql
完全相同,但依赖性高达日期。
yarn add --dev @20minutes/eslint-plugin-graphql
要求:
- requires Node 12+
- requires GraphQL 15+
配置相同,但有些地方需要用@20minutes/graph
代替graph
。
// In a file called .eslintrc.js
module.exports = {
parser: '@babel/eslint-parser',
rules: {
"@20minutes/graphql/template-strings": [/* ... */],
"@20minutes/graphql/no-deprecated-fields": [/* ... */],
"@20minutes/graphql/required-fields": [/* ... */],
},
plugins: [
'@20minutes/graphql'
]
}
@20minutes/eslint-plugin-graphql
An ESLint plugin that checks tagged query strings inside JavaScript, or queries inside .graphql
files, against a GraphQL schema.
This is exactly the same plugin as eslint-plugin-graphql
but with dependencies up to date.
yarn add --dev @20minutes/eslint-plugin-graphql
Requirements:
- requires Node 12+
- requires GraphQL 15+
Configuration is the same but you need to use @20minutes/graph
instead of graph
in some places.
// In a file called .eslintrc.js
module.exports = {
parser: '@babel/eslint-parser',
rules: {
"@20minutes/graphql/template-strings": [/* ... */],
"@20minutes/graphql/no-deprecated-fields": [/* ... */],
"@20minutes/graphql/required-fields": [/* ... */],
},
plugins: [
'@20minutes/graphql'
]
}
更多
你可能也喜欢
- @3wks/sargon-api-node-client 中文文档教程
- @4a/uid 中文文档教程
- @5ire/api 中文文档教程
- @5rabbits/mobx-rest 中文文档教程
- @7isys/loopback-component-passport 中文文档教程
- @9fv.io/invalidtype-error 中文文档教程
- @abhijoseph/reportportal-client 中文文档教程
- @abutterworth/my-component 中文文档教程
- @accodeing/prettier-config 中文文档教程
- @acoustic-content-sdk/tooling-rest 中文文档教程