Skip to content

Commit ca451d6

Browse files
committed
ci: add spellcheck
1 parent d06fffb commit ca451d6

File tree

5 files changed

+46
-9
lines changed

5 files changed

+46
-9
lines changed

.github/workflows/spellcheck.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Check spelling
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
spellcheck:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: streetsidesoftware/cspell-action@v6
12+
with:
13+
incremental_files_only: false

cspell.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
3+
"version": "0.2",
4+
"words": [
5+
"beziers",
6+
"Font",
7+
"fontawesome",
8+
"Fonticons",
9+
"frontends",
10+
"grunt-svgmin",
11+
"Inkscape",
12+
"SVGOMG",
13+
"xast",
14+
"Xlink"
15+
],
16+
"ignorePaths": ["*.svg.txt"],
17+
"ignoreRegExpList": [
18+
"'.+?.svg',",
19+
"@author .+",
20+
"\"name\": .+",
21+
"&.+?;",
22+
"Atrule",
23+
"data:image/.+",
24+
"datauri",
25+
"elems\\b",
26+
"id=([\"']).+?\\1",
27+
"import .+",
28+
"moz",
29+
"sax\\..+",
30+
"unenc"
31+
]
32+
}

docs/04-plugins/cleanupIds.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ svgo:
1616
description: Elements with an ID that starts with one of these prefixes will be ignored.
1717
default: []
1818
force:
19-
description: This plugin normally does nothing if a `<script>` or `<style>` element is found. Setting this to true will bypass that behaviour, which may result in destructive changes.
19+
description: This plugin normally does nothing if a `<script>` or `<style>` element is found. Setting this to true will bypass that behavior, which may result in destructive changes.
2020
default: false
2121
defaultPlugin: true
2222
---

lib/parser.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
* @typedef {import('./types.js').XastChild} XastChild
1212
*/
1313

14-
// @ts-ignore sax will be replaced with something else later
1514
import SAX from 'sax';
1615
import { textElems } from '../plugins/_collections.js';
1716

lib/svgo.test.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { jest } from '@jest/globals';
22
import { optimize } from './svgo.js';
33

4-
/**
5-
* @typedef {import('../lib/types.js').Plugin} Plugin
6-
*/
7-
84
test('allow to setup default preset', () => {
95
const svg = `
106
<?xml version="1.0" encoding="utf-8"?>
@@ -353,9 +349,6 @@ test('slices long line in error code snippet', () => {
353349
test('multipass option should trigger plugins multiple times', () => {
354350
const svg = `<svg id="abcdefghijklmnopqrstuvwxyz"></svg>`;
355351
const list = [];
356-
/**
357-
* @type {Plugin<void>}
358-
*/
359352
const testPlugin = {
360353
name: 'testPlugin',
361354
fn: (_root, _params, info) => {

0 commit comments

Comments
 (0)