Skip to content

Commit

Permalink
fix(ignore): Implement prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jul 2, 2024
1 parent f8c5b96 commit 0a91389
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 158 deletions.
43 changes: 39 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module.exports = {
parserOptions: {
"project": "./tsconfig.json",
},
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
plugins: ['@typescript-eslint', 'perfectionist'],
extends: ['plugin:@typescript-eslint/recommended', 'prettier'],
rules: {
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "off",
Expand All @@ -14,10 +14,45 @@ module.exports = {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/semi": ["error"],
"array-bracket-spacing": ["error", "never"],
"indent": ["error", 4],
"max-len": ["error", { "code": 150 }],
"no-return-await": "error",
"object-curly-spacing": ["error", "never"],
"@typescript-eslint/no-floating-promises": "error",
"perfectionist/sort-imports": [
"error",
{
"groups": [
"type",
[
"builtin",
"external"
],
"internal-type",
"internal",
[
"parent-type",
"sibling-type",
"index-type"
],
[
"parent",
"sibling",
"index"
],
"object",
"unknown"
],
"custom-groups": {
"value": {},
"type": {}
},
"newlines-between": "always",
"internal-pattern": [
"~/**"
],
"type": "natural",
"order": "asc",
"ignore-case": false
}
],
}
}
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint
run: |
npm run pretty:check
npm run eslint
- name: Build
run: npm run build
- name: Test
run: npm run test-with-coverage -- --testTimeout=10000
- name: Lint
run: npm run eslint
- name: Publish new release
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
run: |
Expand Down
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 150,
"bracketSpacing": false,
"endOfLine": "lf",
"tabWidth": 4
}
Loading

0 comments on commit 0a91389

Please sign in to comment.