ember-template-lint / ember-cli-template-lint

Ember CLI integration for ember-template-lint
MIT License
151 stars 53 forks source link

.editorconfig not found #681

Open ctcpip opened 4 years ago

ctcpip commented 4 years ago

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 commented 4 years ago

A few questions for ya:

ctcpip commented 4 years ago

$ 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 commented 4 years ago

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

ctcpip commented 4 years ago

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

lifeart commented 4 years ago

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

ctcpip commented 4 years ago

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

not used

rwjblue commented 4 years ago

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.