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

Michal Bryxí @michalbryxi

About: Cycle 🚴 , climb 🗻 , run 🏃 , travel 🌍 , enjoy life ♥. IT guy with the need to live fully.

Location:
Interlaken, Switzerland
Joined:
Feb 1, 2018

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

Publish Date: Mar 29
0 0

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

Comments 0 total

    Add comment