Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

.editorconfig not found #681

Open
ctcpip opened this issue Jul 28, 2020 · 7 comments
Open

.editorconfig not found #681

ctcpip opened this issue Jul 28, 2020 · 7 comments

Comments

@ctcpip
Copy link

ctcpip commented Jul 28, 2020

I'm getting this linting error:

The eol-last rule allows setting the configuration to `"editorconfig"`, _only_ when an `.editorconfig` file with the `insert_final_newline` setting exists.

We found the following `.editorconfig`: {}glimmer-engine

The .editorconfig file is present in the root of the ember project directory, alongside .template-lintrc.js, etc. and does contain the expected config:

# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false

@rwjblue
Copy link
Member

rwjblue commented Jul 28, 2020

A few questions for ya:

  • What does yarn why ember-template-lint / npm ls ember-template-lint show you (are there multiple versions)?
  • Are you using eslint-plugin-hbs?
  • Can you make a reproduction repo that shows the issue?

@ctcpip
Copy link
Author

ctcpip commented Jul 28, 2020

$ npm ls ember-template-lint
my-app
└─┬ ember-cli-template-lint@2.0.2
└── ember-template-lint@2.9.1

not using eslint-plugin-hbs as far as I know. it's certainly not in package.json anyway

I could try to do a repro soon

@rwjblue
Copy link
Member

rwjblue commented Jul 28, 2020

@ctcpip - Do you get the same error when you run npm run lint:hbs?

@ctcpip
Copy link
Author

ctcpip commented Jul 28, 2020

looks like no.. only when run as part of test suite (or in VS Code)

@lifeart
Copy link

lifeart commented Aug 18, 2020

@ctcpip could you mention Unstable Ember Language Server VSCode extension if used?

@ctcpip
Copy link
Author

ctcpip commented Aug 18, 2020

@ctcpip could you mention Unstable Ember Language Server VSCode extension if used?

not used

@rwjblue
Copy link
Member

rwjblue commented Aug 19, 2020

The issue is that ember-cli-template-lint does not provide the correct file path for us to discover the .editorconfig file. This is one reason why the default new application blueprint dropped ember-cli-template-lint in favor of ember-template-lint.

@dcyriller dcyriller transferred this issue from ember-template-lint/ember-template-lint Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants