Skip to content

Commit

Permalink
Use Prettier to format code
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Aug 3, 2023
1 parent 750bee7 commit 3544315
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# JavaScript (formatted with Standard)
**/*.js
**/*.mjs
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.

23 changes: 22 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/x-govuk/marked-govspeak.git"
},
"scripts": {
"lint": "standard && stylelint 'govspeak/**/*.scss'",
"lint": "prettier . --check && standard && stylelint 'govspeak/**/*.scss'",
"test": "ava",
"test:watch": "ava --watch",
"coverage": "c8 ava"
Expand All @@ -38,6 +38,7 @@
"devDependencies": {
"ava": "^5.0.0",
"c8": "^8.0.0",
"prettier": "^3.0.1",
"standard": "^17.0.0",
"stylelint": "^15.0.0",
"stylelint-config-gds": "^1.0.0"
Expand All @@ -51,6 +52,26 @@
"lcovonly"
]
},
"prettier": {
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"overrides": [
{
"files": "*.md",
"options": {
"embeddedLanguageFormatting": "off",
"singleQuote": false
}
},
{
"files": "*.scss",
"options": {
"singleQuote": false
}
}
]
},
"stylelint": {
"extends": "stylelint-config-gds/scss"
}
Expand Down

0 comments on commit 3544315

Please sign in to comment.