diff --git a/.vscode/settings.json b/.vscode/settings.json index 7be42cc97a..25df7e15f1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -95,7 +95,9 @@ "search.exclude": { "**/*.code-search": true, "**/.yarn/**": true, - "**/github-actions/*/packaged-action/**": true + "**/github-actions/*/packaged-action/**": true, + "**/.yarn": true, + "**/.pnp.*": true }, "typescript.enablePromptUseWorkspaceTsdk": true, "typescript.tsdk": ".yarn/sdks/typescript/lib" diff --git a/.yarnrc.yml b/.yarnrc.yml index dc79fc379c..aa654b4428 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -20,7 +20,7 @@ packageExtensions: "@swc/types": "*" "@typescript-eslint/rule-tester@*": dependencies: - "@typescript-eslint/parser": ~8.17.0 + "@typescript-eslint/parser": ~8.18.0 "@angular-eslint/eslint-plugin-template@*": dependencies: "@typescript-eslint/types": "^8.0.0" diff --git a/packages/@ama-sdk/schematics/package.json b/packages/@ama-sdk/schematics/package.json index c30ab460cd..dd7a4ddab1 100644 --- a/packages/@ama-sdk/schematics/package.json +++ b/packages/@ama-sdk/schematics/package.json @@ -144,7 +144,7 @@ "@swc/helpers": "~0.5.0", "@commitlint/cli": "^19.0.0", "@commitlint/config-conventional": "^19.0.0", - "@typescript-eslint/eslint-plugin": "~8.17.0", + "@typescript-eslint/eslint-plugin": "~8.18.0", "jest-junit": "~16.0.0", "lint-staged": "^15.0.0", "minimist": "^1.2.6", diff --git a/packages/@o3r/core/package.json b/packages/@o3r/core/package.json index 7e167b9d63..0b7868e2a6 100644 --- a/packages/@o3r/core/package.json +++ b/packages/@o3r/core/package.json @@ -156,8 +156,8 @@ "@o3r/store-sync": "workspace:^", "@stylistic/eslint-plugin": "~2.7.0", "@types/jest": "~29.5.2", - "@typescript-eslint/eslint-plugin": "~8.17.0", - "@typescript-eslint/parser": "~8.17.0", + "@typescript-eslint/eslint-plugin": "~8.18.0", + "@typescript-eslint/parser": "~8.18.0", "angular-eslint": "~18.4.0", "cpy-cli": "^5.0.0", "eslint": "~9.14.0", @@ -176,7 +176,7 @@ "jest-preset-angular": "~14.2.0", "jsonc-eslint-parser": "~2.4.0", "nx": "~19.8.0", - "typescript-eslint": "~8.17.0", + "typescript-eslint": "~8.18.0", "zone.js": "~0.14.2" }, "engines": { diff --git a/packages/@o3r/create/src/index.ts b/packages/@o3r/create/src/index.ts index f0c014c4d2..695311af81 100644 --- a/packages/@o3r/create/src/index.ts +++ b/packages/@o3r/create/src/index.ts @@ -5,6 +5,7 @@ import { type SpawnSyncOptionsWithBufferEncoding, } from 'node:child_process'; import { + existsSync, readFileSync, writeFileSync, } from 'node:fs'; @@ -265,6 +266,21 @@ const prepareWorkspace = (relativeDirectory = '.', projectPackageManager = 'npm' } } + if (argv.minimal) { + const editorconfigPath = resolve(cwd, '.editorconfig'); + const editorconfig = existsSync(editorconfigPath) ? readFileSync(editorconfigPath, { encoding: 'utf8' }) : ''; + const newEditorconfig = /\[[*]\]/.test(editorconfig) + ? editorconfig.replace(/(\[[*]\])/, '$1\nend_of_line = lf') + : editorconfig.concat('[*]\nend_of_line = lf'); + writeFileSync(editorconfigPath, newEditorconfig); + } + const gitAttributesPath = resolve(cwd, '.gitattributes'); + writeFileSync( + gitAttributesPath, + (existsSync(gitAttributesPath) ? readFileSync(gitAttributesPath, { encoding: 'utf8' }) : '') + .concat('* text eol=lf') + ); + exitProcessIfErrorInSpawnSync(INSTALL_PROCESS_ERROR_CODE, spawnSync(runner, ['install'], spawnSyncOpts)); }; diff --git a/packages/@o3r/eslint-config-otter/package.json b/packages/@o3r/eslint-config-otter/package.json index 4590f93e7e..7af4140fd9 100644 --- a/packages/@o3r/eslint-config-otter/package.json +++ b/packages/@o3r/eslint-config-otter/package.json @@ -73,9 +73,9 @@ "typescript": "^5.5.4" }, "generatorDependencies": { - "@typescript-eslint/eslint-plugin": "~8.17.0", - "@typescript-eslint/parser": "~8.17.0", - "@typescript-eslint/utils": "~8.17.0", + "@typescript-eslint/eslint-plugin": "~8.18.0", + "@typescript-eslint/parser": "~8.18.0", + "@typescript-eslint/utils": "~8.18.0", "eslint": "~9.14.0", "eslint-plugin-jsdoc": "~50.2.0", "eslint-plugin-unicorn": "^56.0.0"