diff --git a/.github/workflows/spelling-check.yml b/.github/workflows/spelling-check.yml new file mode 100644 index 00000000..4bebba74 --- /dev/null +++ b/.github/workflows/spelling-check.yml @@ -0,0 +1,14 @@ +name: Spelling Check + +on: [pull_request] + +jobs: + run: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check spelling + uses: crate-ci/typos@master + with: + config: .github/workflows/typos-config.toml diff --git a/.github/workflows/typos-config.toml b/.github/workflows/typos-config.toml new file mode 100644 index 00000000..d5cfbff3 --- /dev/null +++ b/.github/workflows/typos-config.toml @@ -0,0 +1,7 @@ +default.check-filename = true + +default.extend-ignore-re = [ + "--foo-Bar-baZ", + "FoNt-SiZe" +] + diff --git a/lib/properties/backgroundAttachment.js b/lib/properties/backgroundAttachment.js index 360e51ba..b50284cf 100644 --- a/lib/properties/backgroundAttachment.js +++ b/lib/properties/backgroundAttachment.js @@ -19,7 +19,7 @@ module.exports.definition = { v = parsers.prepareValue(v, this._global); if (parsers.hasVarFunc(v)) { this._setProperty("background", ""); - this._setProperty("backgound-attachemnt", v); + this._setProperty("background-attachment", v); } else { this._setProperty("background-attachment", module.exports.parse(v)); } diff --git a/lib/properties/backgroundColor.js b/lib/properties/backgroundColor.js index c4d38b26..fdb21cba 100644 --- a/lib/properties/backgroundColor.js +++ b/lib/properties/backgroundColor.js @@ -22,7 +22,7 @@ module.exports.definition = { v = parsers.prepareValue(v, this._global); if (parsers.hasVarFunc(v)) { this._setProperty("background", ""); - this._setProperty("backgound-color", v); + this._setProperty("background-color", v); } else { this._setProperty("background-color", module.exports.parse(v)); } diff --git a/lib/properties/backgroundImage.js b/lib/properties/backgroundImage.js index 5c48df90..c99a2491 100644 --- a/lib/properties/backgroundImage.js +++ b/lib/properties/backgroundImage.js @@ -18,7 +18,7 @@ module.exports.definition = { v = parsers.prepareValue(v, this._global); if (parsers.hasVarFunc(v)) { this._setProperty("background", ""); - this._setProperty("backgound-image", v); + this._setProperty("background-image", v); } else { this._setProperty("background-image", module.exports.parse(v)); } diff --git a/lib/properties/backgroundPosition.js b/lib/properties/backgroundPosition.js index 14d40f6d..80b9452c 100644 --- a/lib/properties/backgroundPosition.js +++ b/lib/properties/backgroundPosition.js @@ -39,7 +39,7 @@ module.exports.definition = { v = parsers.prepareValue(v, this._global); if (parsers.hasVarFunc(v)) { this._setProperty("background", ""); - this._setProperty("backgound-position", v); + this._setProperty("background-position", v); } else { this._setProperty("background-position", module.exports.parse(v)); } diff --git a/lib/properties/backgroundRepeat.js b/lib/properties/backgroundRepeat.js index 90c59977..b67b0c0c 100644 --- a/lib/properties/backgroundRepeat.js +++ b/lib/properties/backgroundRepeat.js @@ -19,7 +19,7 @@ module.exports.definition = { v = parsers.prepareValue(v, this._global); if (parsers.hasVarFunc(v)) { this._setProperty("background", ""); - this._setProperty("backgound-repeat", v); + this._setProperty("background-repeat", v); } else { this._setProperty("background-repeat", module.exports.parse(v)); } diff --git a/test/CSSStyleDeclaration.test.js b/test/CSSStyleDeclaration.test.js index 2fcdd356..fb43ff57 100644 --- a/test/CSSStyleDeclaration.test.js +++ b/test/CSSStyleDeclaration.test.js @@ -269,7 +269,7 @@ describe("CSSStyleDeclaration", () => { assert.strictEqual(style.clear, "right"); style.clear = "both"; assert.strictEqual(style.clear, "both"); - style.clip = "elipse(5px, 10px)"; + style.clip = "ellipse(5px, 10px)"; assert.strictEqual(style.clip, ""); assert.strictEqual(style.length, 1); style.clip = "rect(0, 3Em, 2pt, 50%)";