-
-
Notifications
You must be signed in to change notification settings - Fork 5k
chore(lint): apply eslint to test files #5655
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
Conversation
How to testgit clone -b chore/apply-lint-to-test https://github.com/hexojs/hexo.git
cd hexo
npm install
npm test |
Pull Request Test Coverage Report for Build 15158240756Details
💛 - Coveralls |
'test/**/*.ts' | ||
], | ||
languageOptions: { | ||
...testConfig.languageOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach is not preferable since it requires knowledge of what objects testConfig
contains. However, I cannot think of a more appropriate method.
...testConfig.rules, | ||
'@typescript-eslint/ban-ts-comment': 0, | ||
'@typescript-eslint/no-unused-expressions': 0, | ||
'@typescript-eslint/no-unused-vars': [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is for tests, we might consider ignoring all no-unused-vars.
...testConfig.languageOptions | ||
}, | ||
rules: { | ||
...testConfig.rules, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here
Co-authored-by: Shuqiao Zhang <1119186082@qq.com> Signed-off-by: yoshinorin <yoshinorin.net@outlook.com>
6938c0c
to
f173676
Compare
What does it do?
I'm sorry for not noticing during my review of #5599 that the
test
directory was excluded from linting. This PR makes the following changes:test
directory to eslint scope.eslint.config.js
file at the root.a. During the review of chore: update eslint warehouse#286, I noticed that placing an
eslint.config.js
in thetest
directory has no effect.Screenshots
N/A
Pull request tasks