Skip to content

feat: Add UI5 linter tutorial - #374

Open
flovogt wants to merge 4 commits into
mainfrom
linter-tutorial
Open

flovogt wants to merge 4 commits into
mainfrom
linter-tutorial

Conversation

@flovogt

@flovogt flovogt commented Nov 5, 2026

Copy link
Copy Markdown
Member

Introduces a 7-step tutorial showing how UI5 linter can support modernizing OpenUI5 apps:

  • Step 01: Introduction & Setup
  • Step 02: Running UI5 linter — First Analysis
  • Step 03: Understanding Linter Rules
  • Step 04: Auto-fixing Issues
  • Step 05: Manual Fixes
  • Step 06: Best Practices
  • Step 07: Appendix: Legacy Patterns Reference

Inspired by https://github.com/SAP-samples/ui5con-2026-ui5-linter-workshop.

@flovogt

flovogt commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Follows #373

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The suite registers nonexistent test pages, blocking the documented test run, and the controller examples contain syntax and mobile-layout defects.

7 open issues
What changed in this PR

Adds a hands-on UI5 linter tutorial to the OpenUI5 tutorial site, guiding readers through modernizing an intentionally legacy Todo application.

Changes:

  • Introduces seven lessons covering setup, diagnostics, autofix, manual migration, and ongoing linting.
  • Supplies a starter application with localized UI, sample data, and QUnit tests.
  • Registers the documentation-only tutorial in the site overview and step index.
File Description
README.md Links the new tooling tutorial.
packages/​linter/​steps/​07/​README.md Catalogs legacy findings by file.
packages/​linter/​steps/​06/​README.md Documents lint scripts and CI integration.
packages/​linter/​steps/​05/​README.md Explains manual API, manifest, CSP, and test migrations.
packages/​linter/​steps/​04/​README.md Demonstrates autofix and blocked fixes.
packages/​linter/​steps/​03/​README.md Summarizes rules and autofix scope.
packages/​linter/​steps/​02/​README.md Introduces reports and detailed diagnostics.
packages/​linter/​steps/​01/​README.md Covers installation and starter setup.
packages/​linter/​steps.json Indexes seven documentation-only steps.
packages/​linter/​README.md Introduces the exercise and links lessons.
packages/​linter/​assets/​linter-app/​webapp/​view/​App.view.xml Defines the Todo interface to modernize.
packages/​linter/​assets/​linter-app/​webapp/​util/​Helper.js Supplies a legacy global helper.
packages/​linter/​assets/​linter-app/​webapp/​test/​unit/​unitTests.qunit.js Loads controller unit tests.
packages/​linter/​assets/​linter-app/​webapp/​test/​unit/​legacyTests.qunit.js Bootstraps legacy QUnit tests.
packages/​linter/​assets/​linter-app/​webapp/​test/​unit/​legacyTests.qunit.html Hosts the legacy unit-test runner.
packages/​linter/​assets/​linter-app/​webapp/​test/​unit/​controller/​App.controller.js Tests Todo controller behavior.
packages/​linter/​assets/​linter-app/​webapp/​test/​testsuite.qunit.js Registers legacy test pages.
packages/​linter/​assets/​linter-app/​webapp/​test/​testsuite.qunit.html Provides the test-suite entry page.
packages/​linter/​assets/​linter-app/​webapp/​model/​todoitems.json Seeds the Todo model.
packages/​linter/​assets/​linter-app/​webapp/​manifest.json Includes app configuration targeted for migration.
packages/​linter/​assets/​linter-app/​webapp/​index.html Supplies legacy bootstrap settings and inline configuration.
packages/​linter/​assets/​linter-app/​webapp/​i18n/​i18n.properties Provides default UI strings.
packages/​linter/​assets/​linter-app/​webapp/​i18n/​i18n_en.properties Provides English UI strings.
packages/​linter/​assets/​linter-app/​webapp/​i18n/​i18n_de.properties Provides German UI strings.
packages/​linter/​assets/​linter-app/​webapp/​css/​styles.css Visually marks completed items.
packages/​linter/​assets/​linter-app/​webapp/​controller/​App.controller.js Implements Todo behavior using deliberate legacy patterns.
packages/​linter/​assets/​linter-app/​webapp/​Component.js Defines the starter UI5 component.
packages/​linter/​assets/​linter-app/​ui5.yaml Configures UI5 libraries and coverage middleware.
packages/​linter/​assets/​linter-app/​package.json Defines starter scripts and development dependencies.
packages/​linter/​assets/​linter-app/​eslint.config.mjs Configures JavaScript checks.
packages/​linter/​assets/​linter-app/​.npmrc Sets starter installation defaults.

Review effort: Max

Comment thread README.md Resolved
Comment thread packages/linter/steps/01/README.md Resolved
Comment thread packages/linter/steps/05/README.md Resolved
Comment thread packages/linter/steps/05/README.md Resolved
Comment thread packages/linter/steps/05/README.md Resolved
Comment thread packages/linter/steps/05/README.md Resolved
@flovogt

flovogt commented Nov 12, 2026 •

Copy link
Copy Markdown
Member Author

Open findings:

Critical (breaks the app at runtime):

Broken test infrastructure:

  • assets/linter-app/webapp/test/testsuite.qunit.js:7 — References unit/unitTests.qunit.html and integration/opaTests.qunit.html, neither of which exists. npm test / test-runner silently 404s on both.
    Note: Removed link to integration tests and fixed link to unit test page with 9786e74.

Tutorial content vs. actual source mismatches (breaks learner trust):

  • steps/05/README.md:19 — The "Before" snippet lists jQuery.sap.require('sap.ui.core.BarColor'), which isn't in the actual controller; and omits jquery.sap.strings, which is. Learners comparing to the starter app can't follow along.
  • steps/02/README.md:14 — The step 2 finding list omits jquery.sap.strings, so learners see an unexplained eighth deprecated-require finding in real linter output.
  • steps/07/README.md:1 — Appendix claims "full reference table of all 53 legacy findings" but jquery.sap.strings is missing. The count is also off.
  • steps/06/README.md:8 — Step 6.1 tells learners to add a lint script that already exists in package.json. Only lint:fix is genuinely new.

Minor:

  • steps/05/README.md:558 (PLAUSIBLE) — Complete reveal still accesses sap.ui.require.toUrl() as a global; may re-trigger no-globals on stricter linter versions, contradicting "No findings detected."
    Note: False positive. This API is still valid and no replacement is available so far.
  • assets/linter-app/webapp/i18n/i18n.properties:11 — Missing trailing newline (inconsistent with i18n_de.properties); git diff will show an unexpected \ No newline at end of file marker.
    Note: Fixed with fd7164a.

Introduces a 7-step tutorial showing how UI5 linter can support modernizing OpenUI5 apps:

- Step 01: Introduction & Setup
- Step 02: Running UI5 linter — First Analysis
- Step 03: Understanding Linter Rules
- Step 04: Auto-fixing Issues
- Step 05: Manual Fixes
- Step 06: Best Practices
- Step 07: Appendix: Legacy Patterns Reference

Inspired by https://github.com/SAP-samples/ui5con-2026-ui5-linter-workshop.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants