0.0.10
This commit is contained in:
parent
5d34b13c4d
commit
d686c5fa43
8 changed files with 292 additions and 114 deletions
16
dist/index.d.mts
vendored
Normal file
16
dist/index.d.mts
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { Config, Options } from "prettier";
|
||||
|
||||
//#region index.d.ts
|
||||
type Overrides = Readonly<{
|
||||
excludeFiles?: Array<string> | string;
|
||||
files: Array<string> | string;
|
||||
options?: Options;
|
||||
}>;
|
||||
/** Pour les fichiers PHP. */
|
||||
declare const configPhp: Overrides;
|
||||
/** Pour les fichiers XML. */
|
||||
declare const configXml: Overrides;
|
||||
declare const configClassique: Readonly<Config>;
|
||||
declare const configWordPress: Readonly<Config>;
|
||||
//#endregion
|
||||
export { configClassique, configPhp, configWordPress, configXml };
|
||||
7
dist/index.d.ts
vendored
7
dist/index.d.ts
vendored
|
|
@ -1,7 +0,0 @@
|
|||
import { Config } from "prettier";
|
||||
|
||||
//#region index.d.ts
|
||||
declare const configClassique: Readonly<Config>;
|
||||
declare const configWordPress: Readonly<Config>;
|
||||
//#endregion
|
||||
export { configClassique, configWordPress };
|
||||
1
dist/index.js
vendored
1
dist/index.js
vendored
|
|
@ -1 +0,0 @@
|
|||
const e={files:[`*.php`],options:{braceStyle:`1tbs`,parser:`php`,phpVersion:`auto`,plugins:[`@prettier/plugin-php`],trailingCommaPHP:!0}},t={files:[`*.xml`],options:{bracketSameLine:!1,parser:`xml`,plugins:[`@prettier/plugin-xml`],printWidth:120,singleAttributePerLine:!0,tabWidth:2,xmlQuoteAttributes:`double`,xmlSelfClosingSpace:!0,xmlSortAttributesByKey:!0,xmlWhitespaceSensitivity:`strict`}},n={arrowParens:`avoid`,bracketSameLine:!1,bracketSpacing:!0,embeddedLanguageFormatting:`auto`,endOfLine:`lf`,experimentalOperatorPosition:`start`,experimentalTernaries:!0,htmlWhitespaceSensitivity:`ignore`,jsdocPreferCodeFences:!0,jsdocVerticalAlignment:!0,overrides:[{files:[`package.json`],options:{plugins:[`prettier-plugin-pkg`]}}],plugins:[`prettier-plugin-curly`,`prettier-plugin-jsdoc`,`prettier-plugin-sh`],printWidth:120,proseWrap:`never`,quoteProps:`as-needed`,semi:!0,singleAttributePerLine:!0,singleQuote:!1,tabWidth:2,trailingComma:`all`,tsdoc:!0,useTabs:!1},r={...n,overrides:[...n.overrides??[],e,t]};export{n as configClassique,r as configWordPress};
|
||||
70
dist/index.mjs
vendored
Normal file
70
dist/index.mjs
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
//#region index.ts
|
||||
/** Pour les fichiers PHP. */
|
||||
const configPhp = {
|
||||
files: ["*.php"],
|
||||
options: {
|
||||
braceStyle: "1tbs",
|
||||
parser: "php",
|
||||
phpVersion: "auto",
|
||||
plugins: ["@prettier/plugin-php"],
|
||||
trailingCommaPHP: true
|
||||
}
|
||||
};
|
||||
/** Pour les fichiers XML. */
|
||||
const configXml = {
|
||||
files: ["*.xml"],
|
||||
options: {
|
||||
bracketSameLine: false,
|
||||
parser: "xml",
|
||||
plugins: ["@prettier/plugin-xml"],
|
||||
printWidth: 120,
|
||||
singleAttributePerLine: true,
|
||||
tabWidth: 2,
|
||||
xmlQuoteAttributes: "double",
|
||||
xmlSelfClosingSpace: true,
|
||||
xmlSortAttributesByKey: true,
|
||||
xmlWhitespaceSensitivity: "strict"
|
||||
}
|
||||
};
|
||||
const configClassique = {
|
||||
arrowParens: "avoid",
|
||||
bracketSameLine: false,
|
||||
bracketSpacing: true,
|
||||
embeddedLanguageFormatting: "auto",
|
||||
endOfLine: "lf",
|
||||
experimentalOperatorPosition: "start",
|
||||
experimentalTernaries: true,
|
||||
htmlWhitespaceSensitivity: "ignore",
|
||||
jsdocPreferCodeFences: true,
|
||||
jsdocVerticalAlignment: true,
|
||||
overrides: [{
|
||||
files: ["package.json"],
|
||||
options: { plugins: ["prettier-plugin-pkg"] }
|
||||
}],
|
||||
plugins: [
|
||||
"prettier-plugin-curly",
|
||||
"prettier-plugin-jsdoc",
|
||||
"prettier-plugin-sh"
|
||||
],
|
||||
printWidth: 120,
|
||||
proseWrap: "never",
|
||||
quoteProps: "as-needed",
|
||||
semi: true,
|
||||
singleAttributePerLine: true,
|
||||
singleQuote: false,
|
||||
tabWidth: 2,
|
||||
trailingComma: "all",
|
||||
tsdoc: true,
|
||||
useTabs: false
|
||||
};
|
||||
const configWordPress = {
|
||||
...configClassique,
|
||||
overrides: [
|
||||
...configClassique.overrides ?? [],
|
||||
configPhp,
|
||||
configXml
|
||||
]
|
||||
};
|
||||
|
||||
//#endregion
|
||||
export { configClassique, configPhp, configWordPress, configXml };
|
||||
Loading…
Add table
Add a link
Reference in a new issue