Skip to content

Export eslint rules #240

Open
Open

Description

@platypii

It's kind of weird but if we export the default hyperparam eslint rule in the hyperparam eslint package, we could just import the default rules in all the related packages. Could still override individual rules like so:

import javascript from '@eslint/js'
import { hyperparamEslintRules } from 'hyperparam'

export default [
    rules: {
      ...javascript.configs.recommended.rules,
      ...hyperparamEslintRules,
      // jsdoc needs extra parens:
      'no-extra-parens': ['error', 'all', {
        'allowParensAfterCommentPattern': '@type', // allow jsdoc
      }],
    },
  },
]

I'm not totally sold on this specific solution. But I was updating eslint rules in icebird and it would be nice if we had standardization across repos.

Activity

  1. changed the title [-]Export eslint options[/-] [+]Export eslint rules[/+] on May 12, 2025
  2. severo commented on May 12, 2025

    @severo
    Contributor

    Yes, it's a pain to have to maintain so many eslint files. The issue I see with exporting from hyperparam is cross dependencies (hyperparam depends on icebird which (dev-)depends on hyperparam).

    An alternative is to create a small package just for this: hyparam/eslint. It should be pretty stable, so I don't expect it to generate too much maintenance. And it's always nice to have a package that does only one thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy