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/.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.json b/package.json index d94e8af..636e570 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/packages/button-share/__tests__/ButtonShare.test.js b/packages/button-share/__tests__/ButtonShare.test.js index 277167d..b9c124c 100644 --- a/packages/button-share/__tests__/ButtonShare.test.js +++ b/packages/button-share/__tests__/ButtonShare.test.js @@ -22,6 +22,8 @@ describe('attribute', () => { new ButtonShare(document.querySelector('.js-button-share')); - expect(document.body.innerHTML).toBe(''); + expect(document.body.innerHTML).toBe( + '', + ); }); }); diff --git a/packages/input-date-to-text/__tests__/InputDateToText.test.js b/packages/input-date-to-text/__tests__/InputDateToText.test.js index 1512b1b..7c755f3 100644 --- a/packages/input-date-to-text/__tests__/InputDateToText.test.js +++ b/packages/input-date-to-text/__tests__/InputDateToText.test.js @@ -91,10 +91,7 @@ describe('attribute', () => { describe('change event', () => { beforeEach(() => { - document.body.insertAdjacentHTML( - 'beforeend', - '', - ); + document.body.insertAdjacentHTML('beforeend', ''); new InputDateToText(document.querySelector('.js-input-date-to-text')); }); @@ -153,10 +150,7 @@ describe('submit event', () => { describe('value pattern', () => { beforeEach(() => { - document.body.insertAdjacentHTML( - 'beforeend', - '', - ); + document.body.insertAdjacentHTML('beforeend', ''); new InputDateToText(document.querySelector('.js-input-date-to-text')); });