inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
394 stars 40 forks source link

Update @inngest/eslint-plugin recommended config to enable rules and plugin at the same time #698

Open fnimick opened 1 week ago

fnimick commented 1 week ago

It's more difficult to enable the current separate plugin and rule configuration:

{
  "plugins": ["@inngest"],
  "extends": ["plugin:@inngest/recommended"]
}

when using the new flat configuration file format.

It's possible to do so with:

import inngestEslintPlugin from "@inngest/eslint-plugin";
export default [
  ...
  inngestEslintPlugin.configs.recommended,
  ... // other configurations
  {
    languageOptions: { ... },
    plugins: {
      "@inngest": inngestEslintPlugin,
    },
    rules: { ... },
  },
]

But it would be much nicer for the configuration to enable the plugin at the same time so this becomes a one-liner.

In addition, it would be very nice to bundle typescript types at the same time, so the import will be typed correctly.

linear[bot] commented 1 week ago

INN-3610 Update @inngest/eslint-plugin recommended config to enable rules and plugin at the same time