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