0.0.11
This commit is contained in:
parent
d686c5fa43
commit
628ac2c593
8 changed files with 467 additions and 595 deletions
28
dist/index.mjs
vendored
28
dist/index.mjs
vendored
|
|
@ -7,8 +7,8 @@ const configPhp = {
|
|||
parser: "php",
|
||||
phpVersion: "auto",
|
||||
plugins: ["@prettier/plugin-php"],
|
||||
trailingCommaPHP: true
|
||||
}
|
||||
trailingCommaPHP: true,
|
||||
},
|
||||
};
|
||||
/** Pour les fichiers XML. */
|
||||
const configXml = {
|
||||
|
|
@ -23,8 +23,8 @@ const configXml = {
|
|||
xmlQuoteAttributes: "double",
|
||||
xmlSelfClosingSpace: true,
|
||||
xmlSortAttributesByKey: true,
|
||||
xmlWhitespaceSensitivity: "strict"
|
||||
}
|
||||
xmlWhitespaceSensitivity: "strict",
|
||||
},
|
||||
};
|
||||
const configClassique = {
|
||||
arrowParens: "avoid",
|
||||
|
|
@ -37,15 +37,13 @@ const configClassique = {
|
|||
htmlWhitespaceSensitivity: "ignore",
|
||||
jsdocPreferCodeFences: true,
|
||||
jsdocVerticalAlignment: true,
|
||||
overrides: [{
|
||||
overrides: [
|
||||
{
|
||||
files: ["package.json"],
|
||||
options: { plugins: ["prettier-plugin-pkg"] }
|
||||
}],
|
||||
plugins: [
|
||||
"prettier-plugin-curly",
|
||||
"prettier-plugin-jsdoc",
|
||||
"prettier-plugin-sh"
|
||||
options: { plugins: ["prettier-plugin-pkg"] },
|
||||
},
|
||||
],
|
||||
plugins: ["prettier-plugin-curly", "prettier-plugin-jsdoc", "prettier-plugin-sh"],
|
||||
printWidth: 120,
|
||||
proseWrap: "never",
|
||||
quoteProps: "as-needed",
|
||||
|
|
@ -55,15 +53,11 @@ const configClassique = {
|
|||
tabWidth: 2,
|
||||
trailingComma: "all",
|
||||
tsdoc: true,
|
||||
useTabs: false
|
||||
useTabs: false,
|
||||
};
|
||||
const configWordPress = {
|
||||
...configClassique,
|
||||
overrides: [
|
||||
...configClassique.overrides ?? [],
|
||||
configPhp,
|
||||
configXml
|
||||
]
|
||||
overrides: [...(configClassique.overrides ?? []), configPhp, configXml],
|
||||
};
|
||||
|
||||
//#endregion
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"extends": "node_modules/@gcch/configuration-dprint/dprint.json"
|
||||
}
|
||||
6
index.ts
6
index.ts
|
|
@ -55,11 +55,7 @@ export const configClassique: Readonly<Config> = {
|
|||
},
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
"prettier-plugin-curly",
|
||||
"prettier-plugin-jsdoc",
|
||||
"prettier-plugin-sh",
|
||||
],
|
||||
plugins: ["prettier-plugin-curly", "prettier-plugin-jsdoc", "prettier-plugin-sh"],
|
||||
printWidth: 120,
|
||||
proseWrap: "never",
|
||||
quoteProps: "as-needed",
|
||||
|
|
|
|||
23
justfile
23
justfile
|
|
@ -1,31 +1,34 @@
|
|||
set shell := ["/usr/bin/fish", "-c"]
|
||||
|
||||
# Formate le code.
|
||||
formate:
|
||||
format:
|
||||
bun prettier --cache --cache-location ".cache/prettiercache" --ignore-unknown --parallel-workers 8 --write .
|
||||
dprint fmt
|
||||
dprint fmt --config ~/.config/dprint/dprint.jsonc
|
||||
|
||||
# Met à jour les dépendances NPM.
|
||||
maj-dependances:
|
||||
update:
|
||||
bun update
|
||||
|
||||
# Analyse le code TypeScript avec ESLint.
|
||||
analyse-code:
|
||||
lint-js:
|
||||
bun eslint
|
||||
|
||||
# Analyse le code mort et les dépendances inutilisées du projet.
|
||||
analyse-code-mort:
|
||||
find-dead-code:
|
||||
bun knip
|
||||
bun knip --production
|
||||
|
||||
# Compile le projet.
|
||||
compile:
|
||||
build:
|
||||
bun tsdown --attw --publint
|
||||
|
||||
# Nettoie le dosiser de compilation.
|
||||
nettoie:
|
||||
rm -rfv dist
|
||||
# Nettoie le projet.
|
||||
clean:
|
||||
rm -rf .cache/
|
||||
rm -rf bun.lock
|
||||
rm -rf node_modules/
|
||||
rm -rfv dist/
|
||||
|
||||
# Publie le paquet sur le registre local.
|
||||
publie:
|
||||
publish:
|
||||
npm publish --registry http://localhost:4873
|
||||
|
|
|
|||
31
package.json
31
package.json
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@gcch/configuration-prettier",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.11",
|
||||
"type": "module",
|
||||
"description": "Configuration Prettier partageable pour gcch.",
|
||||
"main": "./dist/index.mjs",
|
||||
|
|
@ -10,32 +10,27 @@
|
|||
".": "./dist/index.mjs",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"files": ["dist"],
|
||||
"peerDependencies": {
|
||||
"prettier": "^4.0.0-alpha.12"
|
||||
"prettier": "^4.0.0-alpha.13"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prettier/plugin-php": "^0.24.0",
|
||||
"@prettier/plugin-xml": "^3.4.2",
|
||||
"prettier": "^4.0.0-alpha.12",
|
||||
"prettier-plugin-curly": "^0.4.0",
|
||||
"prettier-plugin-jsdoc": "^1.5.0",
|
||||
"prettier": "^4.0.0-alpha.13",
|
||||
"prettier-plugin-curly": "^0.4.1",
|
||||
"prettier-plugin-jsdoc": "^1.8.0",
|
||||
"prettier-plugin-pkg": "^0.21.2",
|
||||
"prettier-plugin-sh": "^0.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/core": "^0.18.2",
|
||||
"@gcch/configuration-dprint": "latest",
|
||||
"@gcch/configuration-eslint": "^0.0.9",
|
||||
"eslint": "^9.39.1",
|
||||
"knip": "^5.67.1",
|
||||
"publint": "^0.3.15",
|
||||
"tsdown": "^0.16.0",
|
||||
"typescript": "^6.0.0-dev.20251104"
|
||||
"@gcch/configuration-eslint": "git+https://git.gcch.fr/gcch/configuration-eslint",
|
||||
"eslint": "^10.0.3",
|
||||
"knip": "^5.86.0",
|
||||
"publint": "^0.3.18",
|
||||
"tsdown": "^0.21.2",
|
||||
"typescript": "^6.0.0-dev.20260312"
|
||||
},
|
||||
"trustedDependencies": [
|
||||
"oxc-resolver"
|
||||
]
|
||||
"trustedDependencies": ["oxc-resolver"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export default defineConfig({
|
|||
dts: { oxc: true, parallel: true },
|
||||
entry: ["./index.ts"],
|
||||
minify: false,
|
||||
nodeProtocol: true,
|
||||
platform: "node",
|
||||
sourcemap: false,
|
||||
target: "esnext",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue