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

infra: upgrade prettier #972

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ module.exports = {
},
},
],
}
};
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
{
"groupName": "prettier",
"matchPackageNames": ["@types/prettier", "prettier"]
"matchPackageNames": ["prettier"]
},
{
"groupName": "typescript",
Expand Down
7 changes: 5 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
dist
templates
.pnpm-store/
coverage/
dist/
templates/
CHANGELOG.md
pnpm-lock.yaml
20 changes: 15 additions & 5 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// @ts-check

/**
* @type {import('prettier').Config}
*/
module.exports = {
semi: false,
trailingComma: 'all',
plugins: ['prettier-plugin-organize-imports'],
singleQuote: true,
printWidth: 120,
tabWidth: 2,
trailingComma: 'es5',
overrides: [
{
files: '*.json5',
Expand All @@ -14,5 +17,12 @@ module.exports = {
trailingComma: 'none',
},
},
{
files: '*.md',
options: {
// @ts-expect-error: known property
organizeImportsSkipDestructiveCodeActions: true,
},
},
],
}
};
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports.up = (pgm) => {
notNull: true,
default: pgm.func('current_timestamp'),
},
})
});
pgm.createTable('posts', {
id: 'id',
userId: {
Expand All @@ -56,9 +56,9 @@ exports.up = (pgm) => {
notNull: true,
default: pgm.func('current_timestamp'),
},
})
pgm.createIndex('posts', 'userId')
}
});
pgm.createIndex('posts', 'userId');
};
```

Save migration file.
Expand All @@ -76,8 +76,8 @@ Run `npm run migrate create posts lead`, edit `xxx_posts_lead.js`:
exports.up = (pgm) => {
pgm.addColumns('posts', {
lead: { type: 'text', notNull: true },
})
}
});
};
```

Run `npm run migrate up` and there will be new column in `posts` table :tada: :tada:
Expand Down
Loading