Comments (7)
See here for how to use the new functionality: https://github.com/DavidAnson/markdownlint#configuration
I believe this implementation addresses most of the scenarios @IanVS outlined with the exception of a single comment to disable a rule for a single line only. I know how I would implement that, but didn't want to complicate the initial implementation because it's just a shorthand convenience.
from markdownlint.
This is basically markdownlint/markdownlint#16, I believe. I left a comment there a while back about how I'd probably approach this - though I'd very much prefer that both implementations agree on a strategy. I'll try to get to this soon-ish. In the meanwhile, I'm already a submitter for ESLint - if you'd like to turn off MD010 globally, I can offer to turn it back on once this feature is available AND fix any unwanted violations that crept in along the way. Does that work in the short term?
from markdownlint.
Yep, that would do the trick. I have a temporary hack in place now that should get us through until something like this can be implemented.
As for the issue you linked to, I'm personally π for:
- Should not appear in the rendered document
- Should optionally allow a specific rule ID to be mentioned
but π for:
- Should go on the same line where the rule violation occurred, if possible
...as it would preferably be able to handle a range of lines (or the entire file), maybe with a concept similar to /*eslint-disable*/
and /*eslint-enable*/
.
from markdownlint.
I'll defer to however you want to implement it (presumably html comments at this point). Sadly, I haven't had much time to work on the ruby version lately.
markdownlint/markdownlint#16 was initially intended to be a rule exception for a specific line rather than disabling a rule for the whole file, but the ability to disable a rule entirely makes a lot of sense.
My rationale for putting something on the same line was for a quick simple exception for a specific occurrence of a rule violation where you didn't have to specify a line number. Something like ## Hello world <!-- ignore:MD002 -->
. The intent here is for it to be an option to put it on the same line and exclude any line number information rather than for it to be a requirement to do so.
from markdownlint.
Hi, I completely get the reasoning behind disabling for a single line. ESLint has this concept as well. In fact, ESLint gives a lot of flexibility to configure rules:
- Configure rules for entire file.
- Disable/enable all linting for range of lines.
- Disable/enable particular rule for range of lines.
- Disable all linting for one line.
- Disable particular rule for one line.
I don't know how feasible these are for your projects, but they certainly all come in handy for JavaScript linting.
from markdownlint.
I've submitted a PR for eslint to upgrade to markdownlint 0.0.8 which contains the functionality above:
eslint/eslint#3953
from markdownlint.
π Thanks! I will test this out in the next few days.
from markdownlint.
Related Issues (20)
- (MD033 - Inline HTML)
- SRockt HOT 1
- Ignore long lines in HTML comments HOT 3
- MD044: Proper name matched in Hugo-style relref links HOT 7
- MD025 Multiple top-level headings with`title` frontmatter HOT 1
- MD025: Support docfx tabs
- MD051: Support docfx tabs HOT 1
- Store rule config in editorconfig compatible files HOT 5
- ignore a rule for a specific file in the general configuration
- Question: New MD051 warnings upgrading from v14 to v15 HOT 4
- Commit f272517 is a breaking change to 0.33.0 (Update MD024/no-duplicate-heading to remove duplicate parameter allowβ¦) HOT 2
- MD055/56 Don't properly handle pipes in content HOT 4
- MD013: can I set blockquote line length? HOT 5
- MD029: Ordered list with Note block HOT 1
- The rule "MD050 - Strong style" should show problems in a file, but does not. HOT 3
- MD029: any interest in zero_one_or_ordered? HOT 9
- MD013 : Issue with MarkdownLint Configuration Ignoring Line Length Exceeding 80 Words HOT 3
- Customizing plugins, other options with VSCode extension HOT 2
- MD034: Email autolink with incomplete domain in angle brackets incorrectly reported as a violation HOT 2
- MD050 Regression HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdownlint.