diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index f8cb0c9..2a1e66c 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -21,10 +21,31 @@ jobs: ssh-key: ${{ secrets.VALE_STYLES_ACCESS_KEY }} - name: copy vale rules to the root repo run: shopt -s dotglob && cp -r ./vale-styles/vale/* . + + - name: detect README file + id: detect + shell: bash + run: | + set -euo pipefail + + found="$(find . -maxdepth 1 -type f -iname 'readme.md' -print | head -n 1 || true)" + + if [[ -z "$found" ]]; then + echo "No README.md found in repo root. Nothing to lint." + echo "files=[]" >> "$GITHUB_OUTPUT" + exit 0 + fi + + found="${found#./}" + + echo "Found README: $found" + echo "files=[\"$found\"]" >> "$GITHUB_OUTPUT" + - name: vale linter check + if: steps.detect.outputs.files != '[]' uses: DevExpress/vale-action@reviewdog with: - files: '["[Rr]eadme.md"]' + files: ${{ steps.detect.outputs.files }} fail_on_error: true filter_mode: nofilter reporter: github-check \ No newline at end of file diff --git a/README.md b/README.md index 19932a2..2fd145a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/340354634/25.2.2%2B) [![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/T1129779) [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183) [![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives) diff --git a/jQuery/package-lock.json b/jQuery/package-lock.json index 4a5b812..02e990b 100644 --- a/jQuery/package-lock.json +++ b/jQuery/package-lock.json @@ -17,7 +17,7 @@ "@babel/core": "^7.22.1", "@babel/eslint-parser": "^7.21.8", "eslint": "9.18.0", - "eslint-config-devextreme": "^1.1.9", + "eslint-config-devextreme": "1.1.9", "eslint-plugin-no-only-tests": "^3.1.0", "htmlhint": "^1.1.4", "lite-server": "^2.6.1", diff --git a/jQuery/src/data.js b/jQuery/src/data.js new file mode 100644 index 0000000..85c5335 --- /dev/null +++ b/jQuery/src/data.js @@ -0,0 +1 @@ +export const count = 0; \ No newline at end of file diff --git a/jQuery/src/index.html b/jQuery/src/index.html index 423bb30..b635d23 100644 --- a/jQuery/src/index.html +++ b/jQuery/src/index.html @@ -10,7 +10,7 @@ - + diff --git a/jQuery/src/index.js b/jQuery/src/index.js index 6d9c698..1cce123 100644 --- a/jQuery/src/index.js +++ b/jQuery/src/index.js @@ -1,5 +1,7 @@ +import { count as initialCount } from './data.js'; + $(() => { - let count = 0; + let count = initialCount; $('#btn').dxButton({ text: `Click count: ${count}`, onClick(e) {