@maizzle/framework 4.0.0-alpha.8 → 4.0.1

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.
Files changed (84) hide show
  1. package/.editorconfig +9 -9
  2. package/.github/media/logo-dark.svg +1 -0
  3. package/.github/media/logo-light.svg +1 -0
  4. package/.github/workflows/nodejs.yml +28 -28
  5. package/LICENSE +21 -21
  6. package/README.md +42 -35
  7. package/bin/maizzle +3 -0
  8. package/package.json +91 -87
  9. package/src/commands/serve.js +15 -5
  10. package/src/generators/config.js +32 -32
  11. package/src/generators/output/index.js +4 -4
  12. package/src/generators/output/to-disk.js +208 -208
  13. package/src/generators/output/to-string.js +67 -71
  14. package/src/generators/postcss.js +29 -29
  15. package/src/generators/posthtml.js +66 -66
  16. package/src/generators/tailwindcss.js +116 -116
  17. package/src/index.js +17 -17
  18. package/src/transformers/attributeToStyle.js +90 -90
  19. package/src/transformers/baseUrl.js +69 -45
  20. package/src/transformers/extraAttributes.js +26 -26
  21. package/src/transformers/filters/defaultFilters.js +126 -0
  22. package/src/transformers/{transform.js → filters/index.js} +55 -51
  23. package/src/transformers/index.js +63 -60
  24. package/src/transformers/inlineCss.js +37 -50
  25. package/src/transformers/markdown.js +19 -19
  26. package/src/transformers/minify.js +21 -21
  27. package/src/transformers/plaintext.js +23 -23
  28. package/src/transformers/posthtmlMso.js +10 -10
  29. package/src/transformers/prettify.js +27 -20
  30. package/src/transformers/preventWidows.js +13 -13
  31. package/src/transformers/removeAttributes.js +17 -17
  32. package/src/transformers/removeInlineBackgroundColor.js +52 -52
  33. package/src/transformers/removeInlineSizes.js +41 -41
  34. package/src/transformers/removeInlinedSelectors.js +70 -71
  35. package/src/transformers/removeUnusedCss.js +40 -35
  36. package/src/transformers/replaceStrings.js +14 -14
  37. package/src/transformers/safeClassNames.js +24 -24
  38. package/src/transformers/shorthandInlineCSS.js +19 -0
  39. package/src/transformers/sixHex.js +33 -33
  40. package/src/transformers/urlParameters.js +17 -17
  41. package/src/utils/helpers.js +17 -17
  42. package/test/expected/posthtml/component.html +13 -13
  43. package/test/expected/posthtml/extend-template.html +2 -2
  44. package/test/expected/posthtml/fetch.html +5 -5
  45. package/test/expected/posthtml/layout.html +3 -3
  46. package/test/expected/transformers/atimport-in-style.html +2 -1
  47. package/test/expected/transformers/{base-image-url.html → base-url.html} +18 -2
  48. package/test/expected/transformers/filters.html +81 -0
  49. package/test/expected/transformers/preserve-transform-css.html +12 -3
  50. package/test/expected/useConfig.html +9 -9
  51. package/test/fixtures/basic.html +6 -6
  52. package/test/fixtures/posthtml/component.html +19 -19
  53. package/test/fixtures/posthtml/extend-template.html +7 -7
  54. package/test/fixtures/posthtml/fetch.html +9 -9
  55. package/test/fixtures/posthtml/layout.html +11 -11
  56. package/test/fixtures/transformers/{base-image-url.html → base-url.html} +18 -2
  57. package/test/fixtures/transformers/filters.html +87 -0
  58. package/test/fixtures/useConfig.html +9 -9
  59. package/test/stubs/assets/foo.bar +1 -1
  60. package/test/stubs/breaking/bad.html +5 -5
  61. package/test/stubs/components/component.html +5 -5
  62. package/test/stubs/config/config.js +10 -10
  63. package/test/stubs/config/config.maizzle-ci.js +10 -10
  64. package/test/stubs/data.json +14 -14
  65. package/test/stubs/events/before-create.html +1 -1
  66. package/test/stubs/layouts/basic.html +1 -1
  67. package/test/stubs/layouts/full.html +12 -12
  68. package/test/stubs/layouts/template.html +5 -5
  69. package/test/stubs/main.css +5 -5
  70. package/test/stubs/tailwind/content-source.html +1 -1
  71. package/test/stubs/tailwind/tailwind.css +3 -3
  72. package/test/stubs/template.html +10 -10
  73. package/test/stubs/templates/1.html +1 -1
  74. package/test/stubs/templates/2.test +1 -0
  75. package/test/test-config.js +19 -19
  76. package/test/test-postcss.js +8 -8
  77. package/test/test-posthtml.js +72 -66
  78. package/test/test-tailwindcss.js +117 -117
  79. package/test/test-todisk.js +42 -28
  80. package/test/test-tostring.js +148 -142
  81. package/test/test-transformers.js +78 -46
  82. package/xo.config.js +22 -22
  83. package/test/stubs/templates/2.html +0 -1
  84. package/test/stubs/templates/3.mzl +0 -1
