Skip to content

Commit

Permalink
Merge branch 'main' into cli-eslint-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacroldan committed Mar 3, 2023
2 parents d9387ad + 9a7a722 commit 56967e6
Show file tree
Hide file tree
Showing 18 changed files with 821 additions and 864 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,35 @@ module.exports = {
project: './tsconfig.json',
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
},
plugins: ['@nrwl/nx']
// WARNING: If you want to add new rules/plugins, you need to add them to the eslint-plugin-cli package.
extends: ['plugin:@shopify/cli/configs'],
rules: {
'@nrwl/nx/enforce-module-boundaries': [
'error',
{
allow: [],
depConstraints: [
{
sourceTag: 'scope:feature',
onlyDependOnLibsWithTargs: ['scope:foundation'],
},
{
sourceTag: 'scope:plugin',
onlyDependOnLibsWithTargs: ['scope:foundation'],
},
{
sourceTag: 'scope:cli',
onlyDependOnLibsWithTargs: ['scope:foundation', 'scope:feature'],
},
{
sourceTag: 'scope:create-cli',
onlyDependOnLibsWithTargs: ['scope:foundation'],
},
],
},
],
},
overrides: [
{
files: ['**/public/**/*.ts'],
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/update-lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependabot
on: pull_request_target
permissions: read-all
jobs:
update-lockfile:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
pull-requests: write
contents: write
steps:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
with:
version: ^7
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- run: pnpm i --lockfile-only
- run: |
git config --global user.name github-actions[bot]
git config --global user.email github-actions[bot]@users.noreply.github.com
git add pnpm-lock.yaml
git commit -m "Update pnpm-lock.yaml"
git push
6 changes: 3 additions & 3 deletions fixtures/app/web/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
"@shopify/polaris": "^9.2.2",
"@vitejs/plugin-react": "1.2.0",
"cross-env": "^7.0.3",
"express": "^4.17.3",
"express": "^4.18.2",
"graphql": "^16.3.0",
"graphql-request": "5.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-query": "^3.34.19",
"react-router-dom": "^6.3.0",
"react-router-dom": "^6.8.2",
"vite": "^2.9.13"
},
"devDependencies": {
"prettier": "^2.6.1"
"prettier": "^2.8.4"
}
}
6 changes: 3 additions & 3 deletions fixtures/app/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
"cross-env": "^7.0.3",
"express": "^4.17.3",
"express": "^4.18.2",
"serve-static": "^1.14.1"
},
"devDependencies": {
"nodemon": "2.0.20",
"prettier": "^2.6.1",
"prettier": "^2.8.4",
"pretty-quick": "^3.1.3",
"supertest": "^6.2.2",
"supertest": "^6.3.3",
"vitest": "^0.28.5",
"vite": "2.9.12"
}
Expand Down
56 changes: 22 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,64 +31,52 @@
"fixtures:deploy": "pnpm shopify app deploy --path fixtures/app"
},
"devDependencies": {
"@apollo/client": "^3.4.8",
"@babel/core": "^7.11.0",
"@apollo/client": "^3.7.9",
"@babel/core": "^7.21.0",
"@bugsnag/source-maps": "^2.3.0",
"@changesets/cli": "2.25.2",
"@nrwl/eslint-plugin-nx": "^15.3.0",
"@nrwl/js": "^15.3.0",
"@nrwl/tao": "^15.3.0",
"@nrwl/workspace": "^15.3.0",
"@changesets/cli": "2.26.0",
"@nrwl/eslint-plugin-nx": "15.3.0",
"@nrwl/js": "15.3.0",
"@nrwl/tao": "15.3.0",
"@nrwl/workspace": "15.3.0",
"@octokit/core": "^4.0.5",
"@octokit/rest": "^19.0.4",
"@shopify/eslint-plugin-cli": "3.44.0",
"@octokit/rest": "^19.0.7",
"@shopify/eslint-plugin-cli": "3.44.1-pre.0",
"@shopify/typescript-configs": "^5.1.0",
"@shopify/web-pixels-extension": "0.1.4",
"@types/node": "14.18.36",
"@types/rimraf": "^3.0.2",
"@types/tmp": "^0.2.3",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"ansi-colors": "^4.1.1",
"@typescript-eslint/parser": "^5.54.0",
"ansi-colors": "^4.1.3",
"bugsnag-build-reporter": "^2.0.0",
"commander": "^9.4.0",
"cross-env": "^7.0.3",
"esbuild": "^0.14.42",
"esbuild": "0.15.16",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.4.6",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-no-catch-all": "^1.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-unused-imports": "^2.0.0",
"execa": "^5.1.1",
"fast-glob": "^3.2.11",
"find-up": "^6.2.0",
"fast-glob": "^3.2.12",
"find-up": "^6.3.0",
"fs-extra": "^11.1.0",
"graphql": "^15.5.1",
"graphql-tag": "^2.12.4",
"liquidjs": "^10.5.0",
"graphql-tag": "^2.12.6",
"liquidjs": "^10.6.0",
"node-fetch": "^3.2.4",
"nx": "^15.3.0",
"oclif": "3.6.4",
"nx": "15.3.0",
"oclif": "3.7.0",
"octokit-plugin-create-pull-request": "^3.12.2",
"pathe": "1.0.0",
"pin-github-action": "^1.8.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.6.1",
"prettier": "^2.8.4",
"react": "17.0.2",
"rimraf": "^3.0.2",
"shx": "^0.3.3",
"shx": "^0.3.4",
"tempy": "^3.0.0",
"tmp": "^0.2.1",
"ts-node": "^10.7.0",
"tslib": "^2.3.1",
"typescript": "4.9.4"
"tslib": "^2.5.0",
"typescript": "4.9.5"
},
"workspaces": {
"packages": [
Expand Down
8 changes: 4 additions & 4 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@
"http-proxy": "1.18.1",
"javy-cli": "0.1.2",
"serve-static": "1.15.0",
"ws": "8.8.1"
"ws": "8.12.1"
},
"devDependencies": {
"@types/diff": "^5.0.2",
"@types/http-proxy": "^1.17.9",
"@types/lodash-es": "^4.17.6",
"@types/node": "14.18.36",
"@types/serve-static": "^1.15.0",
"@types/ws": "^8.5.3",
"@types/serve-static": "^1.15.1",
"@types/ws": "^8.5.4",
"graphql": "^16.0.0",
"graphql-tag": "^2.11.0",
"graphql-tag": "^2.12.6",
"vite": "^2.9.13",
"vitest": "^0.28.5"
},
Expand Down
26 changes: 13 additions & 13 deletions packages/cli-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,22 @@
"abort-controller": "3.0.0",
"ansi-escapes": "6.0.0",
"archiver": "5.3.1",
"chalk": "5.1.0",
"chalk": "5.2.0",
"change-case": "4.1.2",
"color-json": "3.0.0",
"color-json": "3.0.5",
"commondir": "1.0.1",
"conf": "11.0.1",
"cross-zip": "4.0.0",
"deepmerge": "4.2.2",
"deepmerge": "4.3.0",
"del": "6.0.0",
"env-paths": "3.0.0",
"envfile": "6.18.0",
"execa": "6.0.0",
"fast-glob": "3.2.11",
"fast-glob": "3.2.12",
"figures": "5.0.0",
"find-process": "1.4.7",
"find-up": "6.2.0",
"find-versions": "5.0.0",
"find-up": "6.3.0",
"find-versions": "5.1.0",
"form-data": "4.0.0",
"fs-extra": "11.1.0",
"fuzzy": "0.1.3",
Expand All @@ -130,12 +130,12 @@
"js-yaml": "4.1.0",
"kill-port-process": "3.1.0",
"latest-version": "7.0.0",
"liquidjs": "10.5.0",
"liquidjs": "10.6.0",
"lodash": "4.17.21",
"macaddress": "0.5.3",
"node-abort-controller": "3.0.1",
"node-fetch": "3.2.4",
"open": "8.4.0",
"open": "8.4.2",
"pathe": "1.0.0",
"react": "17.0.2",
"semver": "7.3.6",
Expand All @@ -144,7 +144,7 @@
"stacktracey": "2.1.8",
"strip-ansi": "7.0.1",
"tempy": "3.0.0",
"term-size": "3.0.1",
"term-size": "3.0.2",
"terminal-link": "3.0.0",
"tree-kill": "1.2.2",
"ts-error": "1.0.6",
Expand All @@ -160,12 +160,12 @@
"@types/lodash": "4.14.191",
"@types/node": "14.18.36",
"@types/react": "17.0.2",
"@types/semver": "^7.3.9",
"@vitest/coverage-istanbul": "^0.28.5",
"@types/semver": "^7.3.13",
"@vitest/coverage-istanbul": "0.28.5",
"ink-testing-library": "^2.1.0",
"node-stream-zip": "^1.15.0",
"typedoc": "^0.23.25",
"typescript": "4.9.4",
"typedoc": "^0.23.26",
"typescript": "4.9.5",
"vite": "^2.9.13",
"vitest": "^0.28.5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-kit/src/public/node/node-package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export type DependencyType = 'dev' | 'prod' | 'peer'
* A union that represents the package managers available.
*/
export const packageManager = ['yarn', 'npm', 'pnpm'] as const
export type PackageManager = typeof packageManager[number]
export type PackageManager = (typeof packageManager)[number]

/**
* Returns an abort error that's thrown when a directory that's expected to have
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
},
"dependencies": {
"@oclif/core": "2.1.4",
"@oclif/plugin-commands": "2.2.9",
"@oclif/plugin-help": "5.2.4",
"@oclif/plugin-commands": "2.2.10",
"@oclif/plugin-help": "5.2.6",
"@oclif/plugin-plugins": "2.3.2",
"@shopify/cli-kit": "3.44.1-pre.0",
"@shopify/plugin-did-you-mean": "3.44.1-pre.0"
Expand All @@ -104,7 +104,7 @@
"@shopify/app": "3.44.1-pre.0",
"@shopify/theme": "3.44.1-pre.0",
"@types/node": "14.18.36",
"@vitest/coverage-istanbul": "^0.28.5",
"@vitest/coverage-istanbul": "0.28.5",
"vite": "^2.9.13",
"vitest": "^0.28.5"
},
Expand Down
35 changes: 1 addition & 34 deletions packages/eslint-plugin-cli/config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
module.exports = {
settings: {},
plugins: [
'no-catch-all',
'jest',
'@nrwl/nx',
'unused-imports',
'eslint-plugin-tsdoc',
'jsdoc',
'import',
'@shopify/cli',
],
plugins: ['no-catch-all', 'jest', 'unused-imports', 'eslint-plugin-tsdoc', 'jsdoc', 'import', '@shopify/cli'],
extends: ['plugin:@shopify/typescript', 'plugin:@shopify/prettier', 'plugin:@shopify/node', 'prettier'],
rules: {
'prettier/prettier': ['error'],
Expand Down Expand Up @@ -120,30 +111,6 @@ module.exports = {
],
'jest/no-disabled-tests': 'error',
'jest/prefer-expect-resolves': 'error',
'@nrwl/nx/enforce-module-boundaries': [
'error',
{
allow: [],
depConstraints: [
{
sourceTag: 'scope:feature',
onlyDependOnLibsWithTargs: ['scope:foundation'],
},
{
sourceTag: 'scope:plugin',
onlyDependOnLibsWithTargs: ['scope:foundation'],
},
{
sourceTag: 'scope:cli',
onlyDependOnLibsWithTargs: ['scope:foundation', 'scope:feature'],
},
{
sourceTag: 'scope:create-cli',
onlyDependOnLibsWithTargs: ['scope:foundation'],
},
],
},
],
'@shopify/cli/command-flags-with-env': 'error',
'@shopify/cli/command-conventional-flag-env': 'error',
'@shopify/cli/command-reserved-flags': 'error',
Expand Down
21 changes: 19 additions & 2 deletions packages/eslint-plugin-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/eslint-plugin-cli",
"version": "3.44.0",
"version": "3.44.1-pre.0",
"description": "Shopify CLI's ESLint rules and configs.",
"keywords": [
"eslint",
Expand All @@ -15,7 +15,24 @@
"license": "MIT",
"author": "Shopify Inc.",
"dependencies": {
"@shopify/eslint-plugin": "42.0.3"
"@babel/core": "^7.21.0",
"eslint": "^8.12.0",
"prettier": "^2.8.4",
"typescript": "4.9.5",
"@typescript-eslint/parser": "^5.54.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@shopify/eslint-plugin": "42.0.3",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^26.4.6",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-no-catch-all": "^1.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-unused-imports": "^2.0.0"
},
"peerDependencies": {
"eslint": "^8.12.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/fs-extra": "^9.0.13",
"@types/node": "14.18.36",
"@types/rimraf": "^3.0.2",
"ansi-colors": "^4.1.1",
"ansi-colors": "^4.1.3",
"execa": "^5.1.1",
"fs-extra": "^9.1.0",
"pathe": "1.0.0",
Expand Down
Loading

0 comments on commit 56967e6

Please sign in to comment.