Skip to content

Commit

Permalink
Merge pull request #31 from SaekiTominaga/prettier
Browse files Browse the repository at this point in the history
Add `format` script
  • Loading branch information
SaekiTominaga committed Feb 28, 2024
2 parents 9c7527c + 2516102 commit 7cdc628
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 14 deletions.
4 changes: 1 addition & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/markuplint/__tests__/invalid/rules.html
5 changes: 3 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"singleQuote": true,
"overrides": [
{
"files": ["*.js", "*.ts"],
"files": ["*.css"],
"options": {
"singleQuote": true
"singleQuote": false
}
}
]
Expand Down
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/markuplint/__tests__/invalid/nodeRules.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<!-- html:not([lang]) -->
<html>
<head>
Expand Down
6 changes: 3 additions & 3 deletions packages/markuplint/__tests__/invalid/rules.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!-- disallowed-element -->

<noscript></noscript>
<embed src="path/to">
<embed src="path/to" />
</section>

<section>
Expand Down Expand Up @@ -98,7 +98,7 @@ <h4>heading4</h4>
<!-- 不正: 最初のoption要素の親がoptgroup要素 -->
<select required>
<optgroup label="グループ">
<option value="">プレースホルダー</option>
<option value="">プレースホルダー</option>
</optgroup>
<option value="option1">オプション1</option>
<option value="option2">オプション2</option>
Expand Down Expand Up @@ -146,7 +146,7 @@ <h4>heading4</h4>
<section>
<!-- no-consecutive-br -->

<p>text<br><br>text</p>
<p>text<br /><br />text</p>
</section>

<section>
Expand Down
2 changes: 1 addition & 1 deletion packages/markuplint/__tests__/valid/nodeRules.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<!-- html[prefix] -->
<html lang="en" prefix="">
<head>
Expand Down
5 changes: 3 additions & 2 deletions packages/markuplint/__tests__/valid/rules.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>`rules` valid test</title>
Expand All @@ -24,7 +24,8 @@ <h2>text</h2>
<section>
<!-- placeholder-label-option -->

<label>妥当: プレースホルダーラベルオプションを持っている
<label
>妥当: プレースホルダーラベルオプションを持っている
<select required>
<option value="">プレースホルダー</option>
<option value="option1">オプション1</option>
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint/__tests__/invalid/oder.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
padding: initial;
margin: initial;

--custom-properties: 'x';
--custom-properties: "x";
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{
// Declared as existing
const sysName = env.NAME;
Expand Down

0 comments on commit 7cdc628

Please sign in to comment.