Skip to content

Commit

Permalink
Lint JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Nov 14, 2024
1 parent e2287b0 commit e0d1511
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Render Govspeak markup.
* @param {object} [options] Options for the extension
* Render Govspeak markup
*
* @param {object} [options] - Options for the extension
* @returns {object} A MarkedExtension to be passed to `marked.use()`
*/
module.exports = function (options = {}) {
Expand Down
11 changes: 6 additions & 5 deletions lib/block-tokenizer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/**
* Parse a Govspeak Markdown block
* @param {import('marked').Lexer} lexer Marked lexer
* @param {string} src Source text to be parsed
* @param {string} name Extension name, i.e. `govspeak-example`
* @param {string} open Opening tag, i.e. $E
* @param {string} [close] Closing tag, i.e. $E
*
* @param {import('marked').Lexer} lexer - Marked lexer
* @param {string} src - Source text to be parsed
* @param {string} name - Extension name, i.e. `govspeak-example`
* @param {string} open - Opening tag, i.e. $E
* @param {string} [close] - Closing tag, i.e. $E
* @returns {object|undefined} Tokens
*/
module.exports = function (lexer, src, name, open, close) {
Expand Down
1 change: 1 addition & 0 deletions lib/class-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const gemCompatibleClassNames = require('./class-names').compatible

/**
* Get class name for given component
*
* @param {string} component - Component name, i.e. 'button'
* @param {object} [options] - Extension options
* @returns {string} Class name, i.e. 'govuk-button'
Expand Down
4 changes: 3 additions & 1 deletion test/compatibility.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const assert = require('assert/strict')
const assert = require('node:assert/strict')
const { describe, it } = require('node:test')

const { marked } = require('marked')

const govspeak = require('../index.js')

describe('Govspeak with RubyGem compatibility', () => {
Expand Down
4 changes: 3 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const assert = require('assert/strict')
const assert = require('node:assert/strict')
const { describe, it } = require('node:test')

const { marked } = require('marked')

const govspeak = require('../index.js')

describe('Govspeak', () => {
Expand Down

0 comments on commit e0d1511

Please sign in to comment.