hound
hound copied to clipboard
.eslintrc.js format is invalid
I have tried to use houndCI, but it finds that 'import' is only available in ES6 (use 'esversion: 6').
Then I add the following as .hound.yml
.
eslint:
enabled: true
config_file: .eslintrc.js
And it turns out .eslintrc.js format is invalid
.
Help wanted.
See more in https://github.com/calpa/gatsby-starter-calpa-blog/pull/100
I'm having the same problem... 😨
I ended up converting the configuration file to json
and everything worked fine.
We currently only support JSON or YAML formats for .eslitrc
, due to the fact that we need to parse and merge configs.
I added more info to our ESLint docs. https://intercom.help/hound/configuration/eslint
@calpa does changing the format of .eslintrc
work for you?
Changing from .eslintrc.js
to .eslintrc
losses the flexibility of js.
For import/resolver
rule, I have to use the following config:
"import/resolver": {
webpack: {
config: path.join(__dirname, "webpack.config.js")
}
}
Therefore, this project requires to use .eslintrc.js
instead of .eslintrc
.
Well, we could probably support JS format, but we would then have a caveat where org-wide config would not be compatible with JS format.
@salbertson I still get the hound violations 'import' is only available in ES6 (use 'esversion: 6').
after changing .eslintrc.js to .eslintrc. And I read this information too https://intercom.help/hound/configuration/eslint
Update - .hound.yml wasnt in my root folder was the cause of the error. While checking around I found what was causing the problem, after reading this in the docs
Hound will look for a custom configuration file named .hound.yml in the root directory of your project, which lets Hound know what linters to enable or disable.
Thanks