1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-18 21:35:27 -04:00

Add Prettier to format TypeScript files

This commit is contained in:
Mark McDowall
2023-01-08 00:26:33 -08:00
committed by Mark McDowall
parent 910511dba0
commit de56862bb9
6 changed files with 76 additions and 3 deletions
+7 -1
View File
@@ -45,7 +45,8 @@ module.exports = {
'react-hooks',
'simple-import-sort',
'import',
'@typescript-eslint'
'@typescript-eslint',
'prettier'
],
settings: {
@@ -348,12 +349,17 @@ module.exports = {
project: './tsconfig.json'
},
extends: [
'prettier'
],
rules: Object.assign(typescriptEslintRecommended.rules, {
'no-shadow': 'off',
// These should be enabled after cleaning things up
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'react/prop-types': 'off',
'prettier/prettier': 'error',
'simple-import-sort/imports': [
'error',
{
+10
View File
@@ -0,0 +1,10 @@
# Ignore everything recursively
*
# But not the .ts files
!*.ts*
*css.d.ts
# Check subdirectories too
!*/
+6
View File
@@ -0,0 +1,6 @@
{
"arrowParens": "always",
"endOfLine": "auto",
"singleQuote": true,
"trailingComma": "es5"
}
+21 -2
View File
@@ -1,4 +1,23 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.insertFinalNewline": true
}
"files.insertFinalNewline": true,
"files.exclude": {
"**/node_modules": true,
"**/*.d.css": true
},
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"typescript.preferences.quoteStyle": "single",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
}