0.0.6
This commit is contained in:
parent
5dd4c86018
commit
360d7e45e6
11 changed files with 521 additions and 13 deletions
67
index.js
67
index.js
|
|
@ -1,67 +0,0 @@
|
|||
/** Pour les fichiers PHP. */
|
||||
const configPhp = {
|
||||
files: ["*.php"],
|
||||
options: {
|
||||
braceStyle: "1tbs",
|
||||
parser: "php",
|
||||
phpVersion: "8.2",
|
||||
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",
|
||||
},
|
||||
};
|
||||
|
||||
/** @type {import("prettier").Config} */
|
||||
export const configClassique = {
|
||||
arrowParens: "avoid",
|
||||
bracketSameLine: false,
|
||||
bracketSpacing: true,
|
||||
embeddedLanguageFormatting: "auto",
|
||||
endOfLine: "lf",
|
||||
experimentalTernaries: true,
|
||||
htmlWhitespaceSensitivity: "ignore",
|
||||
jsdocPreferCodeFences: true,
|
||||
jsdocVerticalAlignment: true,
|
||||
overrides: [
|
||||
// Pour package.json.
|
||||
{
|
||||
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,
|
||||
};
|
||||
|
||||
/** @type {import("prettier").Config} */
|
||||
export const configWordPress = {
|
||||
...configClassique,
|
||||
overrides: [...configClassique.overrides, configPhp, configXml],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue