@prettier/plugin-xml
Advanced tools
Comparing version 0.7.2 to 0.8.0
@@ -9,2 +9,8 @@ # Changelog | ||
## [0.8.0] - 2020-07-03 | ||
### Added | ||
- Support `.wsdl` files. | ||
## [0.7.2] - 2020-02-12 | ||
@@ -74,3 +80,5 @@ | ||
[unreleased]: https://github.com/prettier/plugin-xml/compare/v0.7.1...HEAD | ||
[unreleased]: https://github.com/prettier/plugin-xml/compare/v0.8.0...HEAD | ||
[0.8.0]: https://github.com/prettier/plugin-xml/compare/v0.7.2...v0.8.0 | ||
[0.7.2]: https://github.com/prettier/plugin-xml/compare/v0.7.1...v0.7.2 | ||
[0.7.1]: https://github.com/prettier/plugin-xml/compare/v0.7.0...v0.7.1 | ||
@@ -77,0 +85,0 @@ [0.7.0]: https://github.com/prettier/plugin-xml/compare/v0.6.0...v0.7.0 |
{ | ||
"name": "@prettier/plugin-xml", | ||
"version": "0.7.2", | ||
"version": "0.8.0", | ||
"description": "prettier plugin for XML", | ||
@@ -26,11 +26,35 @@ "main": "src/plugin.js", | ||
"devDependencies": { | ||
"eslint": "^6.0.1", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-config-prettier": "^6.10.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"jest": "^25.1.0" | ||
"eslint": "^7.0.0", | ||
"eslint-config-prettier": "^6.10.1", | ||
"jest": "^26.0.0" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"eslint:recommended", | ||
"prettier" | ||
], | ||
"env": { | ||
"es6": true, | ||
"jest": true, | ||
"node": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018 | ||
}, | ||
"rules": { | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_" | ||
} | ||
] | ||
} | ||
}, | ||
"jest": { | ||
"testRegex": ".test.js$" | ||
}, | ||
"prettier": { | ||
"trailingComma": "none" | ||
} | ||
} |
@@ -7,4 +7,4 @@ <h1 align="center">Prettier for XML</h1> | ||
</a> | ||
<a href="https://travis-ci.org/prettier/plugin-xml"> | ||
<img alt="Travis" src="https://img.shields.io/travis/prettier/plugin-xml/master.svg?style=flat-square"> | ||
<a href="https://github.com/prettier/plugin-xml/actions"> | ||
<img alt="GitHub Actions" src="https://img.shields.io/github/workflow/status/prettier/plugin-xml/Main?style=flat-square"> | ||
</a> | ||
@@ -11,0 +11,0 @@ <a href="https://www.npmjs.com/package/@prettier/plugin-xml"> |
const parse = require("./parse"); | ||
const print = require("./print"); | ||
const locStart = node => { | ||
const locStart = (node) => { | ||
if (node.location) { | ||
@@ -11,3 +11,3 @@ return node.location.startOffset; | ||
const locEnd = node => { | ||
const locEnd = (node) => { | ||
if (node.location) { | ||
@@ -24,4 +24,4 @@ return node.location.endOffset; | ||
parsers: ["xml"], | ||
extensions: [".dita", ".ditamap", ".ditaval", ".svg", ".xml", ".xsd"], | ||
vscodeLanguageIds: ["xml"] | ||
extensions: [".dita", ".ditamap", ".ditaval", ".svg", ".wsdl", ".xml", ".xsd"], | ||
vscodeLanguageIds: ["xml", "forcesourcemanifest"] | ||
} | ||
@@ -28,0 +28,0 @@ ], |
@@ -12,3 +12,3 @@ const { | ||
const elementOnly = node => { | ||
const elementOnly = (node) => { | ||
const { CData, chardata, element, reference } = node.children; | ||
@@ -18,3 +18,3 @@ | ||
!CData && | ||
(!chardata || chardata.every(datum => !datum.children.TEXT)) && | ||
(!chardata || chardata.every((datum) => !datum.children.TEXT)) && | ||
element && | ||
@@ -25,3 +25,3 @@ !reference | ||
const printCData = node => ({ | ||
const printCData = (node) => ({ | ||
offset: node.startOffset, | ||
@@ -31,3 +31,3 @@ printed: node.image | ||
const printComment = node => ({ | ||
const printComment = (node) => ({ | ||
offset: node.startOffset, | ||
@@ -47,3 +47,3 @@ printed: node.image | ||
const printProcessingInstruction = node => ({ | ||
const printProcessingInstruction = (node) => ({ | ||
offset: node.startOffset, | ||
@@ -53,3 +53,3 @@ printed: node.image | ||
const printReference = node => ({ | ||
const printReference = (node) => ({ | ||
offset: node.location.startOffset, | ||
@@ -128,3 +128,3 @@ printed: (node.children.CharRef || node.children.EntityRef)[0].image | ||
if (misc) { | ||
misc.forEach(node => { | ||
misc.forEach((node) => { | ||
if (node.children.PROCESSING_INSTRUCTION) { | ||
@@ -131,0 +131,0 @@ parts.push({ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22294
3
345