Skip to content

Commit

Permalink
Add Prettier (#41)
Browse files Browse the repository at this point in the history
* Add Prettier

* see npm/cli#7672

* review feedback

* review feedback
  • Loading branch information
Apollon77 authored Jul 21, 2024
1 parent 6782131 commit dbe4d0f
Show file tree
Hide file tree
Showing 70 changed files with 2,873 additions and 1,341 deletions.
30 changes: 9 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,19 @@ module.exports = {
jsx: true,
},
},
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
rules: {
'indent': 'off',
'@typescript-eslint/indent': [
'error',
4,
{
'SwitchCase': 1
}
],
'semi': 'off',
semi: 'off',
'@typescript-eslint/semi': 'error',
'object-curly-spacing': 'off',
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
'space-before-function-paren': 'off',
'@typescript-eslint/space-before-function-paren': ['error', 'never'],
'quotes': [
'@typescript-eslint/object-curly-spacing': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
quotes: [
'error',
'single',
{
'avoidEscape': true,
'allowTemplateLiterals': true
}
avoidEscape: true,
allowTemplateLiterals: true,
},
],
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-explicit-any': 'off',
Expand Down Expand Up @@ -74,4 +62,4 @@ module.exports = {
},
},
],
};
};
2 changes: 1 addition & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [18.x, 20.x, 22.4.1]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/**
/admin/**
15 changes: 15 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"printWidth": 120,
"semi": true,
"tabWidth": 4,
"useTabs": false,
"trailingComma": "all",
"singleQuote": true,
"endOfLine": "lf",
"bracketSpacing": true,
"arrowParens": "avoid",
"quoteProps": "as-needed",
"plugins": [
"prettier-plugin-organize-imports"
]
}
Loading

0 comments on commit dbe4d0f

Please sign in to comment.