chore: move Prettier config to package.json

It is not yet possible to move `.prettierignore` to `package.json` too,
but this appears to be on the horizon; see [this Issue][prettier-issue].

[prettier-issue]: https://github.com/prettier/prettier/issues/3460
This commit is contained in:
Ben Goldsworthy 2021-04-25 21:42:54 +01:00
parent a3490691b9
commit b4916cf193
2 changed files with 9 additions and 9 deletions

View file

@ -1,7 +0,0 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2
}

View file

@ -4,7 +4,7 @@
"cm": "cz", "cm": "cz",
"format": "npm run format:js", "format": "npm run format:js",
"format:fix": "npm run format:js:fix", "format:fix": "npm run format:js:fix",
"format:js": "prettier --config .prettierrc './src/**/*.js'", "format:js": "prettier './src/**/*.js'",
"format:js:fix": "npm run format:js -- --write", "format:js:fix": "npm run format:js -- --write",
"lint": "npm run lint:js && npm run lint:css && npm run lint:md", "lint": "npm run lint:js && npm run lint:css && npm run lint:md",
"lint:fix": "npm run lint:js:fix && npm run lint:css:fix && npm run lint:md:fix", "lint:fix": "npm run lint:js:fix && npm run lint:css:fix && npm run lint:md:fix",
@ -87,5 +87,12 @@
"tmp/", "tmp/",
"*.min.js", "*.min.js",
"jquery.tools.js" "jquery.tools.js"
] ],
"prettier": {
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2
}
} }