Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"constructor-super": "warn",
"valid-typeof": "warn",
"indent": [
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/release-prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release Prettier Plugin

on:
push:
branches:
- main
paths:
- 'prettier-plugin-blits/**'

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install Dependencies
run: npm install

- name: Install monorepo dependencies
run: npm install --workspaces

- name: Run Tests
run: npm run test --workspace=prettier-plugin-blits

- name: Read package.json
run: |
plugin_name=$(node -p "require('./prettier-plugin-blits/package.json').name")
plugin_version=$(node -p "require('./prettier-plugin-blits/package.json').version")
echo "PLUGIN_NAME=$plugin_name" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV

- name: Create GitHub Pre Release
run: |
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
gh release create prettier-v${{ env.PLUGIN_VERSION }} --prerelease -t "prettier-plugin-blits v${{ env.PLUGIN_VERSION }}" -n "Version ${{ env.PLUGIN_VERSION }} of ${{ env.PLUGIN_NAME }}"
207 changes: 180 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions prettier-plugin-blits/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Change Log

## v1.0.0

- First release of `@lightningjs/prettier-plugin-blits`
- Formats Blits template strings inside `Blits.Component()` and `Blits.Application()`
- Adds `blitsWrapAttributes` to wrap long attribute lists across multiple lines
- Adds `blitsClosingBacktick` to control where the closing backtick is placed
- Adds `blitsClosingBracketSameLine` to keep the closing `>` on the last attribute line in multiline tags
- Adds `blitsPreserveBlankLines` to preserve blank lines between sibling elements
- Adds `blitsNormalizeComments` to normalize HTML comment spacing
- Adds `blitsTrimAttributeValues` to trim leading and trailing whitespace in attribute values
- Adds `blitsSelfClosingTags` to collapse empty tags to self-closing form
- Adds `blitsCollapseSingleElement` to collapse eligible single-element multiline templates
- Preserves escape sequences in attribute values correctly
- Preserves multiline template structure by default
Loading