@@ -1,142 +1,148 @@
1
- const test = require('ava')
2
- const Maizzle = require('../src')
3
-
4
- const path = require('path')
5
- const {readFileSync} = require('fs')
6
-
7
- const fixture = file => readFileSync(path.join(__dirname, 'fixtures', `${file}.html`), 'utf8')
8
- const expected = file => readFileSync(path.join(__dirname, 'expected', `${file}.html`), 'utf8')
9
-
10
- const renderString = (string, options = {}) => Maizzle.render(string, options).then(({html}) => html)
11
-
12
- test('compiles HTML string if no options are passed', async t => {
13
- const source = fixture('basic')
14
-
15
- const html = await renderString(source)
16
-
17
- t.is(html, source)
18
- })
19
-
20
- test('uses environment config file(s) if available', async t => {
21
- const source = fixture('useConfig')
22
-
23
- const html = await renderString(source, {maizzle: {env: 'maizzle-ci'}})
24
-
25
- t.is(html, expected('useConfig'))
26
- })
27
-
28
- test('throws if first argument is not an HTML string', async t => {
29
- await t.throwsAsync(async () => {
30
- await renderString()
31
- }, {instanceOf: TypeError, message: 'first argument must be an HTML string, received undefined'})
32
- })
33
-
34
- test('throws if first argument is an empty string', async t => {
35
- await t.throwsAsync(async () => {
36
- await renderString('')
37
- }, {instanceOf: RangeError, message: 'received empty string'})
38
- })
39
-
40
- test('runs the `beforeRender` event', async t => {
41
- const html = await renderString(`<div>{{ page.foo }}</div>`, {
42
- beforeRender(html, config) {
43
- config.foo = 'bar'
44
-
45
- return html
46
- }
47
- })
48
-
49
- t.is(html, `<div>bar</div>`)
50
- })
51
-
52
- test('runs the `afterRender` event', async t => {
53
- const result = await renderString(`<div>foo</div>`, {
54
- afterRender(html, config) {
55
- config.replaceStrings = {
56
- foo: 'baz'
57
- }
58
-
59
- return html
60
- }
61
- })
62
-
63
- t.is(result, `<div>baz</div>`)
64
- })
65
-
66
- test('runs the `afterTransformers` event', async t => {
67
- const result = await renderString(`<div>foo</div>`, {
68
- maizzle: {
69
- title: 'bar'
70
- },
71
- afterTransformers(html, config) {
72
- return html.replace('foo', config.title)
73
- }
74
- })
75
-
76
- t.is(result, `<div>bar</div>`)
77
- })
78
-
79
- test('locals work when defined in all supported places', async t => {
80
- const result = await renderString(`{{ page.one }}, {{ two }}, {{ three }}`, {
81
- maizzle: {
82
- one: 1,
83
- build: {
84
- posthtml: {
85
- expressions: {
86
- locals: {
87
- two: 2
88
- }
89
- }
90
- }
91
- },
92
- locals: {
93
- three: 3
94
- }
95
- }
96
- })
97
-
98
- t.is(result, `1, 2, 3`)
99
- })
100
-
101
- test('prevents overwriting page object', async t => {
102
- const result = await renderString(`{{ page.one }}, {{ two }}, {{ three }}`, {
103
- maizzle: {
104
- one: 1,
105
- build: {
106
- posthtml: {
107
- expressions: {
108
- locals: {
109
- page: {
110
- two: 2
111
- }
112
- }
113
- }
114
- }
115
- },
116
- locals: {
117
- page: {
118
- three: 3
119
- }
120
- }
121
- }
122
- })
123
-
124
- t.is(result, `1, undefined, undefined`)
125
- })
126
-
127
- test('preserves css in marked style tags (tailwindcss)', async t => {
128
- const html = await renderString(fixture('transformers/preserve-transform-css'), {
129
- // So that we don't compile twice
130
- tailwind: {
131
- compiled: ''
132
- }
133
- })
134
-
135
- t.is(html, expected('transformers/preserve-transform-css'))
136
- })
137
-
138
- test('@import css files in marked style tags', async t => {
139
- const html = await renderString(fixture('transformers/atimport-in-style'))
140
-
141
- t.is(html, expected('transformers/atimport-in-style'))
142
- })
1
+ const test = require('ava')
2
+ const Maizzle = require('../src')
3
+
4
+ const path = require('path')
5
+ const fs = require('fs')
6
+
7
+ const readFile = (dir, filename) => fs.promises
8
+ .readFile(path.join(__dirname, dir, `${filename}.html`), 'utf8')
9
+ .then(html => html.trim())
10
+
11
+ const fixture = file => readFile('fixtures', file)
12
+ const expected = file => readFile('expected', file)
13
+
14
+ const renderString = (string, options = {}) => Maizzle.render(string, options).then(({html}) => html)
15
+
16
+ test('compiles HTML string if no options are passed', async t => {
17
+ const source = await fixture('basic')
18
+
19
+ const html = await renderString(source)
20
+
21
+ t.is(html, source)
22
+ })
23
+
24
+ test('uses environment config file(s) if available', async t => {
25
+ const source = await fixture('useConfig')
26
+
27
+ const html = await renderString(source, {maizzle: {env: 'maizzle-ci'}})
28
+
29
+ t.is(html, await expected('useConfig'))
30
+ })
31
+
32
+ test('throws if first argument is not an HTML string', async t => {
33
+ await t.throwsAsync(async () => {
34
+ await renderString()
35
+ }, {instanceOf: TypeError, message: 'first argument must be an HTML string, received undefined'})
36
+ })
37
+
38
+ test('throws if first argument is an empty string', async t => {
39
+ await t.throwsAsync(async () => {
40
+ await renderString('')
41
+ }, {instanceOf: RangeError, message: 'received empty string'})
42
+ })
43
+
44
+ test('runs the `beforeRender` event', async t => {
45
+ const html = await renderString(`<div>{{ page.foo }}</div>`, {
46
+ beforeRender(html, config) {
47
+ config.foo = 'bar'
48
+
49
+ return html
50
+ }
51
+ })
52
+
53
+ t.is(html, `<div>bar</div>`)
54
+ })
55
+
56
+ test('runs the `afterRender` event', async t => {
57
+ const result = await renderString(`<div>foo</div>`, {
58
+ afterRender(html, config) {
59
+ config.replaceStrings = {
60
+ foo: 'baz'
61
+ }
62
+
63
+ return html
64
+ }
65
+ })
66
+
67
+ t.is(result, `<div>baz</div>`)
68
+ })
69
+
70
+ test('runs the `afterTransformers` event', async t => {
71
+ const result = await renderString(`<div>foo</div>`, {
72
+ maizzle: {
73
+ title: 'bar'
74
+ },
75
+ afterTransformers(html, config) {
76
+ return html.replace('foo', config.title)
77
+ }
78
+ })
79
+
80
+ t.is(result, `<div>bar</div>`)
81
+ })
82
+
83
+ test('locals work when defined in all supported places', async t => {
84
+ const result = await renderString(`{{ page.one }}, {{ two }}, {{ three }}`, {
85
+ maizzle: {
86
+ one: 1,
87
+ build: {
88
+ posthtml: {
89
+ expressions: {
90
+ locals: {
91
+ two: 2
92
+ }
93
+ }
94
+ }
95
+ },
96
+ locals: {
97
+ three: 3
98
+ }
99
+ }
100
+ })
101
+
102
+ t.is(result, `1, 2, 3`)
103
+ })
104
+
105
+ test('prevents overwriting page object', async t => {
106
+ const result = await renderString(`{{ page.one }}, {{ two }}, {{ three }}`, {
107
+ maizzle: {
108
+ one: 1,
109
+ build: {
110
+ posthtml: {
111
+ expressions: {
112
+ locals: {
113
+ page: {
114
+ two: 2
115
+ }
116
+ }
117
+ }
118
+ }
119
+ },
120
+ locals: {
121
+ page: {
122
+ three: 3
123
+ }
124
+ }
125
+ }
126
+ })
127
+
128
+ t.is(result, `1, undefined, undefined`)
129
+ })
130
+
131
+ test('preserves css in marked style tags (tailwindcss)', async t => {
132
+ const source = await fixture('transformers/preserve-transform-css')
133
+ const html = await renderString(source, {
134
+ // So that we don't compile twice
135
+ tailwind: {
136
+ compiled: ''
137
+ }
138
+ })
139
+
140
+ t.is(html, await expected('transformers/preserve-transform-css'))
141
+ })
142
+
143
+ test('@import css files in marked style tags', async t => {
144
+ const source = await fixture('transformers/atimport-in-style')
145
+ const html = await renderString(source)
146
+
147
+ t.is(html, await expected('transformers/atimport-in-style'))
148
+ })
@@ -3,10 +3,14 @@ const Maizzle = require('../src')
3
3
  const removePlaintextTags = require('../src/transformers/plaintext')
