Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ignore): Implement prettier #1103

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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