Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-graphql

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-graphql - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

screenshot.png

2

package.json
{
"name": "eslint-plugin-graphql",
"version": "0.1.0",
"version": "0.1.1",
"description": "GraphQL ESLint plugin.",

@@ -5,0 +5,0 @@ "author": "Sashko Stubailo",

# eslint-plugin-graphql
In progress - lint tagged template strings against a GraphQL schema!
An ESLint plugin that checks tagged template strings against a GraphQL schema.
```
npm install eslint-plugin-graphql
```
![Screenshot from Atom](screenshot.png)
**Coming soon:** You can use it now with the manual approach described below, but we are working on easier tooling so you can just pass a GraphQL server URL.
### Configuring ESLint
You'll need to import your [introspection query result](https://github.com/graphql/graphql-js/blob/master/src/utilities/introspectionQuery.js). This can be done if you define your ESLint config in a JS file:
```js
// In a file called .eslintrc.js
module.exports = {
"parser": "babel-eslint",
"rules": {
"graphql/template-strings": ['error', {
// Import your schema JSON here
schemaJson: require('./schema.json'),
// Optional, the name of the template tag, defaults to 'gql'
tagName: 'gql'
}]
},
plugins: [
'graphql'
]
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc