diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..99601d87 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,8 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +# highlighter.js includes collections of some keywords many of which are partial words or include typos +skip = .git*,.codespellrc,highlighter.js +check-hidden = true +# All caps and some names, super long lines +ignore-regex = \b(Hart|[A-Z]+)\b|.{300,}.* +# ignore-words-list = diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..7bab9fd6 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 diff --git a/src/remark/components/timer/timer.js b/src/remark/components/timer/timer.js index 5bf554c9..e5940cf1 100644 --- a/src/remark/components/timer/timer.js +++ b/src/remark/components/timer/timer.js @@ -6,7 +6,7 @@ module.exports = TimerViewModel; function TimerViewModel(events, element, options) { var self = this; - self.options = extend({}, { enabled: true, resetable: true, startOnChange: true, formatter: defaultFormatter }, options || {}); + self.options = extend({}, { enabled: true, resettable: true, startOnChange: true, formatter: defaultFormatter }, options || {}); self.element = element; self.reset(); @@ -29,7 +29,7 @@ function TimerViewModel(events, element, options) { }); events.on('resetTimer', function () { - if (self.options.resetable) { + if (self.options.resettable) { self.reset(); } }); diff --git a/src/remark/highlighter.js b/src/remark/highlighter.js index da735962..95755fdd 100644 --- a/src/remark/highlighter.js +++ b/src/remark/highlighter.js @@ -32,7 +32,7 @@ https://highlightjs.org/ } }(function(hljs) { - // Convenience variables for build-in objects + // Convenience variables for built-in objects var ArrayProto = [], objectKeys = Object.keys; @@ -3300,7 +3300,7 @@ function(hljs) { //I don't really know if this is totally relevant }, { - className: 'title', //symbol would be most accurate however is higlighted just like built_in and that makes up a lot of AutoHotkey code + className: 'title', //symbol would be most accurate however is highlighted just like built_in and that makes up a lot of AutoHotkey code //meaning that it would fail to highlight anything variants: [ {begin: '^[^\\n";]+::(?!=)'}, @@ -9085,7 +9085,7 @@ function(hljs) { var CONSTRUCTOR = { className: 'type', - begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (build-in, infix). + begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (built-in, infix). relevance: 0 }; @@ -18262,7 +18262,7 @@ function(hljs){ var PS_HELPTAGS = { className: "doctag", variants: [ - /* no paramater help tags */ + /* no parameter help tags */ { begin: /\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/ }, @@ -18315,7 +18315,7 @@ function(hljs){ ] }; - // Using statment, plus type, plus assembly name. + // Using statement, plus type, plus assembly name. var PS_USING = { begin: /using\s/, end: /$/, returnBegin: true, @@ -23341,7 +23341,7 @@ function(hljs) { PARAMS ] }, - { // prevent references like module.id from being higlighted as module definitions + { // prevent references like module.id from being highlighted as module definitions begin: /module\./, keywords: { built_in: 'module' }, relevance: 0 @@ -24178,7 +24178,7 @@ function(hljs) { /* The lookahead pattern (?=...) ensures that 'begin' only matches ')', end: '>', diff --git a/test/remark/components/timer_test.js b/test/remark/components/timer_test.js index 89b8e0c4..1001b640 100644 --- a/test/remark/components/timer_test.js +++ b/test/remark/components/timer_test.js @@ -73,7 +73,7 @@ describe('Timer', function () { }); it('should respond to a resetTimer event unless \'resetable\' option is set to \'false\'', function () { - timer = new Timer(events, element, { resetable: false }); + timer = new Timer(events, element, { resettable: false }); events.emit('startTimer'); events.emit('resetTimer'); diff --git a/test/remark/models/slide_test.js b/test/remark/models/slide_test.js index 1b1b0312..851024ab 100644 --- a/test/remark/models/slide_test.js +++ b/test/remark/models/slide_test.js @@ -87,7 +87,7 @@ describe('Slide', function () { }) , slide = new Slide(1, 1, { content: [''], - properites: {name: 'b'} + properties: {name: 'b'} }, template); slide.content.should.eql(['{{name}}', '']); diff --git a/test/remark/parser_test.js b/test/remark/parser_test.js index aff65ab7..c08e2ff2 100644 --- a/test/remark/parser_test.js +++ b/test/remark/parser_test.js @@ -244,14 +244,14 @@ describe('Parser', function () { var slides = parser.parse(' 1\n ---\n 2\n ---\n 3'); slides[0].content.should.eql(['1']); - slides[1].content.should.eql([' 2\n']); // Note: lexer includes trailing newines in code blocks + slides[1].content.should.eql([' 2\n']); // Note: lexer includes trailing newlines in code blocks slides[2].content.should.eql(['3']); }); it('should preserve leading whitespace that goes beyond the minimum whitespace on the first line', function () { var slides = parser.parse(' 1\n ---\n 2\n ---\n 3'); - slides[0].content.should.eql([' 1\n']); // Note: lexer includes trailing newines in code blocks + slides[0].content.should.eql([' 1\n']); // Note: lexer includes trailing newlines in code blocks slides[1].content.should.eql(['2']); slides[2].content.should.eql(['3']); });