-
Notifications
You must be signed in to change notification settings - Fork 18
Bump eslint-config-stylelint from 12.0.0 to 13.1.0; resolves newly-caught errors #80
Bump eslint-config-stylelint from 12.0.0 to 13.1.0; resolves newly-caught errors #80
Conversation
9cece68
to
8402bac
Compare
d295262
to
c70ffdc
Compare
Bumps [eslint-config-stylelint](https://github.com/stylelint/eslint-config-stylelint) from 12.0.0 to 13.1.0. - [Release notes](https://github.com/stylelint/eslint-config-stylelint/releases) - [Changelog](https://github.com/stylelint/eslint-config-stylelint/blob/master/CHANGELOG.md) - [Commits](stylelint/eslint-config-stylelint@12.0.0...13.1.0) Signed-off-by: dependabot[bot] <support@github.com>
c70ffdc
to
d7c3017
Compare
Just pushed some changes that resolve all the
I'm not sure what the best practice is, or if there's a stylelint-preferred way of resolving these errors, but I'm more than happy to try out any suggestions the team has! |
Hi @mattxwang, we can fix ].forEach((file) => {
- it(file, () => {
+ it(`${file}`, () => {
file = require.resolve('./fixtures/' + file);
|
Great, thanks for the suggestions! I can resolve those then! |
We can also fix Jest does not ensure that assertions within control blocks or callback functions are performed. So, I think a straightforward and flat style can avoid unexpected bugs in test code, for example: // good
let root = document.nodes[0]
expect(root.nodes).toHaveLength(1);
expect(root.nodes[0]).toHaveProperty('type', 'decl');
expect(root.nodes[0]).toHaveProperty('prop', 'display');
expect(root.nodes[0]).toHaveProperty('value', 'inline-block');
// not good
document.nodes.forEach((root, i) => { // This test passes even if `document.nodes` is empty!!!
switch (i) {
case 0: {
expect(root.nodes).toHaveLength(1);
root.nodes.forEach((decl) => {
expect(decl).toHaveProperty('type', 'decl');
expect(decl).toHaveProperty('prop', 'display');
expect(decl).toHaveProperty('value', 'inline-block');
});
return;
}
// ...
}
}); |
Hm, for the However, I'm a bit unsure of how to proceed: the current test fixture ( |
Ah, in this case, I think it good to keep the test code as-is and add /* eslint-disable jest/no-conditional-expect -- some reason... */
...
/* eslint-enable jest/no-conditional-expect */ Rewriting the test much seems risky in this case. |
Thank you for the feedback @ybiquitous! I disabled the test for that block and added a comment pointing back to this issue. Upon merging |
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.
@mattxwang I think your work is great! 👏
Thank you for all the help, appreciate it! 😊 |
Bumps eslint-config-stylelint from 12.0.0 to 13.1.0.
Release notes
Sourced from eslint-config-stylelint's releases.
Changelog
Sourced from eslint-config-stylelint's changelog.
Commits
45d8fe4
13.1.0244c192
Prepare 13.1.0 (#110)e482c8c
Addallow
option tono-console
(#109)aecb506
Bump eslint from 7.10.0 to 7.12.1 (#104)a1c876e
Bump eslint-config-prettier from 6.12.0 to 6.15.0 (#106)5fc6840
Bump eslint-plugin-jest from 24.0.2 to 24.1.0 (#107)c84cb3c
Bump np from 6.5.0 to 7.0.0 (#105)8ddf4e2
Bump jest from 26.4.2 to 26.6.1 (#103)74d7762
13.0.0d08dd14
Prepare release for v13.0.0 (reverting v12.2.0) (#102)Maintainer changes
This version was pushed to npm by ybiquitous, a new releaser for eslint-config-stylelint since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)