Skip to content

Commit 88641be

Browse files
fix vale version
1 parent da6b779 commit 88641be

File tree

6 files changed

+40
-48
lines changed

6 files changed

+40
-48
lines changed

.circleci/config.yml

+2-37
Original file line numberDiff line numberDiff line change
@@ -193,46 +193,11 @@ jobs:
193193
- run:
194194
name: Lint Markdown
195195
command: pnpm markdownlint
196-
- run:
197-
# See https://circleci.com/developer/orbs/orb/circleci/vale as reference
198-
name: Install Vale
199-
command: |
200-
#!/bin/bash
201-
# extract ValeVersion from .vale.ini
202-
VALE_STR_CLI_VERSION=$(awk '/^ValeVersion/ {print $3}' ".vale.ini")
203-
204-
# set smart sudo
205-
if [[ $EUID -eq 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi
206-
207-
mkdir /tmp/vale-extract
208-
cd /tmp/vale-extract
209-
GZIPPED_OUTPUT="vale.tar.gz"
210-
BINARY_URL=https://github.com/errata-ai/vale/releases/download/v${VALE_STR_CLI_VERSION}/vale_${VALE_STR_CLI_VERSION}_Linux_64-bit.tar.gz
211-
curl -sSL "$BINARY_URL" -o "${GZIPPED_OUTPUT}"
212-
213-
if [ ! -s "${GZIPPED_OUTPUT}" ]; then
214-
echo "Downloaded file is empty"
215-
rm "${GZIPPED_OUTPUT}"
216-
exit 1
217-
fi
218-
219-
tar -xzf "${GZIPPED_OUTPUT}"
220-
$SUDO mv vale /usr/local/bin
221-
rm "${GZIPPED_OUTPUT}"
222-
223-
# validate installation
224-
if [[ -z "$(command -v vale)" ]]; then
225-
echo "vale installation failed"
226-
exit 1
227-
else
228-
echo "vale installation successful"
229-
vale --version
230-
exit 0
231-
fi
232196
- run:
233197
name: Lint writing style
234198
command: |
235-
vale sync
199+
# Or use https://circleci.com/developer/orbs/orb/circleci/vale as reference to install Vale
200+
pnpm vale sync
236201
pnpm valelint
237202
test_static:
238203
<<: *default-job

.github/workflows/vale-action.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ jobs:
1313
pull-requests: write
1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16-
- name: Extract Vale version from .vale.ini
16+
- name: Extract Vale version from pnpm-lock.yaml
1717
id: vale-version
1818
run: |
19-
VERSION=$(awk '/^ValeVersion/ {print $3}' .vale.ini)
19+
# Extract version from lock file
20+
VERSION=$(awk -F"@|'" '/@vvago\/vale@/ {print $4}' pnpm-lock.yaml | head -n1)
2021
echo "Extracted Vale version: $VERSION"
2122
echo "vale_version=$VERSION" >> $GITHUB_OUTPUT
2223
- uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1

.vale.ini

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Not an official config in Vale, but used by scripts
2-
ValeVersion = 3.11.2
3-
41
# Vale config. More information at https://vale.sh/docs/topics/config/
52
StylesPath = .github/styles
63
MinAlertLevel = warning

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"docs:typescript:formatted": "tsx ./docs/scripts/formattedTSDemos",
4040
"docs:sync-team": "tsx ./docs/scripts/syncTeamMembers.ts && pnpm prettier",
4141
"docs:mdicons:synonyms": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js,.mjs\" ./docs/scripts/updateIconSynonyms && pnpm prettier",
42-
"docs:zipRules": "cd docs && rm mui-vale.zip && zip -r mui-vale.zip mui-vale && cd ../ && vale sync",
42+
"docs:zipRules": "cd docs && rm mui-vale.zip && zip -r mui-vale.zip mui-vale && cd ../ && pnpm vale sync",
4343
"extract-error-codes": "cross-env MUI_EXTRACT_ERROR_CODES=true lerna run --concurrency 1 build:stable",
4444
"template:screenshot": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js\" ./docs/scripts/generateTemplateScreenshots",
4545
"install:codesandbox": "pnpm install --no-frozen-lockfile",
@@ -48,7 +48,7 @@
4848
"eslint:ci": "eslint . --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0",
4949
"stylelint": "stylelint --reportInvalidScopeDisables --reportNeedlessDisables \"docs/**/*.?(c|m)[jt]s?(x)\" --ignore-path .gitignore",
5050
"markdownlint": "markdownlint-cli2 \"**/*.md\"",
51-
"valelint": "git ls-files | grep -h \".md$\" | xargs vale --filter='.Level==\"error\"'",
51+
"valelint": "git ls-files | grep -h \".md$\" | xargs pnpm vale --filter='.Level==\"error\"'",
5252
"prettier": "pretty-quick --ignore-path .eslintignore --branch master",
5353
"prettier:all": "prettier --write . --ignore-path .eslintignore",
5454
"size:snapshot": "node --max-old-space-size=4096 ./scripts/sizeSnapshot/create",
@@ -146,6 +146,7 @@
146146
"@vitejs/plugin-react": "^4.4.1",
147147
"@vitest/browser": "^3.1.1",
148148
"@vitest/coverage-v8": "^3.1.1",
149+
"@vvago/vale": "^3.11.2",
149150
"babel-loader": "^9.2.1",
150151
"babel-plugin-istanbul": "^7.0.0",
151152
"babel-plugin-module-resolver": "^5.0.2",

pnpm-lock.yaml

+28-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ packages:
88
- test/moduleResolution
99
- apps/*
1010
- scripts/sizeSnapshot
11+
1112
patchedDependencies:
1213
styled-components: patches/styled-components.patch
14+
15+
onlyBuiltDependencies:
16+
- '@vvago/vale'

0 commit comments

Comments
 (0)