Skip to content

Commit

Permalink
Merge branch 'main' into issue-66
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Oct 12, 2021
2 parents 16e8b13 + c8a4935 commit 10bce6f
Show file tree
Hide file tree
Showing 29 changed files with 11,898 additions and 16,657 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ module.exports = defineConfig({
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'@typescript-eslint/indent': ['error', 'tab', { SwitchCase: 1, ignoredNodes: ['MemberExpression'] }],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/member-ordering': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
Expand Down
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [Shinigami92]
custom: ['https://www.paypal.com/donate?hosted_button_id=L7GY729FBKTZY']
2 changes: 0 additions & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"lockFileMaintenance": { "enabled": true },
"pin": false,
"rangeStrategy": "replace",
"postUpdateOptions": ["yarnDedupeHighest"],
"ignoreDeps": ["prettier-plugin-organize-imports"],
"ignorePresets": ["workarounds:typesNodeVersioning"],
"packageRules": [
{
Expand Down
76 changes: 29 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,33 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 6

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}

- name: Fetch cached dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/.yarn/cache
**/node_modules
key: node-${{ matrix.node_version }}-os-${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-${{ matrix.node_version }}-os-${{ matrix.os }}-yarn-
cache: 'pnpm'

- name: Versions
run: |
echo "yarn: $(yarn --version)"
echo "pnpm: $(pnpm --version)"
echo "npm : $(npm --version)"
echo "node: $(node --version)"
echo "process.versions:"
yarn node -p process.versions
pnpm node -p process.versions
- name: Install dependencies
# if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Build
run: yarn build
run: pnpm run build

- name: Test
run: yarn jest --ci --silent --reporters=default --reporters=jest-junit
run: pnpm jest --ci --silent --reporters=default --reporters=jest-junit

- name: Upload test artifact
uses: actions/upload-artifact@v2
Expand All @@ -80,28 +74,22 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 6

- name: Set node version to 14
uses: actions/setup-node@v2
with:
node-version: 14

- name: Fetch cached dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/.yarn/cache
**/node_modules
key: node-14-os-ubuntu-latest-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-14-os-ubuntu-latest-yarn-
cache: 'pnpm'

- name: Prepare
# if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Lint
run: yarn lint
run: pnpm run lint

audit:
runs-on: ubuntu-latest
Expand All @@ -111,34 +99,28 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 6

- name: Set node version to 14
uses: actions/setup-node@v2
with:
node-version: 14

- name: Fetch cached dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/.yarn/cache
**/node_modules
key: node-14-os-ubuntu-latest-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-14-os-ubuntu-latest-yarn-
cache: 'pnpm'

- name: Prepare
# if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Audit production
run: yarn npm audit --all --recursive --environment production
run: pnpm audit --prod

- name: Audit all
continue-on-error: true
run: yarn npm audit --all --recursive
run: pnpm audit

- name: Check outdated dependencies
continue-on-error: true
if: github.ref == 'refs/heads/main'
run: yarn outdated --url
run: pnpm outdated --long
22 changes: 8 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,22 @@ jobs:
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 6

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14

- name: Fetch cached dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/.yarn/cache
**/node_modules
key: node-14-os-ubuntu-latest-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-14-os-ubuntu-latest-yarn-
cache: 'pnpm'

- name: Install dependencies
# if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Build VuePress site
run: yarn docs:build
run: pnpm run docs:build

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.github/ISSUE_TEMPLATE/
.yarn/
.pnp.cjs
pnpm-lock.yaml
benchmark/
coverage/
dist/
Expand Down
363 changes: 0 additions & 363 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

33 changes: 0 additions & 33 deletions .yarn/plugins/@yarnpkg/plugin-outdated.cjs

This file was deleted.

631 changes: 0 additions & 631 deletions .yarn/releases/yarn-berry.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarnrc.yml

This file was deleted.

18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Next

[diff](https://github.com/prettier/plugin-pug/compare/1.16.5...main)
[diff](https://github.com/prettier/plugin-pug/compare/1.16.7...main)

# 1.16.7

[diff](https://github.com/prettier/plugin-pug/compare/1.16.6...1.16.7)

- Fix handling of `prettier-ignore` ([#292])

[#292]: https://github.com/prettier/plugin-pug/issues/292

# 1.16.6

[diff](https://github.com/prettier/plugin-pug/compare/1.16.5...1.16.6)

- Handle Vue slot shorthand formatting ([#289])

[#289]: https://github.com/prettier/plugin-pug/issues/289

# 1.16.5

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ At first: Thank you for being interested and using my plugin. :smiley_cat:

- Please add tests for your implementation if necessary.
- Do not change the `CHANGELOG.md` or `version` in `package.json`, that will be my part after merging.
- Before switching from `Draft` to `Request for review`, please perform `yarn lint` and `yarn format`.
- Before switching from `Draft` to `Request for review`, please perform `pnpm run lint` and `pnpm run format`.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,21 @@ This plugin adds support for the Pug language to Prettier.
Simply install `prettier` and `@prettier/plugin-pug` as your project’s `devDependencies`:

```bash
npm add --save-dev prettier @prettier/plugin-pug
# or
yarn add --dev prettier @prettier/plugin-pug
# or
pnpm add --save-dev prettier @prettier/plugin-pug
```

## Usage

```bash
npx prettier --write "**/*.pug"
# or
yarn prettier --write "**/*.pug"
# or
pnpm prettier --write "**/*.pug"
```

## Configuration
Expand Down Expand Up @@ -108,9 +116,9 @@ If you’re interested in contributing to the development of Prettier for Pug, y
To run `@prettier/plugin-pug` locally:

- Clone this repository.
- Execute `yarn install`.
- Execute `yarn lint` to make sure that the code passes formatting and linting.
- Execute `yarn test` to make sure that TypeScript successfully compiles into JavaScript and and all unit tests pass.
- Execute `pnpm install`.
- Execute `pnpm run lint` to make sure that the code passes formatting and linting.
- Execute `pnpm run test` to make sure that TypeScript successfully compiles into JavaScript and all unit tests pass.

## Credits

Expand Down
2 changes: 2 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ module.exports = {
},

repo: 'prettier/plugin-pug',
docsDir: 'docs',
docsBranch: 'main',
logo: 'https://camo.githubusercontent.com/f89d53e813140369c509e67424833cdfc3f76dcf997d4b3b0a1174ec12304600/68747470733a2f2f63646e2e7261776769742e636f6d2f70726574746965722f70726574746965722d6c6f676f2f6d61737465722f696d616765732f70726574746965722d69636f6e2d6c696768742e737667',
editLinks: true,
nav: [
Expand Down
24 changes: 18 additions & 6 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
Simply install `prettier` and `@prettier/plugin-pug` as your project’s npm `devDependencies`:

<code-group>
<code-block title="YARN" active>
<code-block title="NPM" active>
```bash
npm add --save-dev prettier @prettier/plugin-pug
```
</code-block>

<code-block title="YARN">
```bash
yarn add --dev prettier @prettier/plugin-pug
```
</code-block>

<code-block title="NPM">
<code-block title="PNPM">
```bash
npm install --save-dev prettier @prettier/plugin-pug
pnpm add --save-dev prettier @prettier/plugin-pug
```
</code-block>
</code-group>
Expand All @@ -23,15 +29,21 @@ npm install --save-dev prettier @prettier/plugin-pug
Format all pug files in your project:

<code-group>
<code-block title="YARN" active>
<code-block title="NPM" active>
```bash
npx prettier --write "**/*.pug"
```
</code-block>

<code-block title="YARN">
```bash
yarn prettier --write "**/*.pug"
```
</code-block>

<code-block title="NPM">
<code-block title="PNPM">
```bash
npx prettier --write "**/*.pug"
pnpm prettier --write "**/*.pug"
```
</code-block>
</code-group>
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@prettier/plugin-pug",
"version": "1.16.5",
"version": "1.16.7",
"description": "Prettier Pug Plugin",
"main": "dist/index.js",
"scripts": {
"clean": "rm -Rf coverage dist junit.xml yarn.lock node_modules",
"clean": "rm -Rf coverage dist junit.xml pnpm-lock.yaml node_modules",
"build": "tsc",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"format": "prettier --write .",
"lint": "eslint .",
"test": "jest",
"prepublishOnly": "yarn clean && yarn install && yarn build"
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build"
},
"keywords": [
"pug",
Expand Down Expand Up @@ -39,26 +39,26 @@
"pug-lexer": "^5.0.0"
},
"devDependencies": {
"@types/jest": "~27.0.1",
"@types/node": "~16.7.9",
"@types/prettier": "~2.3.2",
"@typescript-eslint/eslint-plugin": "~4.30.0",
"@typescript-eslint/parser": "~4.30.0",
"@types/jest": "~27.0.2",
"@types/node": "~16.10.3",
"@types/prettier": "~2.4.1",
"@typescript-eslint/eslint-plugin": "~5.0.0",
"@typescript-eslint/parser": "~5.0.0",
"benchmark": "~2.1.4",
"eslint": "~7.32.0",
"eslint": "~8.0.0",
"eslint-config-prettier": "~8.3.0",
"eslint-define-config": "~1.0.9",
"eslint-define-config": "~1.1.1",
"eslint-plugin-inclusive-language": "~2.1.1",
"eslint-plugin-jsdoc": "~36.0.8",
"eslint-plugin-jsdoc": "~36.1.1",
"eslint-plugin-prettier": "~4.0.0",
"eslint-plugin-spellcheck": "~0.0.19",
"jest": "~27.1.0",
"jest-junit": "~12.2.0",
"jest": "~27.2.5",
"jest-junit": "~13.0.0",
"np": "~7.5.0",
"prettier": "2.3.2",
"prettier-plugin-organize-imports": "2.2.0",
"prettier": "2.4.1",
"prettier-plugin-organize-imports": "~2.3.4",
"ts-jest": "~27.0.5",
"typescript": "~4.4.2",
"typescript": "~4.4.3",
"vuepress": "~1.8.2",
"vuepress-theme-yuu": "~3.1.1"
},
Expand Down
Loading

0 comments on commit 10bce6f

Please sign in to comment.