Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prettier/eslint-plugin-prettier
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.1.0
Choose a base ref
...
head repository: prettier/eslint-plugin-prettier
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.1.1
Choose a head ref
  • 2 commits
  • 7 files changed
  • 2 contributors

Commits on Dec 21, 2023

  1. Copy the full SHA
    b5c0dc5 View commit details
  2. Copy the full SHA
    5a51733 View commit details
Showing with 122 additions and 13 deletions.
  1. +1 −1 .prettierrc
  2. +6 −0 CHANGELOG.md
  3. +3 −1 package.json
  4. +99 −11 pnpm-lock.yaml
  5. +2 −0 test/fixtures/pug.pug
  6. +10 −0 test/prettier.js
  7. +1 −0 worker.js
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"arrowParens": "avoid",
"singleQuote": true,
"plugins": ["prettier-plugin-pkg"]
"plugins": ["@prettier/plugin-pug", "prettier-plugin-pkg"]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 5.1.1

### Patch Changes

- [#619](https://github.com/prettier/eslint-plugin-prettier/pull/619) [`b5c0dc5`](https://github.com/prettier/eslint-plugin-prettier/commit/b5c0dc5715616a0f2a0da8b8c077434efc618a3e) Thanks [@JounQin](https://github.com/JounQin)! - chore: skip formatting inline scripts in pug files

## 5.1.0

### Minor Changes
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-prettier",
"version": "5.1.0",
"version": "5.1.1",
"description": "Runs prettier as an eslint rule",
"repository": "git+https://github.com/prettier/eslint-plugin-prettier.git",
"homepage": "https://github.com/prettier/eslint-plugin-prettier#readme",
@@ -63,6 +63,7 @@
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
"@eslint/js": "^8.55.0",
"@graphql-eslint/eslint-plugin": "^3.20.0",
"@prettier/plugin-pug": "^3.0.0",
"@types/eslint": "^8.44.7",
"@types/prettier-linter-helpers": "^1.0.1",
"commitlint": "^18.4.3",
@@ -74,6 +75,7 @@
"eslint-plugin-mdx": "^2.2.0",
"eslint-plugin-n": "^16.3.1",
"eslint-plugin-prettier": "link:.",
"eslint-plugin-pug": "^1.2.5",
"eslint-plugin-svelte": "^2.32.2",
"eslint-plugin-svelte3": "^4.0.0",
"graphql": "^16.7.1",
110 changes: 99 additions & 11 deletions pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions test/fixtures/pug.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
script.
a();;;;;;
10 changes: 10 additions & 0 deletions test/prettier.js
Original file line number Diff line number Diff line change
@@ -59,6 +59,10 @@ const eslint = new ESLint({
files: '**/eslint-plugin-svelte/*.svelte',
extends: ['plugin:svelte/recommended'],
},
{
files: '*.pug',
plugins: ['pug'],
},
],
},
useEslintrc: false,
@@ -306,6 +310,12 @@ runFixture(
true,
);

/**
* The `script` code style actually does not match `prettier`'s,
* but we are skipping scripts in pug files
*/
runFixture('*.pug', [[]]);

// ------------------------------------------------------------------------------
// Helpers
// ------------------------------------------------------------------------------
1 change: 1 addition & 0 deletions worker.js
Original file line number Diff line number Diff line change
@@ -145,6 +145,7 @@ runAsWorker(
'mdx',
'angular',
'svelte',
'pug',
];
if (parserBlocklist.includes(/** @type {string} */ (inferredParser))) {
return;