Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint couldn't find the config "plugin:ember/gts-recommended" to extend from #1989

Closed
c0rydoras opened this issue Nov 7, 2023 · 4 comments

Comments

@c0rydoras
Copy link
Contributor

c0rydoras commented Nov 7, 2023

eslint is unable to find plugin:ember/gts-recommended and plugin:ember/gjs-recommended

package version
eslint ^8.52.2
eslint-plugin-ember master
yarn run v1.22.19
$ eslint .

Oops! Something went wrong! :(

ESLint: 8.52.0

ESLint couldn't find the config "plugin:ember/gts-recommended" to extend from. Please check that the name of the config is correct.

The config "plugin:ember/gts-recommended" was referenced from the config file in "/<project-directory>/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

eslintrc.js (from readme)

// .eslintrc.js
module.exports = {
  overrides: [
    {
      files: ['**/*.{js,ts,gjs,gts}'],
      plugins: ['ember'],
      extends: [
        'eslint:recommended',
        'plugin:ember/recommended', // or other configuration
      ],
      rules: {
        // override / enable optional rules
        'ember/no-replace-test-comments': 'error'
      }
    },
    {
      files: ['**/*.gts'],
      parser: 'eslint-plugin-ember/gjs-gts-parser',
      plugins: ['ember'],
      extends: [
        'eslint:recommended',
        'plugin:ember/gts-recommended', // or other configuration
      ],
    },
    {
      files: ['**/*.gjs'],
      parser: 'eslint-plugin-ember/gjs-gts-parser',
      plugins: ['ember'],
      extends: [
        'eslint:recommended',
        'plugin:ember/gjs-recommended', // or other configuration
      ],
    },
    {
      files: ['tests/**/*.{js,ts,gjs,gts}'],
      rules: {
        // override / enable optional rules
        'ember/no-replace-test-comments': 'error'
      }
    },
  ],
};
@c0rydoras
Copy link
Contributor Author

c0rydoras commented Nov 7, 2023

Using recommended-gts and recommended-gjs fixed it, this seems to be wrong in the readme

@patricklx
Copy link
Contributor

Ah, it actually should be recommended-gts

@c0rydoras
Copy link
Contributor Author

I opened a PR: #1990

@NullVoxPopuli
Copy link
Contributor

fix merged! thanks for reporting and fixing!

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

No branches or pull requests

4 participants