Skip to content

Commit

Permalink
Update node rules (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
nowyDEV authored Dec 6, 2022
1 parent 51a2dfd commit d88461e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 0 additions & 3 deletions mixins/graphql/_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ const commons = {
files: ["*.graphql"],

parser: "@graphql-eslint/eslint-plugin",
parserOptions: {
operations: "./src/**/*.graphql",
},

extends: ["prettier"],
plugins: ["@graphql-eslint"],
Expand Down
4 changes: 4 additions & 0 deletions mixins/graphql/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ module.exports = {
{
...commons,

parserOptions: {
operations: "./src/**/*.graphql",
},

rules: {
/**
* A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.
Expand Down
6 changes: 4 additions & 2 deletions mixins/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ module.exports = {

/**
* Disallow import declarations which import non-existence modules.
* DISABLED - reports false-positives
* @see https://github.com/mysticatea/eslint-plugin-node/blob/f45c6149be7235c0f7422d1179c25726afeecd83/docs/rules/no-missing-import.md
*/
"node/no-missing-import": "error",
"node/no-missing-import": "off",

/**
* Disallow require() expressions which import non-existence modules
* DISABLED - reports false-positives
* @see https://github.com/mysticatea/eslint-plugin-node/blob/f45c6149be7235c0f7422d1179c25726afeecd83/docs/rules/no-missing-require.md
*/
"node/no-missing-require": "error",
"node/no-missing-require": "off",

/**
* Disallow new operators with calls to require, they might be confusing.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nordcloud/eslint-config-pat",
"version": "4.5.0",
"version": "4.6.0",
"description": "Shareable ESLint config for PAT projects",
"author": "Nordcloud Engineering",
"license": "MIT",
Expand Down

0 comments on commit d88461e

Please sign in to comment.