Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4343c74

Browse files
Scripts: Content-linter fix (#623)
* VSC Tasks: Fix spell-checker fixer and fix-issues linter * Add spell-check fix for windows * Fix fix-issues script imports * Use content-lint v1.1.3
1 parent e5302ca commit 4343c74

File tree

5 files changed

+491
-143
lines changed

5 files changed

+491
-143
lines changed

‎.vscode/tasks.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"cwd": "${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
8888
},
8989
"windows": {
90-
"command": "node .\\fix-issues.js -p ..\\..\\content\\hardware\\"
90+
"command": "node .\\fix-issues.js -p '..\\..\\content\\hardware\\'"
9191
},
9292
"group": "none",
9393
"presentation": {
@@ -138,7 +138,7 @@
138138
"cwd": "${workspaceFolder}"
139139
},
140140
"windows": {
141-
"command": ".\\scripts\\spell-check.cmd"
141+
"command": ".\\scripts\\spell-check.cmd"
142142
},
143143
"group": "none",
144144
"presentation": {
@@ -163,6 +163,9 @@
163163
"options": {
164164
"cwd": "${workspaceFolder}"
165165
},
166+
"windows": {
167+
"command": ".\\scripts\\spell-check-fix.cmd"
168+
},
166169
"group": "none",
167170
"presentation": {
168171
"reveal": "always",

‎scripts/spell-check-fix.cmd‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@ECHO OFF
2+
3+
pip --version || pip3 --version
4+
IF %ERRORLEVEL% NEQ 0 (
5+
cls
6+
ECHO Please install Python from https://www.python.org/downloads/ and Pip following https://pip.pypa.io/en/stable/installation/
7+
EXIT /B
8+
)
9+
10+
cls
11+
codespell --version
12+
IF %ERRORLEVEL% NEQ 0 (
13+
ECHO Installing codespell
14+
pip install codespell || pip3 install codespell
15+
) else (
16+
ECHO Codespell already installed
17+
)
18+
cls
19+
codespell -w -I scripts/resources/spell-check-ignore-list.txt --skip="*.svg,*.dxf,*.pdf" content

‎scripts/validation/fix-issues.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { fixMissingTitleCase } from './fixes/headings.js'
2-
import { ConfigManager } from './logic/config-manager.js';
3-
import { ArticleManager } from './logic/article-manager.js';
4-
import { fixUnusedAssets } from './fixes/assets.js';
5-
import { replaceItalicEmphasisWithBoldEmphasis } from './fixes/styling.js';
1+
import { fixMissingTitleCase } from 'content-lint';
2+
import { ConfigManager } from 'content-lint';
3+
import { ArticleManager } from 'content-lint';
4+
import { fixUnusedAssets } from 'content-lint';
5+
import { replaceItalicEmphasisWithBoldEmphasis } from 'content-lint';
66

77
const configManager = new ConfigManager();
88
configManager.addConfigFile("generic", "./config/config-generic.yml");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /