diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..95dc1a00 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +# Change these settings to your own preference +indent_style = tab + +[*.{yaml,yml,md,json,xml,properties}] +indent_size = 2 +indent_style = space + +[*.md] +trim_trailing_whitespace = false diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 9d72951d..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true, - "node": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": ["./tsconfig.json"], - "sourceType": "module" - }, - "plugins": [ - "@typescript-eslint" - ] -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..6c06ec91 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,25 @@ +import eslint from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + { + languageOptions: { + globals: { + ...globals.browser, + sap: "readonly" + }, + ecmaVersion: 2023, + parserOptions: { + project: true, + tsconfigRootDir: import.meta.dirname + } + } + }, + { + ignores: ["eslint.config.mjs"] + } +); diff --git a/package.json b/package.json index fa43d060..c3076f70 100644 --- a/package.json +++ b/package.json @@ -17,14 +17,14 @@ "url": "https://github.com/SAP-samples/ui5-typescript-helloworld.git" }, "devDependencies": { - "@types/openui5": "1.116.1", - "@typescript-eslint/eslint-plugin": "^6.3.0", - "@typescript-eslint/parser": "^6.3.0", - "@ui5/cli": "^3.4.0", - "eslint": "^8.46.0", - "typescript": "^5.1.6", - "ui5-middleware-livereload": "^3.0.0", - "ui5-middleware-simpleproxy": "^3.0.0", - "ui5-tooling-transpile": "^3.0.1" + "@types/openui5": "1.127.0", + "@ui5/cli": "^4", + "eslint": "^9.10.0", + "typescript-eslint": "^8.4.0", + "globals": "^15.9.0", + "typescript": "^5.6.2", + "ui5-middleware-livereload": "^3", + "ui5-middleware-simpleproxy": "^3", + "ui5-tooling-transpile": "^3" } } diff --git a/tsconfig.json b/tsconfig.json index 9f3e7641..d7941a5a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,18 +1,18 @@ { - "compilerOptions": { - "target": "es2022", - "module": "es2022", - "moduleResolution": "node", - "skipLibCheck": true, - "allowJs": true, - "strict": true, - "strictPropertyInitialization": false, - "rootDir": "./webapp", - "baseUrl": "./", - "paths": { - "ui5/typescript/helloworld/*": ["./webapp/*"] - }, - "composite": true + "compilerOptions": { + "target": "es2023", + "module": "es2022", + "moduleResolution": "node", + "skipLibCheck": true, + "allowJs": true, + "strict": true, + "strictPropertyInitialization": false, + "rootDir": "./webapp", + "baseUrl": "./", + "paths": { + "ui5/typescript/helloworld/*": ["./webapp/*"] }, - "include": ["./webapp/**/*"] + "composite": true + }, + "include": ["./webapp/**/*"] } diff --git a/ui5-dist.yaml b/ui5-dist.yaml index 64d22b0c..fa7f7f5f 100644 --- a/ui5-dist.yaml +++ b/ui5-dist.yaml @@ -1,4 +1,4 @@ -specVersion: "3.0" +specVersion: "4.0" metadata: name: ui5.typescript.helloworld type: application @@ -8,7 +8,7 @@ resources: webapp: dist framework: name: OpenUI5 - version: "1.116.0" + version: "1.127.0" libraries: - name: sap.m - name: sap.ui.core diff --git a/ui5.yaml b/ui5.yaml index 17739c0c..775fb752 100644 --- a/ui5.yaml +++ b/ui5.yaml @@ -1,10 +1,10 @@ -specVersion: "3.0" +specVersion: "4.0" metadata: name: ui5.typescript.helloworld type: application framework: name: OpenUI5 - version: "1.116.0" + version: "1.127.0" libraries: - name: sap.m - name: sap.ui.core