Skip to content

Commit

Permalink
Enforce single attribute per line in JS, JSX & Vue (#23)
Browse files Browse the repository at this point in the history
* Enforce single attribute per line in JS, JSX & Vue

* Run Prettier after config change
  • Loading branch information
germanfrelo authored Jun 4, 2024
1 parent 345b03c commit a6b64df
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 30 deletions.
7 changes: 5 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"singleAttributePerLine": true,
"useTabs": true,
"overrides": [
{
"files": ["*.html", "*.css"],
"options": {
"printWidth": 999999
"printWidth": 9999
}
},
{
"files": ["*.js", "*.jsx", "*.vue"],
"options": { "singleAttributePerLine": true }
}
]
}
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ Here's a minimal representation of the markup expected to be produced by this ne
```html
<form class="guess-input-wrapper">
<label for="guess-input">Enter guess:</label>
<input
id="guess-input"
type="text"
/>
<input id="guess-input" type="text" />
</form>
```

Expand Down
5 changes: 1 addition & 4 deletions docs/end-result.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ <h1>Word Game</h1>

<form class="guess-input-wrapper">
<label for="guess-input">Enter guess:</label>
<input
id="guess-input"
type="text"
/>
<input id="guess-input" type="text" />
</form>

<div class="happy banner">
Expand Down
25 changes: 5 additions & 20 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link
rel="icon"
href="favicon.png"
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1"
/>
<link rel="icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Word Game</title>
<link
rel="stylesheet"
href="../src/reset.css"
/>
<link
rel="stylesheet"
href="../src/styles.css"
/>
<script
type="module"
src="../src/index.js"
></script>
<link rel="stylesheet" href="../src/reset.css" />
<link rel="stylesheet" href="../src/styles.css" />
<script type="module" src="../src/index.js"></script>
</head>
<body>
<div id="root"></div>
Expand Down

0 comments on commit a6b64df

Please sign in to comment.