Skip to content

Commit

Permalink
Code has been modernized and linted. Tests for conversion to HTML is …
Browse files Browse the repository at this point in the history
…now written. Fixed: Ordered and un-ordered list should have 3 spaces instead of 2. Converted code to ES6. Added JSDocs.
  • Loading branch information
kylefarris committed Oct 7, 2022
1 parent 7ccccb4 commit 3384bbc
Show file tree
Hide file tree
Showing 15 changed files with 6,514 additions and 2,214 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules/
test.html
53 changes: 53 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"env": {
"browser": false,
"node": true,
"es6": true,
"mocha": true
},
"extends": ["airbnb-base", "plugin:prettier/recommended", "plugin:chai-friendly/recommended"],
"plugins": ["prettier", "chai-friendly", "jsdoc"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"prettier/prettier": "error",
"no-underscore-dangle": "off",
"class-methods-use-this": "off",
"require-jsdoc": "error",
"valid-jsdoc": "off",
"global-require": "warn",
"lines-between-class-members": "off",
"jsdoc/check-alignment": 1, // Recommended
"jsdoc/check-indentation": 1,
"jsdoc/check-param-names": 1, // Recommended
"jsdoc/check-syntax": 1,
"jsdoc/check-tag-names": [
"warn",
{
"definedTags": ["typicalname"]
}
],
"jsdoc/check-types": 1, // Recommended
"jsdoc/implements-on-classes": 1, // Recommended
"jsdoc/match-description": 1,
"jsdoc/newline-after-description": 1, // Recommended
"jsdoc/require-description": 1,
"jsdoc/require-hyphen-before-param-description": 1,
"jsdoc/require-jsdoc": 1, // Recommended
"jsdoc/require-param": 1, // Recommended
"jsdoc/require-param-description": 1, // Recommended
"jsdoc/require-param-name": 1, // Recommended
"jsdoc/require-param-type": 1, // Recommended
"jsdoc/require-returns": 1, // Recommended
"jsdoc/require-returns-check": 1, // Recommended
"jsdoc/require-returns-description": 1, // Recommended
"jsdoc/require-returns-type": 1, // Recommended
"jsdoc/valid-types": 1 // Recommended
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ build/Release
# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules

.DS_Store
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules/
test.html
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 120,
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": false
}
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ This file is a manually maintained list of changes for each release. Feel free t
## 2.0.3 (2017-09-15)

* Fixed a bug where dashes were being converted to strike throughs in situations they shouldn't have been. Before the fix, the string "ABC-1234 and DEF-5678" would have been converted to (HTML): "ABC<del>1234 and DEV</del>5678" or (Markdown): "ABC~~1234 and DEV~~5678" which is invalid. After the fix, no strikethroughs will be added to the converted output unless there is at least 1 space before the first dash (or double tilde) and after the last dash (or double tilde).

## NOTE: All versions from here, refer to Releases page on github
Loading

0 comments on commit 3384bbc

Please sign in to comment.