Skip to content

feat: Lint plugin POC#2097

Merged
aleksanderkatan merged 34 commits intomainfrom
feat/type-aware-lint-plugin-poc
Feb 19, 2026
Merged

feat: Lint plugin POC#2097
aleksanderkatan merged 34 commits intomainfrom
feat/type-aware-lint-plugin-poc

Conversation

@aleksanderkatan
Copy link
Contributor

@aleksanderkatan aleksanderkatan commented Jan 22, 2026

This is an eslint plugin, thus it should be compatible with oxc.
The plugin currently has one rule, which detects int/int divisions.
I did not do any package publishing stuff yet.

image

To test the CLI locally in the typegpu package:

  • run ni; nr build in the lint plugin package,
  • run pnpm install -D eslint, pnpm install -D @typescript-eslint/parser in typegpu package,
  • add "eslint-plugin-typegpu": "workspace:*" dependency to typegpu dev dependencies in package.json,
  • add an eslint.config.js file
import typegpu from 'eslint-plugin-typegpu';
import tsParser from '@typescript-eslint/parser';

export default [
  typegpu.configs.recommended,
  {
    files: ['**/*.ts', '**/*.tsx'],
    languageOptions: {
      parser: tsParser,
    },
  },
];
  • run ni; npx eslint in typegpu package.

The plugin tests use vitest's describe and it under the hood, and are compatible with hot reload. Tests are wrapped into a describe to let vitest's static analysis know that this is in fact a test file.

Edit:
I checked and the plugin is compatible with oxlint -- we need to install it and add "jsPlugins": ["eslint-plugin-typegpu"], to the .oxlintrc.json file, as well as list all rules that we want to enable. To my understanding, importing rule presets will become possible after issue oxc-project/oxc#17527 is completed.

This comment was marked as outdated.

@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@software-mansion software-mansion deleted a comment from Copilot AI Jan 23, 2026
@aleksanderkatan aleksanderkatan marked this pull request as ready for review January 23, 2026 14:34
Copy link
Contributor

@reczkok reczkok left a comment

Choose a reason for hiding this comment

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

Great addition!

Copy link
Collaborator

@cieplypolar cieplypolar left a comment

Choose a reason for hiding this comment

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

LGTM!

aleksanderkatan and others added 3 commits February 19, 2026 15:50
Co-authored-by: Szymon Szulc <103948576+cieplypolar@users.noreply.github.com>
Co-authored-by: Szymon Szulc <103948576+cieplypolar@users.noreply.github.com>
@aleksanderkatan aleksanderkatan merged commit c68f86a into main Feb 19, 2026
4 checks passed
@aleksanderkatan aleksanderkatan deleted the feat/type-aware-lint-plugin-poc branch February 24, 2026 17:23
@aleksanderkatan aleksanderkatan restored the feat/type-aware-lint-plugin-poc branch February 26, 2026 14:46
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.

feat: Type-aware lint plugin POC

4 participants