Add prettierrc for editor compatibility

The tsserver lsp doesn't seem to work well with .editorconfig. Using
prettierrc will allow formatting to work correctly with editor plugins

This also updates editorconfig to work well with json

Change-type: patch
This commit is contained in:
Felipe Lalanne 2024-01-24 18:43:07 -03:00
parent d32987ab1f
commit e2f54e29fa
2 changed files with 7 additions and 1 deletions

View File

@ -11,5 +11,6 @@ insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[*.json]
[*.{json,yml}]
indent_style = space
indent_size = 2

5
.prettierrc.js Normal file
View File

@ -0,0 +1,5 @@
const fs = require('fs');
module.exports = JSON.parse(
fs.readFileSync('./node_modules/@balena/lint/config/.prettierrc', 'utf8'),
);