Skip to content

Commit

Permalink
fix: use correct config option for @nx/dependency-checks eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Jul 2, 2024
1 parent 7573ec9 commit b464c1f
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/create-solana-dapp/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@nx/dependency-checks": [
"error",
{
"buildTargets": ["build-base"],
"buildTargets": ["build"],
"ignoredDependencies": ["nx"]
}
]
Expand Down
10 changes: 5 additions & 5 deletions packages/create-solana-dapp/lib/final-note.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bold, greenBright, magentaBright, yellowBright } from 'chalk'
import { bold, green, magenta, yellow } from 'picocolors'
import { GetArgsResult } from './get-args-result'
import { validateAnchorVersion } from './validate-anchor-version'

Expand All @@ -17,19 +17,19 @@ export function finalNote(args: GetArgsResult & { target: string }): string {
if (!version) {
lines.push(
...[
bold(yellowBright(`Could not find Anchor version. Please install Anchor.`)),
bold(yellow(`Could not find Anchor version. Please install Anchor.`)),
'https://www.anchor-lang.com/docs/installation',
],
)
} else if (!valid) {
lines.push(
...[
yellowBright(`Found Anchor version ${version}. Expected Anchor version ${requiredVersion}.`),
yellow(`Found Anchor version ${version}. Expected Anchor version ${requiredVersion}.`),
'https://www.anchor-lang.com/release-notes/0.30.0',
],
)
} else {
lines.push(greenBright(`Found Anchor version ${version}. Great!`))
lines.push(green(`Found Anchor version ${version}. Great!`))
}
}
return lines.join('\n\n')
Expand All @@ -51,5 +51,5 @@ function cmd(pm: string, command: string) {
}

function msg(message: string) {
return bold(magentaBright(message))
return bold(magenta(message))
}
7 changes: 4 additions & 3 deletions packages/create-solana-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
"description": "Get up and running fast with Solana dApps",
"dependencies": {
"@clack/prompts": "^0.7.0",
"@nx/devkit": "19.0.0",
"@nx/devkit": "19.3.2",
"commander": "^11.1.0",
"create-nx-workspace": "19.0.0",
"nx": "19.0.0",
"tmp": "0.2.1",
"tslib": "^2.3.0"
"tslib": "^2.3.0",
"tmp": "0.2.3",
"picocolors": "1.0.0"
},
"type": "commonjs",
"main": "./src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-anchor/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@nx/dependency-checks": [
"error",
{
"buildTargets": ["build-base"],
"buildTargets": ["build"],
"ignoredDependencies": ["@nx/jest"]
}
]
Expand Down
4 changes: 2 additions & 2 deletions packages/preset-anchor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.1",
"description": "This library is a preset for create-solana-dapp that adds anchor support to your project.",
"dependencies": {
"@nx/devkit": "19.0.0",
"@nx/js": "19.0.0",
"@nx/devkit": "19.3.2",
"@nx/js": "^19.3.2",
"@nx/jest": "19.0.0",
"@solana-developers/preset-common": "*",
"@solana/web3.js": "^1.90.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-next/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@nx/dependency-checks": [
"error",
{
"buildTargets": ["build-base"],
"buildTargets": ["build"],
"ignoredDependencies": ["@nx/jest", "prettier"]
}
]
Expand Down
12 changes: 6 additions & 6 deletions packages/preset-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "0.0.1",
"description": "This library is a preset for create-solana-dapp that adds next.js support to your project.",
"dependencies": {
"@nx/devkit": "19.0.0",
"@nx/devkit": "19.3.2",
"@nx/jest": "19.0.0",
"@nx/js": "19.0.0",
"@nx/eslint": "19.0.0",
"@nx/next": "19.0.0",
"@solana-developers/preset-anchor": "*",
"@nx/js": "^19.3.2",
"@nx/eslint": "19.3.2",
"@nx/next": "19.3.2",
"@solana-developers/preset-common": "*",
"@solana-developers/preset-react": "*",
"prettier": "^2.6.2",
"tslib": "^2.3.0"
"tslib": "^2.3.0",
"@solana/web3.js": "^1.91.9"
},
"type": "commonjs",
"main": "./src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-react/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@nx/dependency-checks": [
"error",
{
"buildTargets": ["build-base"],
"buildTargets": ["build"],
"ignoredDependencies": ["@nx/webpack", "prettier"]
}
]
Expand Down
11 changes: 6 additions & 5 deletions packages/preset-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"version": "0.0.1",
"description": "This library is a preset for create-solana-dapp that adds React support to your project.",
"dependencies": {
"@nx/devkit": "19.0.0",
"@nx/js": "19.0.0",
"@nx/eslint": "19.0.0",
"@nx/react": "19.0.0",
"@nx/devkit": "19.3.2",
"@nx/js": "^19.3.2",
"@nx/eslint": "19.3.2",
"@nx/react": "19.3.2",
"@nx/webpack": "19.0.0",
"@solana-developers/preset-anchor": "*",
"@solana-developers/preset-common": "*",
"prettier": "^2.6.2",
"tslib": "^2.3.0"
"tslib": "^2.3.0",
"@solana/web3.js": "^1.91.9"
},
"type": "commonjs",
"main": "./src/index.js",
Expand Down
12 changes: 12 additions & 0 deletions packages/solana-dev/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
"rules": {
"@nx/dependency-checks": "error"
}
},
{
"files": ["./package.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
{
"buildTargets": ["build"]
}
]
}
}
]
}

0 comments on commit b464c1f

Please sign in to comment.