Closed zekth closed 3 years ago
I'm not really sure the goal of this project is to allow you to configure eslint
. The eslint file is hardcoded because it is set to use the standard
eslint config. This project follows standard
which is also not configurable.
Now if you're saying your using standard
on the javascript files and ts-standard
on the javascript + typescript files and they are colliding with each other, then that is a bug. standard
and ts-standard
should be able to lint the same javascript files with the same results (there might be some typing differences if you have checkJS
enabled in your tsconfig.json
file).
If you need to tell ts-standard
to only lint certain typescript files, either make sure your tsconfig.json
file only contains those typescript files, or create a tsconfig.eslint.json
file with only the files you want linted.
Hopefully that all makes sense. If I am totally off the mark, let me know.
You can try https://github.com/exuanbo/ts-standardx as an alternative. It's fully customizable but still WIP.
FYI @toddbluhm , made it work on this PR: https://github.com/fastify/fastify/pull/2699 So we might had an odd project scaffolding. Feel free to tells me if anything is wrong.
@zekth that looks right to me
I think, we can close this issue, please reopen if it's a mistake. :smile:
What version of this package are you using? "ts-standard": "^9.0.0"
What problem do you want to solve? Currently the
eslint
config file path is almost hardcoded because of this line : https://github.com/standard/ts-standard/blob/master/src/ts-standard.ts#L72 In this case for example in https://github.com/fastify/fastify we cannot use ts-standard because we have 2 different configs for javascript and typescript parts of the project. Currently the typescript configuration is located intypes/tsconfig.json
and the eslint for TS files is intypes/.eslintrc.json
.What do you think is the correct solution to this problem? Adding the
eslintConfig
file path configurable would fix the issueAre you willing to submit a pull request to implement this change? Sure