DEV Community

Cover image for How to disable ember/no-empty-glimmer-component-classes
Michal Bryxí
Michal Bryxí

Posted on

How to disable ember/no-empty-glimmer-component-classes

Well technically in any *.js/*.ts file, but my 🧠 just got stuck on "this has to be part of ember-template-lint config", because I've seen a component that is basically just HTML.

At the end of the day, the linter rule is about JavaScript classes.

So if anyone bumps into this, the answer is NOT to put the config in .template-lintrc.js, but to eslint.config.mjs (or equivalent), in following way:

// eslint.config.mjs

export default ts.config(
  {
    files: ['**/*.{ts,gts}'],
    languageOptions: {
      parser: ember.parser,
      parserOptions: parserOptions.esm.ts,
    },
    extends: [...ts.configs.recommendedTypeChecked, ember.configs.gts],
    rules: {
      'ember/no-empty-glimmer-component-classes': 'off',
    },
  },
);
Enter fullscreen mode Exit fullscreen mode

Top comments (0)