Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Fix extraneous dependency eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
paulomarg committed Dec 18, 2023
1 parent 7d721b8 commit 0c07dfd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .changeset/brown-gifts-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
3 changes: 1 addition & 2 deletions packages/graphql-client/.eslintignore → .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
rollup.config.js
rollup-common.js
rollup-umd.config.js
rollup.config.cjs
.eslintrc.cjs
node_modules/
dist/
22 changes: 17 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
const { GlobSync } = require("glob");

const packageDir = ["."];
if (process.cwd().includes("shopify-api-js/packages")) {
packageDir.push(__dirname);
} else {
const glob = new GlobSync(`${__dirname}/packages/*`);
glob.found.forEach((path) =>
packageDir.push(path.replace(/^.*\/shopify-api-js\//, ""))
);
}

module.exports = {
env: {
browser: false,
es2021: true,
},
extends: ['plugin:@shopify/typescript', 'plugin:@shopify/prettier'],
ignorePatterns: ['dist/'],
extends: ["plugin:@shopify/typescript", "plugin:@shopify/prettier"],
ignorePatterns: ["dist/"],
rules: {
'no-console': 0,
'@typescript-eslint/naming-convention': 0,
'import/no-extraneous-dependencies': [2, { packageDir: ['.', '../..'] }]
"no-console": 0,
"@typescript-eslint/naming-convention": 0,
"import/no-extraneous-dependencies": ["error", { packageDir }],
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@babel/plugin-transform-runtime": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.21.0",
"@changesets/cli": "^2.22.0",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.22.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-eslint": "^9.0.3",
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"files": [],
"include": [],
"references": [
{"path": "./packages/shopify-api"}
{"path": "./packages/admin-api-client"},
{"path": "./packages/api-codegen-preset"},
{"path": "./packages/graphql-client"},
{"path": "./packages/shopify-api"},
{"path": "./packages/storefront-api-client"},
]
}

0 comments on commit 0c07dfd

Please sign in to comment.