Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
remark-lint-table-cell-padding
Advanced tools
remark-lint rule to warn when table cells are incorrectly padded
Warn when table cells are incorrectly padded.
Options: 'consistent'
, 'padded'
, or 'compact'
, default: 'consistent'
.
'consistent'
detects the first used cell padding style and warns when
subsequent cells use different styles.
remark-stringify
formats tables with padding by default.
Pass
spacedTable: false
to not use padding.
See Using remark to fix your Markdown on how to automatically fix warnings for this rule.
This rule is included in the following presets:
Preset | Setting |
---|---|
remark-preset-lint-consistent | 'consistent' |
remark-preset-lint-markdown-style-guide | 'padded' |
ok.md
When configured with 'padded'
.
| A | B |
| ----- | ----- |
| Alpha | Bravo |
No messages.
not-ok.md
When configured with 'padded'
.
| A | B |
| :----|----: |
| Alpha|Bravo |
| C | D |
| :----- | ---: |
|Charlie | Delta|
Too much padding isn’t good either:
| E | F | G | H |
| :---- | -------- | :----: | -----: |
| Echo | Foxtrot | Golf | Hotel |
3:8: Cell should be padded
3:9: Cell should be padded
7:2: Cell should be padded
7:17: Cell should be padded
13:23: Cell should be padded with 1 space, not 2
13:32: Cell should be padded with 1 space, not 2
empty.md
When configured with 'padded'
.
<!-- Empty cells are OK, but those surrounding them may not be. -->
| | Alpha | Bravo|
| ------ | ----- | ---: |
| Charlie| | Echo|
3:25: Cell should be padded
5:10: Cell should be padded
5:25: Cell should be padded
missing-body.md
When configured with 'padded'
.
<!-- Missing cells are fine as well. -->
| Alpha | Bravo | Charlie |
| ----- | ------- | ------- |
| Delta |
| Echo | Foxtrot |
No messages.
ok.md
When configured with 'compact'
.
|A |B |
|-----|-----|
|Alpha|Bravo|
No messages.
not-ok.md
When configured with 'compact'
.
| A | B |
| -----| -----|
| Alpha| Bravo|
|C | D|
|:------|-----:|
|Charlie|Delta |
3:5: Cell should be compact
3:12: Cell should be compact
7:15: Cell should be compact
ok-padded.md
When configured with 'consistent'
.
| A | B |
| ----- | ----- |
| Alpha | Bravo |
| C | D |
| ------- | ----- |
| Charlie | Delta |
No messages.
not-ok-padded.md
When configured with 'consistent'
.
| A | B |
| ----- | ----- |
| Alpha | Bravo |
| C | D |
| :----- | ----: |
|Charlie | Delta |
7:2: Cell should be padded
ok-compact.md
When configured with 'consistent'
.
|A |B |
|-----|-----|
|Alpha|Bravo|
|C |D |
|-------|-----|
|Charlie|Delta|
No messages.
not-ok-compact.md
When configured with 'consistent'
.
|A |B |
|-----|-----|
|Alpha|Bravo|
|C | D|
|:------|-----:|
|Charlie|Delta |
7:15: Cell should be compact
not-ok.md
When configured with '💩'
.
1:1: Incorrect table cell padding style `💩`, expected `'padded'`, `'compact'`, or `'consistent'`
npm:
npm install remark-lint-table-cell-padding
You probably want to use it on the CLI through a config file:
…
"remarkConfig": {
"plugins": [
…
"lint",
+ "lint-table-cell-padding",
…
]
}
…
Or use it on the CLI directly
remark -u lint -u lint-table-cell-padding readme.md
Or use this on the API:
var remark = require('remark')
var report = require('vfile-reporter')
remark()
.use(require('remark-lint'))
+ .use(require('remark-lint-table-cell-padding'))
.process('_Emphasis_ and **importance**', function (err, file) {
console.error(report(err || file))
})
See contributing.md
in remarkjs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
FAQs
remark-lint rule to warn when table cells are incorrectly padded
The npm package remark-lint-table-cell-padding receives a total of 59,906 weekly downloads. As such, remark-lint-table-cell-padding popularity was classified as popular.
We found that remark-lint-table-cell-padding demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.