Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0.0 #458

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
37 changes: 25 additions & 12 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,20 @@
"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"
},
"./src/*": {
"types": "./src/*.d.ts",
"default": "./src/*.ts"
},
"./package.json": "./package.json"
},
"keywords": [
"pug",
"prettier-plugin",
Expand Down Expand Up @@ -56,10 +69,9 @@
"pug-lexer": "^5.0.1"
},
"devDependencies": {
"@types/node": "~20.4.4",
"@types/prettier": "~2.7.3",
"@typescript-eslint/eslint-plugin": "~6.1.0",
"@typescript-eslint/parser": "~6.1.0",
"@types/node": "~20.4.5",
"@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 +80,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