4
4
 
5
5
  const path = require('path')
6
- const {readFileSync} = require('fs')
6
+ const fs = require('fs')
7
7
 
8
- const fixture = file => readFileSync(path.join(__dirname, 'fixtures/transformers', `${file}.html`), 'utf8')
9
- const expect = file => readFileSync(path.join(__dirname, 'expected/transformers', `${file}.html`), 'utf8')
8
+ const readFile = (dir, filename) => fs.promises
9
+ .readFile(path.join(__dirname, dir, `${filename}.html`), 'utf8')
10
+ .then(html => html.trim())
11
+
12
+ const fixture = file => readFile('fixtures/transformers', file)
13
+ const expected = file => readFile('expected/transformers', file)
10
14
 
11
15
  test('remove inline sizes', async t => {
12
16
  const options = {
@@ -44,18 +48,10 @@ test('remove inline background-color (with tags)', async t => {
44
48
  })
45
49
 
46
50
  test('inline CSS', async t => {
47
- const html = `<div class="foo bar px-2 py-2">test</div>`
51
+ const html = `<div class="foo bar">test</div>`
48
52
  const css = `
49
53
  .foo {color: red}
50
54
  .bar {cursor: pointer}
51
- .px-2 {
52
- padding-left: 2px;
53
- padding-right: 2px;
54
- }
55
- .py-2 {
56
- padding-top: 2px;
57
- padding-bottom: 2px;
58
- }
59
55
  `
60
56
 
61
57
  const result = await Maizzle.inlineCSS(html, {
@@ -76,13 +72,7 @@ test('inline CSS', async t => {
76
72
  }
77
73
  })
78
74
 
79
- const result2 = await Maizzle.inlineCSS(html, {
80
- customCSS: css,
81
- mergeLonghand: true
82
- })
83
-
84
- t.is(result, '<div class="foo bar px-2 py-2" style="color: red; padding: 2px;">test</div>')
85
- t.is(result2, '<div class="foo bar px-2 py-2" style="color: red; cursor: pointer; padding: 2px;">test</div>')
75
+ t.is(result, '<div class="foo bar" style="color: red;">test</div>')
86
76
  })
87
77
 
88
78
  test('inline CSS (disabled)', async t => {
@@ -109,7 +99,7 @@ test('remove unused CSS', async t => {
109
99
  </body>
110
100
  </html>`
111
101
 
112
- const expected1 = `<!DOCTYPE html>
102
+ const result1 = `<!DOCTYPE html>
113
103
  <html>
114
104
  <head>
115
105
  <style>
@@ -122,7 +112,7 @@ test('remove unused CSS', async t => {
122
112
  </body>
123
113
  </html>`
124
114
 
125
- const expected2 = `<!DOCTYPE html>
115
+ const result2 = `<!DOCTYPE html>
126
116
  <html>
127
117
  <head>
128
118
  <style>
@@ -137,8 +127,8 @@ test('remove unused CSS', async t => {
137
127
  const withOptions = await Maizzle.removeUnusedCSS(html, {whitelist: ['.bar*']})
138
128
  const enabled = await Maizzle.removeUnusedCSS(html, true)
139
129
 
140
- t.is(withOptions, expected1)
141
- t.is(enabled, expected2)
130
+ t.is(withOptions, result1)
131
+ t.is(enabled, result2)
142
132
  })
143
133
 
144
134
  test('remove unused CSS (disabled)', async t => {
@@ -154,7 +144,7 @@ test('remove unused CSS (disabled)', async t => {
154
144
  </body>
155
145
  </html>`
156
146
 
157
- const expected = `<!DOCTYPE html>
147
+ const result = `<!DOCTYPE html>
158
148
  <html>
159
149
  <head>
160
150
  <style>
@@ -169,8 +159,8 @@ test('remove unused CSS (disabled)', async t => {
169
159
  const disabled = await Maizzle.removeUnusedCSS(html, {removeUnusedCSS: false})
170
160
  const unset = await Maizzle.removeUnusedCSS(html)
171
161
 
172
- t.is(disabled, expected)
173
- t.is(unset, expected)
162
+ t.is(disabled, result)
163
+ t.is(unset, result)
174
164
  })
175
165
 
176
166
  test('remove attributes', async t => {
@@ -192,35 +182,42 @@ test('extra attributes (disabled)', async t => {
192
182
  })
193
183
 
194
184
  test('base URL (string)', async t => {
195
- const html = await Maizzle.applyBaseImageUrl(fixture('base-image-url'), 'https://example.com/')
185
+ const source = await fixture('base-url')
186
+ const html = await Maizzle.applyBaseUrl(source, 'https://example.com/')
196
187
 
197
- t.is(html, expect('base-image-url'))
188
+ t.is(html, await expected('base-url'))
198
189
  })
199
190
 
200
191
  test('base URL (object)', async t => {
201
- const html = await Maizzle.applyBaseImageUrl(fixture('base-image-url'), {
192
+ const source = await fixture('base-url')
193
+ const html = await Maizzle.applyBaseUrl(source, {
202
194
  url: 'https://example.com/',
203
195
  allTags: true,
204
196
  styleTag: true,
205
197
  inlineCss: true
206
198
  })
207
199
 
208
- t.is(html, expect('base-image-url'))
200
+ t.is(html, await expected('base-url'))
209
201
  })
210
202
 
211
203
  test('prettify', async t => {
204
+ // `prettify: true`
205
+ const html2 = await Maizzle.prettify('<div><p>test</p></div>', true)
206
+
207
+ // With custom object config
212
208
  // eslint-disable-next-line
213
209
  const html = await Maizzle.prettify('<div><p>test</p></div>', {indent_inner_result: true})
214
- const html2 = await Maizzle.prettify('<div><p>test</p></div>', true)
215
210
 
216
- t.is(html, '<div>\n <p>test</p>\n</div>')
217
- t.is(html2, '<div>\n <p>test</p>\n</div>')
218
- })
211
+ // No config
212
+ const html3 = await Maizzle.prettify('<div><p>test</p></div>')
219
213
 
220
- test('prettify (disabled)', async t => {
221
- const html = await Maizzle.prettify('<div><p>test</p></div>', {prettify: false})
214
+ // Empty object config
215
+ const html4 = await Maizzle.prettify('<div><p>test</p></div>', {})
222
216
 
223
- t.is(html, '<div><p>test</p></div>')
217
+ t.is(html, '<div>\n <p>test</p>\n</div>')
218
+ t.is(html2, '<div>\n <p>test</p>\n</div>')
219
+ t.is(html3, '<div><p>test</p></div>')
220
+ t.is(html4, '<div><p>test</p></div>')
224
221
  })
225
222
 
226
223
  test('minify', async t => {
@@ -282,14 +279,15 @@ test('six digit hex (disabled)', async t => {
282
279
  t.is(html, '<td style="color: #ffc" bgcolor="#000"></td>')
283
280
  })
284
281
 
285
- test('transform contents (javascript)', async t => {
286
- const html = await Maizzle.transformContents('<div uppercase>test</div>', {uppercase: string => string.toUpperCase()})
282
+ test('filters (default)', async t => {
283
+ const source = await fixture('filters')
284
+ const html = await Maizzle.withFilters(source)
287
285
 
288
- t.is(html, '<div>TEST</div>')
286
+ t.is(html, await expected('filters'))
289
287
  })
290
288
 
291
- test('transform contents (tailwindcss)', async t => {
292
- const html = await Maizzle.transformContents(
289
+ test('filters (tailwindcss)', async t => {
290
+ const html = await Maizzle.withFilters(
293
291
  `<style tailwindcss>
294
292
  div {
295
293
  @apply hidden;
@@ -300,15 +298,20 @@ test('transform contents (tailwindcss)', async t => {
300
298
  const expected = `<style>.inline { display: inline !important
301
299
  } .table { display: table !important
302
300
  } .contents { display: contents !important
303
- } .transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important
301
+ } .hidden { display: none !important
302
+ } .truncate { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important
303
+ } .uppercase { text-transform: uppercase !important
304
+ } .lowercase { text-transform: lowercase !important
305
+ } .capitalize { text-transform: capitalize !important
304
306
  } div { display: none
305
- }</style>`
307
+ }
308
+ </style>`
306
309
 
307
310
  t.is(html, expected)
308
311
  })
309
312
 
310
- test('transform contents (postcss)', async t => {
311
- const html = await Maizzle.transformContents(
313
+ test('filters (postcss)', async t => {
314
+ const html = await Maizzle.withFilters(
312
315
  `<style postcss>@import 'test/stubs/post.css';</style>`
313
316
  )
314
317
 
@@ -477,3 +480,32 @@ test('remove inlined selectors (disabled)', async t => {
477
480
 
478
481
  t.is(result, expected)
479
482
  })
483
+
484
+ test('shorthand inline css', async t => {
485
+ const html = `
486
+ <div style="padding-left: 2px; padding-right: 2px; padding-top: 2px; padding-bottom: 2px;">padding</div>
487
+ <div style="margin-left: 2px; margin-right: 2px; margin-top: 2px; margin-bottom: 2px;">margin</div>
488
+ <div style="border-width: 1px; border-style: solid; border-color: #000;">border</div>
489
+ <p style="border-width: 1px; border-style: solid; border-color: #000;">border</p>
490
+ `
491
+
492
+ const expect = `
493
+ <div style="padding: 2px;">padding</div>
494
+ <div style="margin: 2px;">margin</div>
495
+ <div style="border: 1px solid #000;">border</div>
496
+ <p style="border: 1px solid #000;">border</p>
497
+ `
498
+
499
+ const expect2 = `
500
+ <div style="padding: 2px;">padding</div>
501
+ <div style="margin: 2px;">margin</div>
502
+ <div style="border: 1px solid #000;">border</div>
503
+ <p style="border-width: 1px; border-style: solid; border-color: #000;">border</p>
504
+ `
505
+
506
+ const result = await Maizzle.shorthandInlineCSS(html)
507
+ const result2 = await Maizzle.shorthandInlineCSS(html, {tags: ['div']})
508
+
509
+ t.is(result, expect)
510
+ t.is(result2, expect2)
511
+ })
package/xo.config.js CHANGED
@@ -1,22 +1,22 @@
1
- module.exports = {
2
- space: true,
3
- rules: {
4
- semi: 0,
5
- complexity: 0,
6
- 'max-params': 0,
7
- 'no-lonely-if': 0,
8
- 'unicorn/no-reduce': 0,
9
- 'import/extensions': 0,
10
- 'operator-linebreak': 0,
11
- 'max-nested-callbacks': 0,
12
- 'unicorn/filename-case': 0,
13
- 'unicorn/no-hex-escape': 0,
14
- 'unicorn/prefer-ternary': 0,
15
- 'unicorn/string-content': 0,
16
- 'unicorn/no-array-for-each': 0,
17
- 'unicorn/prefer-array-find': 0,
18
- 'promise/prefer-await-to-then': 0,
19
- 'unicorn/no-abusive-eslint-disable': 0,
20
- quotes: ['error', 'single', {allowTemplateLiterals: true}]
21
- }
22
- }
1
+ module.exports = {
2
+ space: true,
3
+ rules: {
4
+ semi: 0,
5
+ complexity: 0,
6
+ 'max-params': 0,
7
+ 'no-lonely-if': 0,
8
+ 'unicorn/no-reduce': 0,
9
+ 'import/extensions': 0,
10
+ 'operator-linebreak': 0,
11
+ 'max-nested-callbacks': 0,
12
+ 'unicorn/filename-case': 0,
13
+ 'unicorn/no-hex-escape': 0,
14
+ 'unicorn/prefer-ternary': 0,
15
+ 'unicorn/string-content': 0,
16
+ 'unicorn/no-array-for-each': 0,
17
+ 'unicorn/prefer-array-find': 0,
18
+ 'promise/prefer-await-to-then': 0,
19
+ 'unicorn/no-abusive-eslint-disable': 0,
20
+ quotes: ['error', 'single', {allowTemplateLiterals: true}]
21
+ }
22
+ }
@@ -1 +0,0 @@
1
- <a href="https://example.com">Test</a>
@@ -1 +0,0 @@
1
- <a href="https://example.com">Test</a>