Skip to content

Commit

Permalink
Merge pull request #57 from SaekiTominaga/format
Browse files Browse the repository at this point in the history
Combine `format` scripts
  • Loading branch information
SaekiTominaga committed Feb 28, 2024
2 parents d1d79bf + 6200408 commit 1b9d9fa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 16 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
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
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"packages/*"
],
"scripts": {
"js-format": "prettier -w packages/*/src/*.ts",
"html-format": "prettier -w packages/*/demo/*.html",
"format": "prettier -w packages/*/__tests__/*.test.js packages/*/demo/**/*.html packages/*/src/*.ts",
"html-lint": "markuplint -c .markuplintrc packages/*/demo/*.html",
"css-lint": "stylelint packages/*/demo/*.html",
"github-actions-lint": "yamllint .github/workflows/*.yml"
Expand Down
4 changes: 3 additions & 1 deletion packages/button-share/__tests__/ButtonShare.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ describe('attribute', () => {

new ButtonShare(document.querySelector('.js-button-share'));

expect(document.body.innerHTML).toBe('<button class="js-button-share" data-text="Message text" data-title="Page title" data-url="/path/to" disabled="">Share</button>');
expect(document.body.innerHTML).toBe(
'<button class="js-button-share" data-text="Message text" data-title="Page title" data-url="/path/to" disabled="">Share</button>',
);
});
});
10 changes: 2 additions & 8 deletions packages/input-date-to-text/__tests__/InputDateToText.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ describe('attribute', () => {

describe('change event', () => {
beforeEach(() => {
document.body.insertAdjacentHTML(
'beforeend',
'<input type="date" class="js-input-date-to-text" data-validation-noexist="This date does not exist.">',
);
document.body.insertAdjacentHTML('beforeend', '<input type="date" class="js-input-date-to-text" data-validation-noexist="This date does not exist.">');

new InputDateToText(document.querySelector('.js-input-date-to-text'));
});
Expand Down Expand Up @@ -153,10 +150,7 @@ describe('submit event', () => {

describe('value pattern', () => {
beforeEach(() => {
document.body.insertAdjacentHTML(
'beforeend',
'<input type="date" class="js-input-date-to-text" data-validation-noexist="This date does not exist.">',
);
document.body.insertAdjacentHTML('beforeend', '<input type="date" class="js-input-date-to-text" data-validation-noexist="This date does not exist.">');

new InputDateToText(document.querySelector('.js-input-date-to-text'));
});
Expand Down

0 comments on commit 1b9d9fa

Please sign in to comment.