Skip to content

Commit

Permalink
v3.0.0
Browse files Browse the repository at this point in the history
Co-authored-by: fisker <lionkay@gmail.com>
Co-authored-by: Jürg Lehni <juerg@scratchdisk.com>
  • Loading branch information
3 people committed Jul 25, 2023
1 parent 3dcbe01 commit 0871012
Show file tree
Hide file tree
Showing 164 changed files with 1,134 additions and 603 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ module.exports = defineConfig({
curly: ['error'],
'linebreak-style': ['error', 'unix'],
'no-case-declarations': 'warn',
'no-restricted-globals': [
'error',
{
name: '__dirname',
message: "Use `fileURLToPath(new URL('.', import.meta.url))` instead.",
},
],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],

Expand Down Expand Up @@ -98,9 +105,11 @@ module.exports = defineConfig({
'coffeescript',
'colno',
'doctype',
'dts',
'ecmascript',
'endregion',
'eos',
'esm',
'fallthrough',
'filenames',
'frameset',
Expand All @@ -115,13 +124,15 @@ module.exports = defineConfig({
'lf',
'lineno',
'loc',
'minify',
'multiline',
'multilines',
'num',
'outdent',
'parens',
'pipeless',
'plist',
'postcss',
'pragma',
'prepend',
'readdir',
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report-issue-forms-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ body:
id: plugin-version
attributes:
label: Plugin Version
placeholder: v2.x.x
placeholder: v3.x.x
validations:
required: true
- type: input
id: prettier-version
attributes:
label: Prettier Version
placeholder: v2.x.x
placeholder: v3.x.x
validations:
required: true
- type: checkboxes
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ assignees: ''

| Tool | Version |
| --------- | ----------------------- |
| Plugin | v2.x.x |
| Prettier | v2.x.x |
| Plugin | v3.x.x |
| Prettier | v3.x.x |
| Framework | none,vue,angular,svelte |
| Node | vx.x.x |
| OS | win,linux,mac |
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @type {import('prettier').Options}
*/
module.exports = {
plugins: [require.resolve('prettier-plugin-organize-imports')],
plugins: ['prettier-plugin-organize-imports'],
singleQuote: true,
trailingComma: 'all',
overrides: [
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Next

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

# 3.0.0

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

## BREAKING CHANGES

**Dropped support for Prettier v2 and CJS** ([#458])

If you are using Prettier v2 / CJS, you need to stay on `2.5.2`.

[#458]: https://github.com/prettier/plugin-pug/pull/458

# 2.5.2

Expand Down
3 changes: 1 addition & 2 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ You can write your `.prettierrc.cjs` like this to get fully type check support w
* @type {import('prettier').Options}
*/
module.exports = {
// `require.resolve` is needed for e.g. `pnpm`
plugins: [require.resolve('@prettier/plugin-pug')],
plugins: ['@prettier/plugin-pug'],

printWidth: 120,
singleQuote: true,
Expand Down
30 changes: 19 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "@prettier/plugin-pug",
"version": "2.5.2",
"version": "3.0.0",
"description": "Prettier Pug Plugin",
"main": "dist/index.js",
"scripts": {
"clean": "rimraf coverage .eslintcache dist junit.xml docs/.vitepress/dist pnpm-lock.yaml node_modules",
"build:clean": "rimraf dist",
"build:code": "tsc --project tsconfig.build.json",
"build:code": "tsup-node",
"build": "run-s build:clean build:code",
"docs:build": "vitepress build docs",
"docs:dev": "vitepress dev docs",
Expand All @@ -19,6 +18,15 @@
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build",
"preflight": "pnpm install && run-s format lint build test ts-check"
},
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"keywords": [
"pug",
"prettier-plugin",
Expand Down Expand Up @@ -57,9 +65,8 @@
},
"devDependencies": {
"@types/node": "~20.4.4",
"@types/prettier": "~2.7.3",
"@typescript-eslint/eslint-plugin": "~6.1.0",
"@typescript-eslint/parser": "~6.1.0",
"@typescript-eslint/eslint-plugin": "~6.2.0",
"@typescript-eslint/parser": "~6.2.0",
"@vitest/coverage-v8": "~0.33.0",
"benchmark": "~2.1.4",
"eslint": "~8.45.0",
Expand All @@ -68,21 +75,22 @@
"eslint-gitignore": "~0.1.0",
"eslint-plugin-inclusive-language": "~2.2.0",
"eslint-plugin-jsdoc": "~46.4.4",
"eslint-plugin-prettier": "~4.2.1",
"eslint-plugin-prettier": "~5.0.0",
"eslint-plugin-spellcheck": "~0.0.20",
"npm-run-all": "~4.1.5",
"prettier": "2.8.8",
"prettier": "3.0.0",
"prettier-plugin-organize-imports": "~3.2.3",
"rimraf": "~5.0.1",
"tsup": "~7.1.0",
"typescript": "~5.1.6",
"vite": "~4.4.6",
"vite": "~4.4.7",
"vitepress": "1.0.0-beta.6",
"vitest": "~0.33.0"
},
"peerDependencies": {
"prettier": "^2.3.0"
"prettier": "^3.0.0"
},
"packageManager": "pnpm@8.6.9",
"packageManager": "pnpm@8.6.10",
"engines": {
"node": "^16.13.0 || >=18.0.0",
"npm": ">=7.10.0"
Expand Down

0 comments on commit 0871012

Please sign in to comment.