Skip to content

Releases: UN-OCHA/hpc-repo-tools

Update peer dependencies

12 Dec 18:53
e7a6b4e
Compare
Choose a tag to compare
  • Update ESLint to v9.16.0 (#60)
  • Update Typescript to 5.7 (#60)

Update dependencies

10 Dec 14:40
84f9731
Compare
Choose a tag to compare

What's Changed

  • Bump @eslint/plugin-kit from 0.2.0 to 0.2.3 by @dependabot in #53
  • Bump cross-spawn from 7.0.3 to 7.0.5 by @dependabot in #54
  • Bump typescript-eslint from 8.14.0 to 8.16.0 by @dependabot in #58
  • Bump prettier from 3.3.3 to 3.4.1 by @dependabot in #55
  • Bump husky from 9.1.6 to 9.1.7 by @dependabot in #56
  • Bump eslint-plugin-unicorn from 56.0.0 to 56.0.1 by @dependabot in #57
  • Update dependencies by @Pl217 in #59
    • Update globals to v15.13.0
    • Update typescript-eslint to v8.18.0
    • Update Prettier to v3.4.2

Full Changelog: v5.2.0...v5.3.0

Update dependencies

14 Nov 09:47
6354d5a
Compare
Choose a tag to compare
  • Updated globals from v15.9.0 to v15.12.0 (#46 & #50)
  • Updated eslint-plugin-unicorn from v55 to v56 (#48)
  • Updated typescript-eslint from v8.8.0 to v8.14.0 (#49 & #51)
    • This adds official Typescript 5.6 support in v8.10.0
  • Updated Typescript from v5.6.2 to v5.6.3 (#51)
  • Updated ESLint from v9.11.1 to v9.14.0 (#51)

Update Typescript to 5.6

02 Oct 14:29
bb0371d
Compare
Choose a tag to compare
  • Update typescript-eslint from v8.4.0 to v8.8.0 (#42)
  • Update prettier-plugin-organize-imports from v4.0.0 to v4.1.0 (#43)
  • Update peer dependencies (#44)
    • Update Typescript to 5.6
    • Update ESLint to v9.11.1

Upgrade to ESLint 9

05 Sep 10:10
e593a0a
Compare
Choose a tag to compare

⚠️ BREAKING CHANGES ⚠️

  • Upgrade to ESLint 9 and adopt flat config style (#32)
  • Replace @typescript-eslint/eslint-plugin and @typescript-eslint/parser packages, which were v7, with typescript-eslint package, which is v8
  • Minimal Node.js version is now 20.15.1 and Node 18 support is dropped
  • Minimal NPM v10 version is raised from 10.5.0 to 10.7.0. NPM v9 is still supported, with minimal version remaining at 9.6.5

Linting rule changes

  • Library eslint-plugin-unicorn got updated from v52 to v55

Full Changelog: v4.2.0...v5.0.0

Update Typescript

20 Aug 14:26
37832ad
Compare
Choose a tag to compare
  • Update Typescript to v5.5.4 (#36)
  • Update Braces to v3.0.3 (#35)

Update dependencies

25 Apr 15:18
42d8e92
Compare
Choose a tag to compare
  • Libraries @typescript-eslint/* got a major upgrade from v6.9.1 to v7.7.1 (#33)
  • Library eslint-plugin-unicorn got updated from v49 to v52, but rule unicorn/consistent-destructuring still throws an error (even though it was removed from recommended list in v51) to keep existing behavior (#33)
  • Peer dependency Typescript updated to 5.4 (#33)
  • Peer dependency ESLint updated to v8.57.0 (#33)
  • Minimum required Node.js 18 & 20 versions increased to latest minor version (#33)
  • Minimum required NPM v9 & v10 versions increased to latest minor version (#33)

Upgrade to Node.js v20 & define additional linting rules

01 Nov 11:23
d154866
Compare
Choose a tag to compare

⚠️ BREAKING CHANGES ⚠️

  • Minimal supported Node.js 18 version is raised to >=18.18.2 (#31)
  • Packages @typescript-eslint/eslint-plugin and @typescript-eslint/parser got major version upgrade to v6.9.1 (#31)
  • Package eslint-config-prettier got major version upgrade to v9.0.0 (#31)
  • ESLint base config is now distributed via JS file and JSON format is no longer supported. This is done to prepare for flat ESLint config which will be rolled out in v9 (#31)

Other changes

  • Minimal supported Node.js 20 version is >=20.9.0 (#31)
  • Minimal supported NPM 10 version is >=10.2.2 (#31)
  • Typescript peer dependency updated to v5.2.2 (#31)
  • ESLint peer dependency updated to v8.52.0 (#31)
  • Prettier base config uses trailingComma: 'es5' to keep the same behavior between v2 and v3 of Prettier (#31)

Linting rule changes

  • Start using unicorn ESLint plugin for lots of new linting rules. Some rules are disabled though:
    • consistent-function-scoping: There are use cases where we want inline functions
    • expiring-todo-comments: There is no particular need to expire TODO comments. There is a bunch of years-old TODO comments in some HPC repositories
    • explicit-length-check: Just checking by if (!array.lenght) {}, instead of if (array.lenght === 0) {} is enough and readable already
    • filename-case: Although using a single casing for file names is a great idea, it would be hard to resolve all the problems that would be reported by this rule in HPC repos. For newer code, there was an agreement to use kebab-case (like in hpc-api). But if we accept that everywhere, model files in hpc-api-core would break camelCase standard used in DB table names. If we were to enforce camel case, there could be a conflicting use case to have a util file named io-ts.ts, so I decided not to have any file naming standard for now
    • no-array-reduce: The reasoning of unicorn developers is that Array.prototype.reduce() is producing a hard-to-read code, but that is highly opinionated and we didn't want to disable the usage. Biggest problem is when reduce is used to traverse an array and it should only be used when a scalar result is produced
    • no-array-callback-reference: This rule would prevent heavy usage of .filter(isDefined) that HPC has across various repos
    • no-await-expression-member: Conflicts with Prettier's formatting style
    • no-negated-condition: Although it could be argued that negated conditions are harder to read, this rule would be too restrictive
    • no-null: We definitely want to keep using both null and undefined in HPC codebases
    • prefer-code-point: HPC codebases don't need that much Unicode support for this to make a difference
    • prefer-number-properties: There is a mix and match of isNaN and Number.isNaN usages across HPC repos, which would be hard to standardize
    • prefer-string-slice: Substring is such a common term in programming terminology that we don't want to get rid of it
    • prefer-switch: switch statements aren't much easier to read and we don't want them replacing some if..else structures
    • prefer-ternary: Some people would advocate usage of ternary is a code smell and we don't want to enforce their usage
    • prefer-top-level-await: This would require HPC to switch to ES modules, which we want eventually, but aren't ready yet
    • prevent-abbreviations: Some notable people in the industry think that Hungarian notation has its place and this rule would prevent such usages. We don't want to have to rename args to arguments_ because it would conflict with a reserved keyword
    • switch-case-braces: This is stylistic taste, but curly braces in switch..case block look so weird
    • text-encoding-identifier-case: We cannot enforce usage of 'utf8' because in some cases it needs to be 'utf-8'
  • Started using prettier-plugin-organize-imports to make sure formatting checks also make sure import order is right. This plugin was chosen because it uses same tooling behind VS Code's "Organize imports", thus making usage much simpler compared to another linting plugin. So, when there is a problem with import order, developers will just format the file (or use "Organize imports" in VS Code) and not have to invoke linting auto-fixing
  • Added more strict linting rules, both from plain ESLint and from @typescript-eslint plugin:

Update dependencies

04 Jul 12:41
9c98aba
Compare
Choose a tag to compare

Upgrade @typescript-eslint/eslint-plugin and @typescript-eslint/parser packages to v5.61.0. (#30)

Upgrade to Node v18 and NPM v9

04 Jul 10:37
c4441cd
Compare
Choose a tag to compare

⚠️ BREAKING CHANGES ⚠️

  • Require Node.js version >=18.16.1 and npm version >=9.5.1 (#29)

Other changes

  • Update dependencies, peer dependencies, and dev dependencies (#29)