@readme/markdown 6.62.3 → 6.62.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@readme/markdown",
3
3
  "description": "ReadMe's React-based Markdown parser",
4
4
  "author": "Rafe Goldberg <rafe@readme.io>",
5
- "version": "6.62.3",
5
+ "version": "6.62.5",
6
6
  "main": "dist/main.node.js",
7
7
  "browser": "dist/main.js",
8
8
  "files": [
@@ -13,7 +13,9 @@
13
13
  "scripts": {
14
14
  "build": "webpack --mode production",
15
15
  "heroku-postbuild": "make emojis && webpack --mode production --config ./webpack.dev.js",
16
- "lint": "eslint . --ext .jsx --ext .js",
16
+ "lint": "npm run lint:js && npm run lint:css",
17
+ "lint:css": "stylelint '{components,styles}/**/*.{css,scss}'",
18
+ "lint:js": "eslint --ext ts,tsx,js,jsx .",
17
19
  "prepare": "husky install",
18
20
  "pretest": "npm run lint",
19
21
  "prettier": "prettier --list-different --write \"./**/**.{js,jsx}\"",
@@ -74,7 +76,8 @@
74
76
  "@commitlint/config-angular": "^17.1.0",
75
77
  "@commitlint/config-conventional": "^17.1.0",
76
78
  "@hot-loader/react-dom": "^16.14.0",
77
- "@readme/eslint-config": "^10.1.1",
79
+ "@readme/eslint-config": "^10.5.2",
80
+ "@readme/stylelint-config": "^3.1.16",
78
81
  "@readme/variable": "^15.1.2",
79
82
  "@semantic-release/changelog": "^6.0.1",
80
83
  "@semantic-release/git": "^10.0.1",
@@ -96,6 +99,7 @@
96
99
  "jest-puppeteer": "^6.1.1",
97
100
  "mini-css-extract-plugin": "^2.6.1",
98
101
  "node-sass": "^7.0.3",
102
+ "postcss": "^8.4.23",
99
103
  "prettier": "^2.7.1",
100
104
  "puppeteer": "^19.0.0",
101
105
  "react": "^16.14.0",
@@ -105,6 +109,7 @@
105
109
  "sass-loader": "^13.1.0",
106
110
  "semantic-release": "^19.0.5",
107
111
  "string.prototype.trimend": "^1.0.5",
112
+ "stylelint": "^14.16.1",
108
113
  "terser-webpack-plugin": "^5.3.6",
109
114
  "webpack": "^5.74.0",
110
115
  "webpack-cli": "^4.10.0",
@@ -1,10 +1,9 @@
1
- @import '../components/Image/style.scss';
2
- @import '../components/Table/style.scss';
3
- @import '../components/TableOfContents/style.scss';
4
- @import '../components/Code/style.scss';
5
- @import '../components/CodeTabs/style.scss';
6
- @import '../components/Callout/style.scss';
7
- @import '../components/Heading/style.scss';
8
- @import '../components/HTMLBlock/style.scss';
9
- @import '../components/Embed/style.scss';
10
- @import '../components/GlossaryItem/style.scss';
1
+ @import '../components/Image/style';
2
+ @import '../components/Table/style';
3
+ @import '../components/TableOfContents/style';
4
+ @import '../components/Code/style';
5
+ @import '../components/CodeTabs/style';
6
+ @import '../components/Callout/style';
7
+ @import '../components/Heading/style';
8
+ @import '../components/Embed/style';
9
+ @import '../components/GlossaryItem/style';
package/styles/gfm.scss CHANGED
@@ -1,19 +1,22 @@
1
+ /* stylelint-disable no-duplicate-selectors */
2
+ /* stylelint-disable no-descending-specificity */
3
+ /* stylelint-disable declaration-block-no-duplicate-properties */
4
+ /* stylelint-disable custom-property-pattern */
5
+ /* stylelint-disable scss/selector-no-redundant-nesting-selector */
1
6
  @mixin gfm {
2
- @include markdownDefaults;
3
- @include markdownOverrides;
7
+ @include markdown-defaults;
8
+ @include markdown-overrides;
4
9
  }
5
10
 
6
- @mixin markdownDefaults {
7
- & {
8
- -ms-text-size-adjust: 100%;
9
- -webkit-text-size-adjust: 100%;
10
- position: relative;
11
- font-family: var(--markdown-font);
12
- line-height: var(--markdown-line-height);
13
- color: var(--markdown-text);
14
- word-wrap: break-word;
15
- @include _clearfix();
16
- }
11
+ @mixin markdown-defaults {
12
+ @include clearfix;
13
+
14
+ color: var(--markdown-text);
15
+ font-family: var(--markdown-font);
16
+ line-height: var(--markdown-line-height);
17
+ position: relative;
18
+ text-size-adjust: 100%;
19
+ word-wrap: break-word;
17
20
 
18
21
  ul {
19
22
  list-style: initial;
@@ -76,17 +79,15 @@
76
79
  }
77
80
 
78
81
  hr {
79
- box-sizing: content-box;
82
+ @include clearfix;
80
83
 
84
+ background: transparent;
85
+ border-bottom: 1px solid var(--markdown-edge, #dfe2e5);
86
+ border-width: 0 0 1px;
87
+ box-sizing: content-box;
81
88
  height: 0;
82
- overflow: hidden;
83
89
  margin: 15px 0;
84
-
85
- border-width: 0 0 1px;
86
- border-bottom: 1px solid var(--markdown-edge, #dfe2e5);
87
- background: transparent;
88
-
89
- @include _clearfix();
90
+ overflow: hidden;
90
91
  }
91
92
 
92
93
  input {
@@ -127,13 +128,13 @@
127
128
  h4,
128
129
  h5,
129
130
  h6 {
130
- line-height: 1.25;
131
131
  color: var(--markdown-title);
132
132
  font-family: var(--markdown-title-font);
133
133
  font-size: var(--markdown-title-size);
134
134
  font-weight: var(--markdown-title-weight, 600);
135
- margin-top: var(--markdown-title-marginTop, 1em);
135
+ line-height: 1.25;
136
136
  margin-bottom: var(--markdown-title-marginBottom, 1rem);
137
+ margin-top: var(--markdown-title-marginTop, 1em);
137
138
  }
138
139
 
139
140
  h1 {
@@ -184,9 +185,9 @@
184
185
  }
185
186
 
186
187
  h6 {
188
+ color: var(--markdown-title, #6a737d);
187
189
  font-size: 0.85em;
188
190
  font-size: var(--markdown-title-size, 0.85em);
189
- color: var(--markdown-title, #6a737d);
190
191
  }
191
192
 
192
193
  p,
@@ -224,7 +225,7 @@
224
225
 
225
226
  input::-webkit-inner-spin-button,
226
227
  input::-webkit-outer-spin-button {
227
- -webkit-appearance: none;
228
+ appearance: none;
228
229
  appearance: none;
229
230
  margin: 0;
230
231
  }
@@ -244,14 +245,14 @@
244
245
  pre,
245
246
  table,
246
247
  ul {
247
- margin-top: 0;
248
248
  margin-bottom: 15px;
249
+ margin-top: 0;
249
250
  }
250
251
 
251
252
  blockquote {
252
- display: block;
253
253
  border-left: 0.25em solid #dfe2e5;
254
254
  color: #6a737d;
255
+ display: block;
255
256
  padding: 0 1em;
256
257
  }
257
258
 
@@ -329,7 +330,7 @@
329
330
  }
330
331
  }
331
332
 
332
- @mixin markdownOverrides {
333
+ @mixin markdown-overrides {
333
334
  h5,
334
335
  h6 {
335
336
  font-size: 0.9em;
@@ -341,8 +342,8 @@
341
342
  }
342
343
 
343
344
  > * {
344
- margin-top: 15px;
345
345
  margin-bottom: 15px !important;
346
+ margin-top: 15px;
346
347
  }
347
348
 
348
349
  .task-list-item input {
@@ -355,13 +356,14 @@
355
356
  }
356
357
  }
357
358
 
358
- @mixin _clearfix() {
359
- &:before,
360
- &:after {
359
+ @mixin clearfix() {
360
+ &::before,
361
+ &::after {
361
362
  content: '';
362
363
  display: table;
363
364
  }
364
- &:after {
365
+
366
+ &::after {
365
367
  clear: both;
366
368
  }
367
369
  }
package/styles/main.scss CHANGED
@@ -1,5 +1,5 @@
1
- @import './gfm.scss';
2
- @import './components.scss';
1
+ @import './gfm';
2
+ @import './components';
3
3
 
4
4
  :root {
5
5
  // --markdown-radius: 3px;
@@ -15,5 +15,6 @@
15
15
  .field-description,
16
16
  .markdown-body {
17
17
  @include gfm;
18
+
18
19
  font-size: var(--markdown-font-size, 14px);
19
- }
20
+ }
@@ -1,2 +0,0 @@
1
- .markdown-body {
2
- }