Skip to content

[Feature] Add ESLint plugin for js-toolkit best practices#726

Closed
titouanmathis wants to merge 2788 commits intomainfrom
feat/linting-plugin
Closed

[Feature] Add ESLint plugin for js-toolkit best practices#726
titouanmathis wants to merge 2788 commits intomainfrom
feat/linting-plugin

Conversation

@titouanmathis
Copy link
Copy Markdown
Contributor

@titouanmathis titouanmathis commented May 7, 2026

🔗 Linked issue

N/A

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Adds a new @studiometa/eslint-plugin-js-toolkit package — an ESLint v9 / oxlint plugin that enforces best practices for projects using @studiometa/js-toolkit.

20 rules across 5 categories:

  • Class structure: require-config, require-config-name-pascal-case, refs-camel-case, refs-plural-multiple, options-camel-case, refs-no-bracket-access, require-refs-declared-in-config
  • Lifecycle: async-lifecycle-methods
  • Event handlers: on-handler-naming, on-global-handler-prefix, no-event-listener-methods
  • Forbidden patterns: no-deprecated-properties, no-dispatch-event, no-shadow-dom, no-create-app, no-deep-utils-import, no-shadow-dom
  • Preferred patterns: no-redundant-with-mount-when-in-view, no-manual-intersection-observer, no-manual-mutation-observer, prefer-ref-over-query-selector

The plugin ships a configs.recommended flat config entry with sane defaults. The .oxlintrc.json at the root is updated to use the plugin locally.

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.
  • I have updated the changelog.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
titouanmathis and others added 2 commits May 7, 2026 21:30
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@titouanmathis titouanmathis changed the title [Feature] Add oxlint plugin for js-toolkit best practices [Feature] Add ESLint plugin for js-toolkit best practices May 7, 2026
titouanmathis and others added 3 commits May 7, 2026 21:37
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@titouanmathis
Copy link
Copy Markdown
Contributor Author

See #727

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.

3 participants