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T0FBTyxDQUFDLEdBQUcsT0FBTyxFQUFFLEdBQUcsTUFBTSxFQUFFLEdBQUcsUUFBUSxDQUFDLENBQUM7QUFDN0MsQ0FBQztBQU5ELGtDQU1DIn0= |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PUG_ARROW_PARENS_OPTION = exports.PUG_SEMI_OPTION = exports.PUG_BRACKET_SPACING_OPTION = exports.PUG_USE_TABS_OPTION = exports.PUG_TAB_WIDTH_OPTION = exports.PUG_SINGLE_QUOTE_OPTION = exports.PUG_PRINT_WIDTH_OPTION = void 0; | ||
exports.PUG_BRACKET_SAME_LINE_OPTION = exports.PUG_ARROW_PARENS_OPTION = exports.PUG_SEMI_OPTION = exports.PUG_BRACKET_SPACING_OPTION = exports.PUG_USE_TABS_OPTION = exports.PUG_TAB_WIDTH_OPTION = exports.PUG_SINGLE_QUOTE_OPTION = exports.PUG_PRINT_WIDTH_OPTION = void 0; | ||
const _1 = require("."); | ||
@@ -142,2 +142,55 @@ exports.PUG_PRINT_WIDTH_OPTION = { | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL29wdGlvbnMvY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHdCQUFpQztBQUdwQixRQUFBLHNCQUFzQixHQUFxQjtJQUN2RCxLQUFLLEVBQUUsT0FBTztJQUNkLFFBQVEsRUFBRSxlQUFZO0lBQ3RCLElBQUksRUFBRSxLQUFLO0lBQ1gsT0FBTyxFQUFFLENBQUMsQ0FBQztJQUNYLFdBQVcsRUFBRSwrQ0FBK0M7SUFDNUQsS0FBSyxFQUFFLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQyxFQUFFLEdBQUcsRUFBRSxRQUFRLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBR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Q0Q7WUFDQyxLQUFLLEVBQUUsSUFBSTtZQUNYLFdBQVcsRUFBRSxtQkFBbUI7U0FDaEM7UUFDRDtZQUVDLEtBQUssRUFBRSxNQUFNO1lBQ2IsV0FBVyxFQUFFLG1CQUFtQjtTQUNoQztRQUNEO1lBQ0MsS0FBSyxFQUFFLEtBQUs7WUFDWixXQUFXLEVBQUUsZ0ZBQWdGO1NBQzdGO0tBQ0Q7Q0FDRCxDQUFDO0FBR1csUUFBQSx1QkFBdUIsR0FBNEM7SUFDL0UsS0FBSyxFQUFFLE9BQU87SUFDZCxRQUFRLEVBQUUsZUFBWTtJQUN0QixJQUFJLEVBQUUsUUFBUTtJQUNkLE9BQU8sRUFBRSxJQUFJO0lBQ2IsV0FBVyxFQUFFLDZEQUE2RDtJQUMxRSxPQUFPLEVBQUU7UUFDUjtZQUNDLEtBQUssRUFBRSxJQUFJO1lBQ1gsV0FBVyxFQUFFLDBCQUEwQjtTQUN2QztRQUNEO1lBQ0MsS0FBSyxFQUFFLFFBQVE7WUFDZixXQUFXLEVBQUUsd0NBQXdDO1NBQ3JEO1FBQ0Q7WUFDQyxLQUFLLEVBQUUsT0FBTztZQUNkLFdBQVcsRUFBRSw4Q0FBOEM7U0FDM0Q7S0FDRDtDQUNELENBQUMifQ== | ||
exports.PUG_BRACKET_SAME_LINE_OPTION = { | ||
since: '1.17.0', | ||
category: _1.CATEGORY_PUG, | ||
type: 'choice', | ||
default: null, | ||
description: 'Determines position of closing bracket which wraps attributes.', | ||
choices: [ | ||
{ | ||
value: null, | ||
description: 'Use `bracketSameLine` value.' | ||
}, | ||
{ | ||
value: true, | ||
description: ` | ||
Closing bracket remains with last attribute's line. | ||
Example: | ||
input( | ||
type='text', | ||
value='my_value', | ||
name='my_name', | ||
alt='my_alt', | ||
autocomplete='on') | ||
` | ||
}, | ||
{ | ||
value: 'true', | ||
description: ` | ||
Closing bracket remains with last attribute's line. | ||
Example: | ||
input( | ||
type='text', | ||
value='my_value', | ||
name='my_name', | ||
alt='my_alt', | ||
autocomplete='on') | ||
` | ||
}, | ||
{ | ||
value: false, | ||
description: ` | ||
Closing bracket ends with a new line. | ||
Example: | ||
input( | ||
type='text', | ||
value='my_value', | ||
name='my_name', | ||
alt='my_alt', | ||
autocomplete='on' | ||
) | ||
` | ||
} | ||
] | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL29wdGlvbnMvY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHdCQUFpQztBQUdwQixRQUFBLHNCQUFzQixHQUFxQjtJQUN2RCxLQUFLLEVBQUUsT0FBTztJQUNkLFFBQVEsRUFBRSxlQUFZO0lBQ3RCLElBQUksRUFBRSxLQUFLO0lBQ1gsT0FBTyxFQUFFLENBQUMsQ0FBQztJQUNYLFdBQVcsRUFBRSwrQ0FBK0M7SUFDNUQsS0FBSyxFQUFFLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQyxFQUFFLEdBQUcsRUFBRSxRQUFRLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRTtDQUM1QyxDQUFDO0FBR1csUUFBQSx1QkFBdUIsR0FBaUQ7SUFDcEYsS0FBSyxFQUFFLE9BQU87SUFDZCxRQUFRLEVBQUUsZUFBWTtJQUN0QixJQUFJLEVBQUUsUUFBUTtJQUNkLE9BQU8sRUFBRSxJQUFJO0lBQ2IsV0FBVyxFQUFFLEVBQUU7SUFDZixPQUFPLEVBQUU7UUFDUjtZQUNDLEtBQUssRUFBRSxJQUFJO1lBQ1gsV0FBVyxFQUFFLDBCQUEwQjtTQUN2QztRQUNEO1lBQ0MsS0FBSyxFQUFFLElBQUk7WUFDWCxXQUFXLEVBQUUsNkNBQTZDO1NBQzFEO1FBQ0Q7WUFFQyxLQUFLLEVBQUUsTUFBTTtZQUNiLFdBQ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FQUFFLDZEQUE2RDtJQUMxRSxPQUFPLEVBQUU7UUFDUjtZQUNDLEtBQUssRUFBRSxJQUFJO1lBQ1gsV0FBVyxFQUFFLDBCQUEwQjtTQUN2QztRQUNEO1lBQ0MsS0FBSyxFQUFFLFFBQVE7WUFDZixXQUFXLEVBQUUsd0NBQXdDO1NBQ3JEO1FBQ0Q7WUFDQyxLQUFLLEVBQUUsT0FBTztZQUNkLFdBQVcsRUFBRSw4Q0FBOEM7U0FDM0Q7S0FDRDtDQUNELENBQUM7QUFNVyxRQUFBLDRCQUE0QixHQUFpRDtJQUN6RixLQUFLLEVBQUUsUUFBUTtJQUNmLFFBQVEsRUFBRSxlQUFZO0lBQ3RCLElBQUksRUFBRSxRQUFRO0lBQ2QsT0FBTyxFQUFFLElBQUk7SUFDYixXQUFXLEVBQUUsZ0VBQWdFO0lBQzdFLE9BQU8sRUFBRTtRQUNSO1lBQ0MsS0FBSyxFQUFFLElBQUk7WUFDWCxXQUFXLEVBQUUsOEJBQThCO1NBQzNDO1FBQ0Q7WUFDQyxLQUFLLEVBQUUsSUFBSTtZQUNYLFdBQVcsRUFBRTs7Ozs7Ozs7O0lBU1o7U0FDRDtRQUNEO1lBRUMsS0FBSyxFQUFFLE1BQU07WUFDYixXQUFXLEVBQUU7Ozs7Ozs7OztJQVNaO1NBQ0Q7UUFDRDtZQUNDLEtBQUssRUFBRSxLQUFLO1lBQ1osV0FBVyxFQUFFOzs7Ozs7Ozs7O0lBVVo7U0FDRDtLQUNEO0NBQ0QsQ0FBQyJ9 |
@@ -5,3 +5,3 @@ "use strict"; | ||
function convergeOptions(options) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
var _a, _b, _c, _d, _e, _f; | ||
return { | ||
@@ -22,5 +22,6 @@ printWidth: options.printWidth, | ||
pugSemi: (_e = options.pugSemi) !== null && _e !== void 0 ? _e : options.semi, | ||
attributeSeparator: (_f = options.pugAttributeSeparator) !== null && _f !== void 0 ? _f : options.attributeSeparator, | ||
closingBracketPosition: (_g = options.pugClosingBracketPosition) !== null && _g !== void 0 ? _g : options.closingBracketPosition, | ||
commentPreserveSpaces: (_h = options.pugCommentPreserveSpaces) !== null && _h !== void 0 ? _h : options.commentPreserveSpaces, | ||
bracketSameLine: options.bracketSameLine, | ||
pugBracketSameLine: (_f = options.pugBracketSameLine) !== null && _f !== void 0 ? _f : options.bracketSameLine, | ||
pugAttributeSeparator: options.pugAttributeSeparator, | ||
pugCommentPreserveSpaces: options.pugCommentPreserveSpaces, | ||
pugSortAttributes: options.pugSortAttributes, | ||
@@ -35,5 +36,3 @@ pugSortAttributesBeginning: options.pugSortAttributesBeginning, | ||
pugEmptyAttributesForceQuotes: options.pugEmptyAttributesForceQuotes, | ||
pugSingleFileComponentIndentation: options.pugSingleFileComponentIndentation && | ||
(options.__embeddedInHtml || | ||
options.embeddedInHtml), | ||
pugSingleFileComponentIndentation: options.pugSingleFileComponentIndentation && options.__embeddedInHtml === true, | ||
pugFramework: options.pugFramework, | ||
@@ -44,2 +43,2 @@ pugExplicitDiv: options.pugExplicitDiv | ||
exports.convergeOptions = convergeOptions; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVyZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvb3B0aW9ucy9jb252ZXJnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFVQSxTQUFnQixlQUFlLENBQUMsT0FBeUM7O0lBQ3hFLE9BQU87UUFDTixVQUFVLEVBQUUsT0FBTyxDQUFDLFVBQVU7UUFDOUIsYUFBYSxFQUFFLE9BQU8sQ0FBQyxhQUFhLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFVO1FBQ3hGLFdBQVcsRUFBRSxPQUFPLENBQUMsV0FBVztRQU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jtRQUM1QywwQkFBMEIsRUFBRSxPQUFPLENBQUMsMEJBQTBCO1FBQzlELG9CQUFvQixFQUFFLE9BQU8sQ0FBQyxvQkFBb0I7UUFDbEQsMEJBQTBCLEVBQUUsT0FBTyxDQUFDLDBCQUEwQjtRQUM5RCx3QkFBd0IsRUFBRSxPQUFPLENBQUMsd0JBQXdCO1FBQzFELGdCQUFnQixFQUFFLE9BQU8sQ0FBQyxnQkFBZ0I7UUFDMUMsYUFBYSxFQUFFLE9BQU8sQ0FBQyxhQUFhO1FBQ3BDLGtCQUFrQixFQUFFLE9BQU8sQ0FBQyxrQkFBa0I7UUFDOUMsNkJBQTZCLEVBQUUsT0FBTyxDQUFDLDZCQUE2QjtRQUNwRSxpQ0FBaUMsRUFDaEMsT0FBTyxDQUFDLGlDQUFpQyxJQUFJLE9BQU8sQ0FBQyxnQkFBZ0IsS0FBSyxJQUFJO1FBQy9FLFlBQVksRUFBRSxPQUFPLENBQUMsWUFBWTtRQUNsQyxjQUFjLEVBQUUsT0FBTyxDQUFDLGNBQWM7S0FDdEMsQ0FBQztBQUNILENBQUM7QUFyQ0QsMENBcUNDIn0= |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.options = exports.CATEGORY_PUG = void 0; | ||
const attribute_separator_1 = require("./attribute-separator"); | ||
const pug_attribute_separator_1 = require("./pug-attribute-separator"); | ||
const attribute_sorting_1 = require("./attribute-sorting"); | ||
const closing_bracket_position_1 = require("./closing-bracket-position"); | ||
const comment_preserve_spaces_1 = require("./comment-preserve-spaces"); | ||
const pug_comment_preserve_spaces_1 = require("./pug-comment-preserve-spaces"); | ||
const common_1 = require("./common"); | ||
const common_2 = require("./common"); | ||
const empty_attributes_1 = require("./empty-attributes"); | ||
@@ -15,23 +15,20 @@ const pug_class_notation_1 = require("./pug-class-notation"); | ||
const pug_single_file_component_indentation_1 = require("./pug-single-file-component-indentation"); | ||
const wrap_attributes_1 = require("./wrap-attributes"); | ||
const pug_wrap_attributes_1 = require("./pug-wrap-attributes"); | ||
exports.CATEGORY_PUG = 'Pug'; | ||
exports.options = { | ||
pugPrintWidth: common_1.PUG_PRINT_WIDTH_OPTION, | ||
pugSingleQuote: common_1.PUG_SINGLE_QUOTE_OPTION, | ||
pugTabWidth: common_1.PUG_TAB_WIDTH_OPTION, | ||
pugUseTabs: common_1.PUG_USE_TABS_OPTION, | ||
pugBracketSpacing: common_1.PUG_BRACKET_SPACING_OPTION, | ||
pugArrowParens: common_1.PUG_ARROW_PARENS_OPTION, | ||
pugSemi: common_1.PUG_SEMI_OPTION, | ||
attributeSeparator: attribute_separator_1.ATTRIBUTE_SEPARATOR_OPTION, | ||
pugAttributeSeparator: attribute_separator_1.PUG_ATTRIBUTE_SEPARATOR_OPTION, | ||
closingBracketPosition: closing_bracket_position_1.CLOSING_BRACKET_POSITION_OPTION, | ||
pugClosingBracketPosition: closing_bracket_position_1.PUG_CLOSING_BRACKET_POSITION_OPTION, | ||
commentPreserveSpaces: comment_preserve_spaces_1.COMMENT_PRESERVE_SPACES_OPTION, | ||
pugCommentPreserveSpaces: comment_preserve_spaces_1.PUG_COMMENT_PRESERVE_SPACES_OPTION, | ||
pugPrintWidth: common_2.PUG_PRINT_WIDTH_OPTION, | ||
pugSingleQuote: common_2.PUG_SINGLE_QUOTE_OPTION, | ||
pugTabWidth: common_2.PUG_TAB_WIDTH_OPTION, | ||
pugUseTabs: common_2.PUG_USE_TABS_OPTION, | ||
pugBracketSpacing: common_2.PUG_BRACKET_SPACING_OPTION, | ||
pugArrowParens: common_2.PUG_ARROW_PARENS_OPTION, | ||
pugSemi: common_2.PUG_SEMI_OPTION, | ||
pugBracketSameLine: common_1.PUG_BRACKET_SAME_LINE_OPTION, | ||
pugAttributeSeparator: pug_attribute_separator_1.PUG_ATTRIBUTE_SEPARATOR_OPTION, | ||
pugCommentPreserveSpaces: pug_comment_preserve_spaces_1.PUG_COMMENT_PRESERVE_SPACES_OPTION, | ||
pugSortAttributes: attribute_sorting_1.PUG_SORT_ATTRIBUTES_OPTION, | ||
pugSortAttributesBeginning: attribute_sorting_1.PUG_SORT_ATTRIBUTES_BEGINNING_OPTION, | ||
pugSortAttributesEnd: attribute_sorting_1.PUG_SORT_ATTRIBUTES_END_OPTION, | ||
pugWrapAttributesThreshold: wrap_attributes_1.WRAP_ATTRIBUTES_THRESHOLD, | ||
pugWrapAttributesPattern: wrap_attributes_1.WRAP_ATTRIBUTES_PATTERN, | ||
pugWrapAttributesThreshold: pug_wrap_attributes_1.PUG_WRAP_ATTRIBUTES_THRESHOLD, | ||
pugWrapAttributesPattern: pug_wrap_attributes_1.PUG_WRAP_ATTRIBUTES_PATTERN, | ||
pugEmptyAttributes: empty_attributes_1.PUG_EMPTY_ATTRIBUTES_OPTION, | ||
@@ -45,2 +42,2 @@ pugClassNotation: pug_class_notation_1.PUG_CLASS_NOTATION, | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvb3B0aW9ucy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSwrREFBbUc7QUFFbkcsMkRBSTZCO0FBRTdCLHlFQUFrSDtBQUVsSCx1RUFBK0c7QUFFL0cscUNBUWtCO0FBRWxCLHlEQUEyRztBQUUzRyw2REFBMEQ7QUFDMUQseURBQXNEO0FBRXRELG1EQUFnRDtBQUVoRCx1REFBb0Q7QUFDcEQsbUdBQWdHO0FBQ2hHLHVEQUF1RjtBQUsxRSxRQUFBLFlBQVksR0FBVyxLQUFLLENBQUM7QUFvRDdCLFFBQUEsT0FBTyxHQUFtQjtJQUN0QyxhQUFhLEVBQUUsK0JBQXNCO0lBQ3JDLGNBQWMsRUFBRSxnQ0FBdUI7SUFDdkMsV0FBVyxFQUFFLDZCQUFvQjtJQUNqQyxVQUFVLEVBQUUsNEJBQW1CO0lBQy9CLGlCQ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QsbUdBQWdHO0FBQ2hHLCtEQUFtRztBQUt0RixRQUFBLFlBQVksR0FBVyxLQUFLLENBQUM7QUF1RDdCLFFBQUEsT0FBTyxHQUFtQjtJQUN0QyxhQUFhLEVBQUUsK0JBQXNCO0lBQ3JDLGNBQWMsRUFBRSxnQ0FBdUI7SUFDdkMsV0FBVyxFQUFFLDZCQUFvQjtJQUNqQyxVQUFVLEVBQUUsNEJBQW1CO0lBQy9CLGlCQUFpQixFQUFFLG1DQUEwQjtJQUM3QyxjQUFjLEVBQUUsZ0NBQXVCO0lBQ3ZDLE9BQU8sRUFBRSx3QkFBZTtJQUN4QixrQkFBa0IsRUFBRSxxQ0FBNEI7SUFDaEQscUJBQXFCLEVBQUUsd0RBQThCO0lBQ3JELHdCQUF3QixFQUFFLGdFQUFrQztJQUM1RCxpQkFBaUIsRUFBRSw4Q0FBMEI7SUFDN0MsMEJBQTBCLEVBQUUsd0RBQW9DO0lBQ2hFLG9CQUFvQixFQUFFLGtEQUE4QjtJQUNwRCwwQkFBMEIsRUFBRSxtREFBNkI7SUFDekQsd0JBQXdCLEVBQUUsaURBQTJCO0lBQ3JELGtCQUFrQixFQUFFLDhDQUEyQjtJQUMvQyxnQkFBZ0IsRUFBRSx1Q0FBa0I7SUFDcEMsYUFBYSxFQUFFLGlDQUFlO0lBQzlCLGNBQWMsRUFBRSxtQ0FBZ0I7SUFDaEMsNkJBQTZCLEVBQUUsMkRBQXdDO0lBQ3ZFLGlDQUFpQyxFQUFFLDZFQUFxQztJQUN4RSxZQUFZLEVBQUUsNkJBQWE7Q0FDM0IsQ0FBQyJ9 |
{ | ||
"name": "@prettier/plugin-pug", | ||
"version": "1.16.7", | ||
"version": "1.17.0", | ||
"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", | ||
@@ -14,3 +14,3 @@ "docs:dev": "vuepress dev docs", | ||
"test": "jest", | ||
"prepublishOnly": "yarn clean && yarn install && yarn build" | ||
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build" | ||
}, | ||
@@ -44,21 +44,21 @@ "keywords": [ | ||
"@types/jest": "~27.0.2", | ||
"@types/node": "~16.10.1", | ||
"@types/node": "~16.11.4", | ||
"@types/prettier": "~2.4.1", | ||
"@typescript-eslint/eslint-plugin": "~4.32.0", | ||
"@typescript-eslint/parser": "~4.32.0", | ||
"@typescript-eslint/eslint-plugin": "~5.1.1-alpha.8", | ||
"@typescript-eslint/parser": "~5.1.1-alpha.8", | ||
"benchmark": "~2.1.4", | ||
"eslint": "~7.32.0", | ||
"eslint": "~8.1.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.1.0", | ||
"eslint-plugin-jsdoc": "~37.0.0", | ||
"eslint-plugin-prettier": "~4.0.0", | ||
"eslint-plugin-spellcheck": "~0.0.19", | ||
"jest": "~27.2.3", | ||
"jest-junit": "~12.3.0", | ||
"jest": "~27.3.1", | ||
"jest-junit": "~13.0.0", | ||
"np": "~7.5.0", | ||
"prettier": "2.4.1", | ||
"prettier-plugin-organize-imports": "~2.3.4", | ||
"ts-jest": "~27.0.5", | ||
"typescript": "~4.4.3", | ||
"ts-jest": "~27.0.7", | ||
"typescript": "~4.4.4", | ||
"vuepress": "~1.8.2", | ||
@@ -68,4 +68,4 @@ "vuepress-theme-yuu": "~3.1.1" | ||
"peerDependencies": { | ||
"prettier": "^2.1.0" | ||
"prettier": "^2.3.0" | ||
} | ||
} |
@@ -56,3 +56,7 @@ <p align="center"> | ||
```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 | ||
``` | ||
@@ -63,3 +67,7 @@ | ||
```bash | ||
npx prettier --write "**/*.pug" | ||
# or | ||
yarn prettier --write "**/*.pug" | ||
# or | ||
pnpm prettier --write "**/*.pug" | ||
``` | ||
@@ -113,5 +121,5 @@ | ||
- 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. | ||
@@ -118,0 +126,0 @@ ## Credits |
@@ -26,3 +26,3 @@ import type { ChoiceSupportOption, PathArraySupportOption } from 'prettier'; | ||
/** Pug sort attributes option. */ | ||
export const PUG_SORT_ATTRIBUTES_OPTION: ChoiceSupportOption<SortAttributes> = { | ||
export const PUG_SORT_ATTRIBUTES_OPTION: ChoiceSupportOption<PugSortAttributes> = { | ||
since: '1.8.0', | ||
@@ -41,2 +41,2 @@ category: CATEGORY_PUG, | ||
/** Sort attributes. */ | ||
export type SortAttributes = 'asc' | 'desc' | 'as-is'; | ||
export type PugSortAttributes = 'asc' | 'desc' | 'as-is'; |
import type { AttributeToken } from 'pug-lexer'; | ||
import type { SortAttributes } from './index'; | ||
import type { PugSortAttributes } from './index'; | ||
@@ -22,3 +22,3 @@ /** Compare result. */ | ||
b: AttributeToken, | ||
sortAttributes: SortAttributes, | ||
sortAttributes: PugSortAttributes, | ||
sortAttributesBeginning: string[], | ||
@@ -25,0 +25,0 @@ sortAttributesEnd: string[] |
@@ -161,1 +161,57 @@ import type { ChoiceSupportOption, IntSupportOption } from 'prettier'; | ||
export type ArrowParens = 'avoid' | 'always'; | ||
/** Pug bracket same line option. */ | ||
export const PUG_BRACKET_SAME_LINE_OPTION: ChoiceSupportOption<boolean | 'true' | null> = { | ||
since: '1.17.0', | ||
category: CATEGORY_PUG, | ||
type: 'choice', | ||
default: null, | ||
description: 'Determines position of closing bracket which wraps attributes.', | ||
choices: [ | ||
{ | ||
value: null, | ||
description: 'Use `bracketSameLine` value.' | ||
}, | ||
{ | ||
value: true, | ||
description: ` | ||
Closing bracket remains with last attribute's line. | ||
Example: | ||
input( | ||
type='text', | ||
value='my_value', | ||
name='my_name', | ||
alt='my_alt', | ||
autocomplete='on') | ||
` | ||
}, | ||
{ | ||
// Workaround, because prettier doesn't accept just `true` as choice value in CLI | ||
value: 'true', | ||
description: ` | ||
Closing bracket remains with last attribute's line. | ||
Example: | ||
input( | ||
type='text', | ||
value='my_value', | ||
name='my_name', | ||
alt='my_alt', | ||
autocomplete='on') | ||
` | ||
}, | ||
{ | ||
value: false, | ||
description: ` | ||
Closing bracket ends with a new line. | ||
Example: | ||
input( | ||
type='text', | ||
value='my_value', | ||
name='my_name', | ||
alt='my_alt', | ||
autocomplete='on' | ||
) | ||
` | ||
} | ||
] | ||
}; |
@@ -13,2 +13,3 @@ import type { ParserOptions } from 'prettier'; | ||
return { | ||
// Prettier base options | ||
printWidth: options.printWidth, | ||
@@ -28,5 +29,8 @@ pugPrintWidth: options.pugPrintWidth !== -1 ? options.pugPrintWidth : options.printWidth, | ||
pugSemi: options.pugSemi ?? options.semi, | ||
attributeSeparator: options.pugAttributeSeparator ?? options.attributeSeparator, | ||
closingBracketPosition: options.pugClosingBracketPosition ?? options.closingBracketPosition, | ||
commentPreserveSpaces: options.pugCommentPreserveSpaces ?? options.commentPreserveSpaces, | ||
bracketSameLine: options.bracketSameLine, | ||
pugBracketSameLine: options.pugBracketSameLine ?? options.bracketSameLine, | ||
// Pug specific options | ||
pugAttributeSeparator: options.pugAttributeSeparator, | ||
pugCommentPreserveSpaces: options.pugCommentPreserveSpaces, | ||
pugSortAttributes: options.pugSortAttributes, | ||
@@ -42,6 +46,3 @@ pugSortAttributesBeginning: options.pugSortAttributesBeginning, | ||
pugSingleFileComponentIndentation: | ||
options.pugSingleFileComponentIndentation && | ||
(options.__embeddedInHtml || | ||
// @ts-expect-error: `embeddedInHtml` was removed in Prettier 2.3.0 | ||
options.embeddedInHtml), | ||
options.pugSingleFileComponentIndentation && options.__embeddedInHtml === true, | ||
pugFramework: options.pugFramework, | ||
@@ -48,0 +49,0 @@ pugExplicitDiv: options.pugExplicitDiv |
import type { ParserOptions, SupportOptions } from 'prettier'; | ||
import type { AttributeSeparator } from './attribute-separator'; | ||
import { ATTRIBUTE_SEPARATOR_OPTION, PUG_ATTRIBUTE_SEPARATOR_OPTION } from './attribute-separator'; | ||
import type { SortAttributes } from './attribute-sorting'; | ||
import type { PugAttributeSeparator } from './pug-attribute-separator'; | ||
import { PUG_ATTRIBUTE_SEPARATOR_OPTION } from './pug-attribute-separator'; | ||
import type { PugSortAttributes } from './attribute-sorting'; | ||
import { | ||
@@ -10,7 +10,5 @@ PUG_SORT_ATTRIBUTES_BEGINNING_OPTION, | ||
} from './attribute-sorting'; | ||
import type { ClosingBracketPosition } from './closing-bracket-position'; | ||
import { CLOSING_BRACKET_POSITION_OPTION, PUG_CLOSING_BRACKET_POSITION_OPTION } from './closing-bracket-position'; | ||
import type { CommentPreserveSpaces } from './comment-preserve-spaces'; | ||
import { COMMENT_PRESERVE_SPACES_OPTION, PUG_COMMENT_PRESERVE_SPACES_OPTION } from './comment-preserve-spaces'; | ||
import type { ArrowParens } from './common'; | ||
import type { PugCommentPreserveSpaces } from './pug-comment-preserve-spaces'; | ||
import { PUG_COMMENT_PRESERVE_SPACES_OPTION } from './pug-comment-preserve-spaces'; | ||
import { ArrowParens, PUG_BRACKET_SAME_LINE_OPTION } from './common'; | ||
import { | ||
@@ -35,3 +33,3 @@ PUG_ARROW_PARENS_OPTION, | ||
import { PUG_SINGLE_FILE_COMPONENT_INDENTATION } from './pug-single-file-component-indentation'; | ||
import { WRAP_ATTRIBUTES_PATTERN, WRAP_ATTRIBUTES_THRESHOLD } from './wrap-attributes'; | ||
import { PUG_WRAP_ATTRIBUTES_PATTERN, PUG_WRAP_ATTRIBUTES_THRESHOLD } from './pug-wrap-attributes'; | ||
@@ -50,3 +48,10 @@ /** | ||
ParserOptions, | ||
'printWidth' | 'singleQuote' | 'tabWidth' | 'useTabs' | 'bracketSpacing' | 'arrowParens' | 'semi' | ||
| 'printWidth' | ||
| 'singleQuote' | ||
| 'tabWidth' | ||
| 'useTabs' | ||
| 'bracketSpacing' | ||
| 'arrowParens' | ||
| 'semi' | ||
| 'bracketSameLine' | ||
> { | ||
@@ -61,13 +66,9 @@ /* eslint-enable @typescript-eslint/indent */ | ||
pugSemi: boolean | null; | ||
pugBracketSameLine: boolean | null; | ||
attributeSeparator: AttributeSeparator; | ||
pugAttributeSeparator: AttributeSeparator | null; | ||
pugAttributeSeparator: PugAttributeSeparator; | ||
closingBracketPosition: ClosingBracketPosition; | ||
pugClosingBracketPosition: ClosingBracketPosition | null; | ||
pugCommentPreserveSpaces: PugCommentPreserveSpaces; | ||
commentPreserveSpaces: CommentPreserveSpaces; | ||
pugCommentPreserveSpaces: CommentPreserveSpaces | null; | ||
pugSortAttributes: SortAttributes; | ||
pugSortAttributes: PugSortAttributes; | ||
pugSortAttributesBeginning: string[]; | ||
@@ -103,7 +104,4 @@ pugSortAttributesEnd: string[]; | ||
pugSemi: PUG_SEMI_OPTION, | ||
attributeSeparator: ATTRIBUTE_SEPARATOR_OPTION, | ||
pugBracketSameLine: PUG_BRACKET_SAME_LINE_OPTION, | ||
pugAttributeSeparator: PUG_ATTRIBUTE_SEPARATOR_OPTION, | ||
closingBracketPosition: CLOSING_BRACKET_POSITION_OPTION, | ||
pugClosingBracketPosition: PUG_CLOSING_BRACKET_POSITION_OPTION, | ||
commentPreserveSpaces: COMMENT_PRESERVE_SPACES_OPTION, | ||
pugCommentPreserveSpaces: PUG_COMMENT_PRESERVE_SPACES_OPTION, | ||
@@ -113,4 +111,4 @@ pugSortAttributes: PUG_SORT_ATTRIBUTES_OPTION, | ||
pugSortAttributesEnd: PUG_SORT_ATTRIBUTES_END_OPTION, | ||
pugWrapAttributesThreshold: WRAP_ATTRIBUTES_THRESHOLD, | ||
pugWrapAttributesPattern: WRAP_ATTRIBUTES_PATTERN, | ||
pugWrapAttributesThreshold: PUG_WRAP_ATTRIBUTES_THRESHOLD, | ||
pugWrapAttributesPattern: PUG_WRAP_ATTRIBUTES_PATTERN, | ||
pugEmptyAttributes: PUG_EMPTY_ATTRIBUTES_OPTION, | ||
@@ -117,0 +115,0 @@ pugClassNotation: PUG_CLASS_NOTATION, |
@@ -60,10 +60,8 @@ import type { BuiltInParserName, Options, RequiredOptions } from 'prettier'; | ||
import { createLogger, LogLevel } from './logger'; | ||
import type { AttributeSeparator } from './options/attribute-separator'; | ||
import { resolveAttributeSeparatorOption } from './options/attribute-separator'; | ||
import type { SortAttributes } from './options/attribute-sorting'; | ||
import type { PugAttributeSeparator } from './options/pug-attribute-separator'; | ||
import { resolvePugAttributeSeparatorOption } from './options/pug-attribute-separator'; | ||
import type { PugSortAttributes } from './options/attribute-sorting'; | ||
import { compareAttributeToken, partialSort } from './options/attribute-sorting/utils'; | ||
import type { ClosingBracketPosition } from './options/closing-bracket-position'; | ||
import { resolveClosingBracketPositionOption } from './options/closing-bracket-position'; | ||
import type { CommentPreserveSpaces } from './options/comment-preserve-spaces'; | ||
import { formatCommentPreserveSpaces } from './options/comment-preserve-spaces'; | ||
import type { PugCommentPreserveSpaces } from './options/pug-comment-preserve-spaces'; | ||
import { formatPugCommentPreserveSpaces } from './options/pug-comment-preserve-spaces'; | ||
import type { ArrowParens } from './options/common'; | ||
@@ -123,6 +121,8 @@ import type { PugEmptyAttributes, PugEmptyAttributesForceQuotes } from './options/empty-attributes'; | ||
readonly pugSemi: boolean; | ||
readonly attributeSeparator: AttributeSeparator; | ||
readonly closingBracketPosition: ClosingBracketPosition; | ||
readonly commentPreserveSpaces: CommentPreserveSpaces; | ||
readonly pugSortAttributes: SortAttributes; | ||
readonly bracketSameLine: boolean; | ||
readonly pugBracketSameLine: boolean; | ||
readonly pugAttributeSeparator: PugAttributeSeparator; | ||
readonly pugCommentPreserveSpaces: PugCommentPreserveSpaces; | ||
readonly pugSortAttributes: PugSortAttributes; | ||
readonly pugSortAttributesBeginning: string[]; | ||
@@ -188,3 +188,2 @@ readonly pugSortAttributesEnd: string[]; | ||
private readonly neverUseAttributeSeparator: boolean; | ||
private readonly closingBracketRemainsAtNewLine: boolean; | ||
private readonly wrapAttributesPattern: RegExp | null; | ||
@@ -194,3 +193,3 @@ /* eslint-disable @typescript-eslint/indent */ | ||
RequiredOptions, | ||
'singleQuote' | 'bracketSpacing' | 'arrowParens' | 'printWidth' | 'endOfLine' | 'useTabs' | ||
'singleQuote' | 'bracketSpacing' | 'arrowParens' | 'printWidth' | 'endOfLine' | 'useTabs' | 'bracketSameLine' | ||
>; | ||
@@ -236,8 +235,8 @@ /* eslint-enable @typescript-eslint/indent */ | ||
const attributeSeparator: AttributeSeparator = resolveAttributeSeparatorOption(options.attributeSeparator); | ||
this.alwaysUseAttributeSeparator = attributeSeparator === 'always'; | ||
this.neverUseAttributeSeparator = attributeSeparator === 'none'; | ||
const pugAttributeSeparator: PugAttributeSeparator = resolvePugAttributeSeparatorOption( | ||
options.pugAttributeSeparator | ||
); | ||
this.alwaysUseAttributeSeparator = pugAttributeSeparator === 'always'; | ||
this.neverUseAttributeSeparator = pugAttributeSeparator === 'none'; | ||
this.closingBracketRemainsAtNewLine = resolveClosingBracketPositionOption(options.closingBracketPosition); | ||
const wrapAttributesPattern: string = options.pugWrapAttributesPattern; | ||
@@ -253,6 +252,38 @@ this.wrapAttributesPattern = wrapAttributesPattern ? new RegExp(wrapAttributesPattern) : null; | ||
endOfLine: 'lf', | ||
useTabs: options.pugUseTabs ?? options.useTabs | ||
useTabs: options.pugUseTabs ?? options.useTabs, | ||
bracketSameLine: options.pugBracketSameLine ?? options.bracketSameLine | ||
}; | ||
} | ||
// ## ## ######## ## ######## ######## ######## ###### | ||
// ## ## ## ## ## ## ## ## ## ## ## | ||
// ## ## ## ## ## ## ## ## ## ## | ||
// ######### ###### ## ######## ###### ######## ###### | ||
// ## ## ## ## ## ## ## ## ## | ||
// ## ## ## ## ## ## ## ## ## ## | ||
// ## ## ######## ######## ## ######## ## ## ###### | ||
//#region Helpers | ||
private get computedIndent(): string { | ||
switch (this.previousToken?.type) { | ||
case 'newline': | ||
case 'outdent': | ||
return this.indentString.repeat(this.indentLevel); | ||
case 'indent': | ||
return this.indentString; | ||
case 'start-pug-interpolation': | ||
return ''; | ||
} | ||
return this.options.pugSingleFileComponentIndentation ? this.indentString : ''; | ||
} | ||
private get previousToken(): Token | undefined { | ||
return this.tokens[this.currentIndex - 1]; | ||
} | ||
private get nextToken(): Token | undefined { | ||
return this.tokens[this.currentIndex + 1]; | ||
} | ||
/** | ||
@@ -316,33 +347,2 @@ * Builds the formatted pug content. | ||
// ## ## ######## ## ######## ######## ######## ###### | ||
// ## ## ## ## ## ## ## ## ## ## ## | ||
// ## ## ## ## ## ## ## ## ## ## | ||
// ######### ###### ## ######## ###### ######## ###### | ||
// ## ## ## ## ## ## ## ## ## | ||
// ## ## ## ## ## ## ## ## ## ## | ||
// ## ## ######## ######## ## ######## ## ## ###### | ||
//#region Helpers | ||
private get computedIndent(): string { | ||
switch (this.previousToken?.type) { | ||
case 'newline': | ||
case 'outdent': | ||
return this.indentString.repeat(this.indentLevel); | ||
case 'indent': | ||
return this.indentString; | ||
case 'start-pug-interpolation': | ||
return ''; | ||
} | ||
return this.options.pugSingleFileComponentIndentation ? this.indentString : ''; | ||
} | ||
private get previousToken(): Token | undefined { | ||
return this.tokens[this.currentIndex - 1]; | ||
} | ||
private get nextToken(): Token | undefined { | ||
return this.tokens[this.currentIndex + 1]; | ||
} | ||
private getNextToken(): Token | null { | ||
@@ -589,2 +589,7 @@ this.currentIndex++; | ||
val = format(val, { parser, ...this.codeInterpolationOptions }); | ||
if (this.quotes === '"') { | ||
val = val.replace(/"/g, '\\"'); | ||
} else { | ||
val = val.replace(/'/g, "\\'"); | ||
} | ||
val = unwrapLineFeeds(val); | ||
@@ -969,3 +974,3 @@ if (trimTrailingSemicolon && val[val.length - 1] === ';') { | ||
if (this.wrapAttributes && this.result[this.result.length - 1] !== '(') { | ||
if (this.closingBracketRemainsAtNewLine) { | ||
if (!this.options.pugBracketSameLine) { | ||
this.result += '\n'; | ||
@@ -996,3 +1001,3 @@ } | ||
} else if (this.previousToken?.type === 'attribute') { | ||
if (!this.closingBracketRemainsAtNewLine) { | ||
if (this.options.pugBracketSameLine) { | ||
this.result = this.result.trimRight(); | ||
@@ -1142,3 +1147,3 @@ } | ||
} | ||
result += formatCommentPreserveSpaces(commentToken.val, this.options.commentPreserveSpaces); | ||
result += formatPugCommentPreserveSpaces(commentToken.val, this.options.pugCommentPreserveSpaces); | ||
if (this.nextToken?.type === 'start-pipeless-text') { | ||
@@ -1181,3 +1186,3 @@ this.pipelessComment = true; | ||
if (this.pipelessComment) { | ||
val = formatCommentPreserveSpaces(val, this.options.commentPreserveSpaces, true); | ||
val = formatPugCommentPreserveSpaces(val, this.options.pugCommentPreserveSpaces, true); | ||
} | ||
@@ -1184,0 +1189,0 @@ } else { |
Sorry, the diff of this file is too big to display
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
131
297764
52
5350