move to devTools

This commit is contained in:
Ludy87 2025-07-10 18:18:04 +02:00
parent 438259ac24
commit bebb5c7951
6 changed files with 23 additions and 18 deletions

View File

@ -125,7 +125,7 @@
"html.format.indentHandlebars": true, "html.format.indentHandlebars": true,
"html.format.preserveNewLines": true, "html.format.preserveNewLines": true,
"html.format.maxPreserveNewLines": 2, "html.format.maxPreserveNewLines": 2,
"stylelint.configFile": ".stylelintrc.json", "stylelint.configFile": "devTools/.stylelintrc.json",
"java.project.sourcePaths": [ "java.project.sourcePaths": [
"stirling-pdf/src/main/java", "stirling-pdf/src/main/java",
"common/src/main/java", "common/src/main/java",

View File

@ -6,6 +6,8 @@ Apply Stylelint to your project's CSS with the following steps:
1. **NPM Script** 1. **NPM Script**
- Go to directory: `devTools/`
- Add Stylelint & stylistic/stylelint-plugin - Add Stylelint & stylistic/stylelint-plugin
```bash ```bash
npm install --save-dev stylelint stylelint-config-standard npm install --save-dev stylelint stylelint-config-standard
@ -15,28 +17,30 @@ Apply Stylelint to your project's CSS with the following steps:
```jsonc ```jsonc
{ {
"scripts": { "scripts": {
"lint:css": "stylelint \"stirling-pdf/src/main/**/*.css\" \"proprietary/src/main/resources/static/css/*.css\" --fix" "lint:css:check": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json",
"lint:css:fix": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json --fix"
} }
} }
``` ```
- Run the linter: - Run the linter:
```bash ```bash
npm run lint:css npm run lint:css:check
npm run lint:css:fix
``` ```
2. **CLI Usage** 2. **CLI Usage**
- Lint all CSS files: - Lint all CSS files:
```bash ```bash
npx stylelint "stylelint \"stirling-pdf/src/main/**/*.css\" \"proprietary/src/main/resources/static/css/*.css\"" npx stylelint ../stirling-pdf/src/main/**/*.css ../proprietary/src/main/resources/static/css/*.css
``` ```
- Lint a single file: - Lint a single file:
```bash ```bash
npx stylelint path/to/file.css npx stylelint ../proprietary/src/main/resources/static/css/audit-dashboard.css
``` ```
- Apply automatic fixes: - Apply automatic fixes:
```bash ```bash
npx stylelint "stirling-pdf/src/main/**/*.css" "proprietary/src/main/resources/static/css/*.css" --fix npx stylelint "../stirling-pdf/src/main/**/*.css" "../proprietary/src/main/resources/static/css/*.css" --fix
``` ```
For full configuration options and rule customization, refer to the official documentation: [https://stylelint.io](https://stylelint.io) For full configuration options and rule customization, refer to the official documentation: [https://stylelint.io](https://stylelint.io)

13
devTools/package.json Normal file
View File

@ -0,0 +1,13 @@
{
"name": "stirling-pdf",
"version": "1.0.0",
"scripts": {
"lint:css:check": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json",
"lint:css:fix": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json --fix"
},
"devDependencies": {
"@stylistic/stylelint-plugin": "^3.1.3",
"stylelint": "^16.21.1",
"stylelint-config-standard": "^38.0.0"
}
}

View File

@ -1,12 +0,0 @@
{
"name": "stirling-pdf",
"version": "1.0.0",
"scripts": {
"lint:css": "stylelint \"stirling-pdf/src/main/**/*.css\" \"proprietary/src/main/resources/static/css/*.css\" --fix"
},
"devDependencies": {
"@stylistic/stylelint-plugin": "^3.1.3",
"stylelint": "^16.21.1",
"stylelint-config-standard": "^38.0.0"
}
}