Skip to content

Commit

Permalink
refactor(prettier-config): rename
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Sep 17, 2023
1 parent 7bb9884 commit 5b63fe2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-experts-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@git-validator/prettier-config": minor
---

refactor(prettier-config): rename
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The `commit-msg` file we wrote validates your git commit message before the comm

### `pre-commit` Stage

The `pre-commit` file we wrote lints and formats your staged code before the commit is made. We use [Eslint](https://www.npmjs.com/package/eslint) with [@zanminkian/eslint-config](https://www.npmjs.com/package/@zanminkian/eslint-config) and [Prettier](https://www.npmjs.com/package/prettier) with [@zanminkian/prettier-config](https://www.npmjs.com/package/@zanminkian/prettier-config) to check the committing code.
The `pre-commit` file we wrote lints and formats your staged code before the commit is made. We use [Eslint](https://www.npmjs.com/package/eslint) with [@zanminkian/eslint-config](https://www.npmjs.com/package/@zanminkian/eslint-config) and [Prettier](https://www.npmjs.com/package/prettier) with [@git-validator/prettier-config](https://www.npmjs.com/package/@git-validator/prettier-config) to check the committing code.

## Advanced Usage

Expand All @@ -88,7 +88,7 @@ We use `eslint`, `prettier`, `commitlint`, and `lint-staged` under the hood. So

- Adding `eslint.config.js` file to apply your own rules when git committing and running `git-validator lint`. We use npm package [@zanminkian/eslint-config](https://www.npmjs.com/package/@zanminkian/eslint-config) as the default eslint config.
- Adding `.eslintignore` file to skip validating certain specific files when git committing and running `git-validator lint`.
- Addint `prettier.config.js` file to apply you own rules when git committing and running `git-validator format`. We use npm package [@zanminkian/prettier-config](https://www.npmjs.com/package/@zanminkian/prettier-config) as the default prettier config.
- Addint `prettier.config.js` file to apply you own rules when git committing and running `git-validator format`. We use npm package [@git-validator/prettier-config](https://www.npmjs.com/package/@git-validator/prettier-config) as the default prettier config.
- Adding `.prettierignore` file to skip formatting certain specific files when git committing and running `git-validator format`.
- Adding `commitlint.config.js` file to apply your committing rules on the `commit-msg` stage. The default config is `{ extends: ['@commitlint/config-conventional'] }`.
- Adding `lint-staged.config.js` file to customize your lint-staged flow. The default config is `{ '*': ['npx git-validator -u'] }`.
Expand Down
4 changes: 2 additions & 2 deletions packages/git-validator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The `commit-msg` file we wrote validates your git commit message before the comm

### `pre-commit` Stage

The `pre-commit` file we wrote lints and formats your staged code before the commit is made. We use [Eslint](https://www.npmjs.com/package/eslint) with [@zanminkian/eslint-config](https://www.npmjs.com/package/@zanminkian/eslint-config) and [Prettier](https://www.npmjs.com/package/prettier) with [@zanminkian/prettier-config](https://www.npmjs.com/package/@zanminkian/prettier-config) to check the committing code.
The `pre-commit` file we wrote lints and formats your staged code before the commit is made. We use [Eslint](https://www.npmjs.com/package/eslint) with [@zanminkian/eslint-config](https://www.npmjs.com/package/@zanminkian/eslint-config) and [Prettier](https://www.npmjs.com/package/prettier) with [@git-validator/prettier-config](https://www.npmjs.com/package/@git-validator/prettier-config) to check the committing code.

## Advanced Usage

Expand All @@ -88,7 +88,7 @@ We use `eslint`, `prettier`, `commitlint`, and `lint-staged` under the hood. So

- Adding `eslint.config.js` file to apply your own rules when git committing and running `git-validator lint`. We use npm package [@zanminkian/eslint-config](https://www.npmjs.com/package/@zanminkian/eslint-config) as the default eslint config.
- Adding `.eslintignore` file to skip validating certain specific files when git committing and running `git-validator lint`.
- Addint `prettier.config.js` file to apply you own rules when git committing and running `git-validator format`. We use npm package [@zanminkian/prettier-config](https://www.npmjs.com/package/@zanminkian/prettier-config) as the default prettier config.
- Addint `prettier.config.js` file to apply you own rules when git committing and running `git-validator format`. We use npm package [@git-validator/prettier-config](https://www.npmjs.com/package/@git-validator/prettier-config) as the default prettier config.
- Adding `.prettierignore` file to skip formatting certain specific files when git committing and running `git-validator format`.
- Adding `commitlint.config.js` file to apply your committing rules on the `commit-msg` stage. The default config is `{ extends: ['@commitlint/config-conventional'] }`.
- Adding `lint-staged.config.js` file to customize your lint-staged flow. The default config is `{ '*': ['npx git-validator -u'] }`.
Expand Down
2 changes: 1 addition & 1 deletion packages/git-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@zanminkian/eslint-config": "workspace:^",
"@zanminkian/prettier-config": "workspace:^",
"@git-validator/prettier-config": "workspace:^",
"commander": "^11.0.0",
"cosmiconfig": "^8.3.6",
"eslint": "^8.49.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/git-validator/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export async function format(paths = [], options = {}) {
...((await exists(gitIgnore)) ? [gitIgnore] : []),
].flatMap((p) => ["--ignore-path", p]);
const configPath =
(await getConfigFilePath("prettier")) ?? requireResolve("@zanminkian/prettier-config");
(await getConfigFilePath("prettier")) ?? requireResolve("@git-validator/prettier-config");

return spawnSync(
"npx",
Expand Down
4 changes: 2 additions & 2 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zanminkian/prettier-config",
"name": "@git-validator/prettier-config",
"type": "module",
"version": "0.5.0",
"version": "0.0.0",
"description": "The best prettier shareable config.",
"homepage": "https://github.com/zanminkian/git-validator/tree/main/packages/prettier-config",
"exports": "./index.js",
Expand Down

0 comments on commit 5b63fe2

Please sign in to comment.