@edgelogistics/eslint-plugin-backend-nodejs-typescript
v3.0.0
Published
Shared ESLint flat configuration for Edge Logistics Node.js / TypeScript services.
Readme
@edgelogistics/eslint-plugin-backend-nodejs-typescript
Shared ESLint flat configuration for Edge Logistics Node.js / TypeScript services.
Requirements
Node.js 24+, ESLint 9.39.5 or 10.12.0+, TypeScript 5.x or 6.0.x. TypeScript 7 is not supported by the current typescript-eslint parser.
Usage
Install with pnpm and create eslint.config.js:
const backendPlugin = require('@edgelogistics/eslint-plugin-backend-nodejs-typescript');
module.exports = [
{ ignores: ['lib/**', '**/*.spec.ts', '**/test/**'] },
...backendPlugin.configs.recommended,
];A tsconfig.json must include linted files. JavaScript outside the TypeScript project must have its own config or be ignored. Replace .eslintrc and move .eslintignore patterns into the flat config. Run pnpm exec eslint src.
Migration from 2.x
Version 3 replaces the legacy recommended object with a flat-config array. Existing consumers of 2.x can remain on that published version until migrated.
The explicit project rules in src/rules.js remain the source of policy. TypeScript formatting rules removed upstream use Stylistic equivalents; core rules removed upstream also use Stylistic where available. Removed, disabled rules are omitted; an enabled rule without a replacement fails preset loading.
no-empty-interface maps to no-empty-object-type with object types allowed and empty interfaces disallowed. The old catch-variable behavior is explicit (caughtErrors: none), and conditional nullish checks and constant-loop checks retain their old defaults. The annotation arrow option remains supported but deprecated in Stylistic 5; a direct arrow-spacing substitution also checks expression arrows and would change the existing policy, so it is not used.
eslint-plugin-import-x replaces import to support ESLint 10. Both resolver namespaces are configured. Existing Edge rule names and disable directives continue using @edgelogistics/backend-nodejs-typescript/import/... and the TypeScript equivalents. Updated parsers may diagnose additional existing code; warnings keep their original severity.
Unused Airbnb and Standard packages are removed: the old config did not extend their presets. Neither recommended policy nor severity is replaced with a vendor preset.
Local development and validation
Use pnpm install --frozen-lockfile and pnpm run lint. This project's own JavaScript lint retains the original syntax-only scope; validate the recommended preset on a consumer project with its TypeScript configuration.
Validate the packaged plugin in an isolated consumer with a local .tgz; do not use global links or commit a temporary file: path to a service. No upgrade-specific tests are added.
Release
Semantic release runs only on master in Bitbucket. Use a breaking Conventional Commit (feat!) for this flat-config API migration. Do not run pnpm run release, push, or merge without explicit authorization: release publishes to the registry.
