diff --git a/.editorconfig b/.editorconfig index c010fb5..2181c9f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,13 +6,11 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +max_line_length = 160 [*.{md,yml}] indent_style = space indent_size = 2 -[*.{js,ts}] -max_line_length = 160 - [*.md] trim_trailing_whitespace = false diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..8b526fb --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +packages/markuplint/__tests__/invalid/rules.html diff --git a/.prettierrc b/.prettierrc index cb29c10..191c568 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,9 +1,10 @@ { + "singleQuote": true, "overrides": [ { - "files": ["*.js", "*.ts"], + "files": ["*.css"], "options": { - "singleQuote": true + "singleQuote": false } } ] diff --git a/package-lock.json b/package-lock.json index 8247c73..277b620 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "packages/*" ], "devDependencies": { + "prettier": "^3.2.5", "yaml-lint": "^1.7.0" } }, @@ -3619,6 +3620,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/punycode": { "version": "2.3.0", "license": "MIT", diff --git a/package.json b/package.json index 48da162..19a4bc5 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,11 @@ { "name": "config", "scripts": { + "format": "prettier -w 'packages/**/__tests__/**/*.{html,css,js,ts}'", "github-actions-lint": "yamllint .github/workflows/*.yml" }, "devDependencies": { + "prettier": "^3.2.5", "yaml-lint": "^1.7.0" }, "private": true, diff --git a/packages/markuplint/__tests__/invalid/nodeRules.html b/packages/markuplint/__tests__/invalid/nodeRules.html index c551c6f..89449a4 100644 --- a/packages/markuplint/__tests__/invalid/nodeRules.html +++ b/packages/markuplint/__tests__/invalid/nodeRules.html @@ -1,4 +1,4 @@ - + diff --git a/packages/markuplint/__tests__/invalid/rules.html b/packages/markuplint/__tests__/invalid/rules.html index bc38912..bf6ee0c 100644 --- a/packages/markuplint/__tests__/invalid/rules.html +++ b/packages/markuplint/__tests__/invalid/rules.html @@ -27,7 +27,7 @@ - +
@@ -98,7 +98,7 @@

heading4

diff --git a/packages/stylelint/__tests__/invalid/oder.css b/packages/stylelint/__tests__/invalid/oder.css index e3b6101..df5920c 100644 --- a/packages/stylelint/__tests__/invalid/oder.css +++ b/packages/stylelint/__tests__/invalid/oder.css @@ -2,5 +2,5 @@ padding: initial; margin: initial; - --custom-properties: 'x'; + --custom-properties: "x"; } diff --git a/packages/typescript/__tests__/valid/compilerOptions/typeChecking/11 noUncheckedIndexedAccess.ts b/packages/typescript/__tests__/valid/compilerOptions/typeChecking/11 noUncheckedIndexedAccess.ts index f0ade59..8a797da 100644 --- a/packages/typescript/__tests__/valid/compilerOptions/typeChecking/11 noUncheckedIndexedAccess.ts +++ b/packages/typescript/__tests__/valid/compilerOptions/typeChecking/11 noUncheckedIndexedAccess.ts @@ -1,4 +1,3 @@ - { // Declared as existing const sysName = env.NAME;