Skip to content

Commit

Permalink
Add prettier plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz committed Apr 4, 2024
1 parent 7a03dc4 commit 7b27107
Show file tree
Hide file tree
Showing 4 changed files with 310 additions and 13 deletions.
39 changes: 39 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* @type {import('prettier').Config}
* @see https://prettier.io/docs/en/options.html
*/
const prettierOptions = {
printWidth: 120,
proseWrap: 'always',
semi: false,
singleQuote: true,
useTabs: false,
jsxSingleQuote: false,
plugins: ['prettier-plugin-packagejson'],
overrides: [
{
files: '*.html',
options: {
plugins: ['@shopify/prettier-plugin-liquid'],
parser: 'liquid-html',
singleQuote: false,
liquidSingleQuote: false,
},
},
{
files: ['*.scss', '*.css'],
options: {
singleQuote: false,
printWidth: 80,
},
},
{
files: ['.github/workflows/**/*.yml'],
options: {
proseWrap: 'preserve',
},
},
],
}

module.exports = prettierOptions
7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "locutus",
"version": "2.0.17",
"version": "2.0.18",
"license": "MIT",
"description": "Locutus other languages' standard libraries to JavaScript for fun and educational purposes",
"homepage": "https://locutus.io",
Expand All @@ -11,6 +11,7 @@
"yarn": "4.0.1"
},
"devDependencies": {
"@shopify/prettier-plugin-liquid": "^1.4.4",
"async": "2.6.4",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
Expand Down Expand Up @@ -45,6 +46,7 @@
"mocha": "5.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.5",
"prettier-plugin-packagejson": "^2.4.14",
"rimraf": "3.0.2"
},
"keywords": [
Expand Down
Loading

0 comments on commit 7b27107

Please sign in to comment.