-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Standardised messages and docs #46
Comments
Sounds good. One question: For e.g. |
Yeap, I had that same thought just after I clicked "Comment"! :) That works for me if we make the other "always"|"never" rules consistent too e.g.
When it comes to rules with values other than "always" and "never" I think we should tend towards "expected" over "unexpected" e.g. url-quotes: "single"|"double"|none We might need to create multiple rejected messages for each value if we use "unexpected" e.g. For We'd need two rejected messages:
Where as, the "expected" approach would require just one rejected message for each value: e.g. for We'd only need:
Sound good? |
Yes. I think "unexpected" (aka "rejected") is for situations where what's there is not ok but there is not a specific expected alternative. So |
Good stuff :) |
👍 |
I can do this. |
Standardise messages across rules. Closes #46.
## Version **8.2.0** of **eslint-config-stylelint** was just published. <table> <tr> <th align=left> Dependency </th> <td> <a target=_blank href=https://github.com/stylelint/eslint-config-stylelint>eslint-config-stylelint</a> </td> </tr> <tr> <th align=left> Current Version </th> <td> 8.1.0 </td> </tr> <tr> <th align=left> Type </th> <td> devDependency </td> </tr> </table> The version **8.2.0** is **not covered** by your **current version range**. If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update. It might be worth looking into these changes and trying to get this project onto the latest version of eslint-config-stylelint. If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update. --- <details> <summary>Release Notes</summary> <strong>8.2.0</strong> <ul> <li>Added: <code>eslint-plugin-jest</code> ESLint plugin.</li> </ul> </details> <details> <summary>Commits</summary> <p>The new version differs by 11 commits.</p> <ul> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/f6b176a3a6f162c2581c8fbcfa51e97827b8e22a"><code>f6b176a</code></a> <code>Prepare 8.2.0</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/becd05968eb1903a36aa88dc4aaf2afa0b1a8fbc"><code>becd059</code></a> <code>Update CHANGELOG.md</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/2a3b1cc5c4cfde13129ed29aa2f307bb79cd6e03"><code>2a3b1cc</code></a> <code>Add eslint-plugin-jest (#53)</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/3bed50230f652315f5dd7aa50c33b4567075ecf1"><code>3bed502</code></a> <code>Update eslint-plugin-node to the latest version 🚀 (#52)</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/580bc8ce59ba0c390f901f3aa90f49c0aaeadbce"><code>580bc8c</code></a> <code>chore(package): update jest to 23.4.1 (#51)</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/3f989f6505731a01fb453ef4e96e7f4b21efb4d9"><code>3f989f6</code></a> <code>Standardize test file name format (#50)</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/ec06605effe6ae894291e232e6ed600caf9c5bfa"><code>ec06605</code></a> <code>chore(package): update npmpub to version 4.0.1 (#49)</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/9c88a1e7f2325d39f8c76dfdce0443aa3791d16a"><code>9c88a1e</code></a> <code>Update eslint to the latest version 🚀 (#48)</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/cbf1731932000415ba49a3bf233567a233db6978"><code>cbf1731</code></a> <code>Update to node 10 in .travis.yml (#46)</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/9e7b2a640bdc3c89fc0f21431b634543b076ac1b"><code>9e7b2a6</code></a> <code>Bump minimum Node.js versions (#44)</code></li> <li><a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/commit/c4fdf7dfbf2d9f8b7b8a197f3e82a6a9c1e81bd3"><code>c4fdf7d</code></a> <code>fix(package): update eslint-plugin-node to version 6.0.0 (#43)</code></li> </ul> <p>See the <a href="https://urls.greenkeeper.io/stylelint/eslint-config-stylelint/compare/ce2f653fd403f5babd89674a79fc5657cab7260c...f6b176a3a6f162c2581c8fbcfa51e97827b8e22a">full diff</a></p> </details> <details> <summary>FAQ and help</summary> There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new). </details> --- Your [Greenkeeper](https://greenkeeper.io) bot 🌴
What do you guys think about standardising the wording within the messages? They've diverged a little bit already.
The "Expected" approach that @davidtheclark's used in
declaration-bang-space
and indeclaration-block-trailing-semicolon
LGTM. It seems to be used a lot in eslint as well.So, the current rules would look something like:
Note: always tending towards "expected" over "unexpected"...
declaration-colon/bang-space
: "Expected single space before "!"" and "Expected no space before "!"declaration-block-trailing-semicolon
: "Expected a trailing semicolon" and "Expected no trailing semicolon"number-leading-zero
: "Expected a leading zero for fractional value less than 1" and "Expected no leading zero for fractional value less than 1"And "unexpected" would be mainly used for
*-no-*
rules e.g.declaration-no-important
: "Unexpected !important"rule-set-no-single-line
: "Unexpected single-line rule-set"What do you think?
I'm still keen to keep the must always, must never, can, disallow, and enforce language in the documentation as I think it feels nice and clear. e.g. here and here.
Thoughts?
The text was updated successfully, but these errors were encountered: