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

chore: bump deps, use pnpm instead #568

Merged
merged 5 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
chore: bump deps, use pnpm instead
  • Loading branch information
JounQin committed Jul 11, 2023
commit 680cbdd499a84bea553a2d4abd2262abb7a7d51d
2 changes: 1 addition & 1 deletion .commitlintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@1stg"
"extends": "@commitlint/config-conventional"
}
22 changes: 22 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"env": {
"mocha": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@eslint-community/eslint-comments/recommended",
"plugin:eslint-plugin/recommended",
"plugin:n/recommended",
"plugin:mdx/recommended",
"plugin:prettier/recommended"
],
"rules": {
"eslint-plugin/report-message-format": ["error", "^[^a-z].*\\.$"]
}
}
39 changes: 0 additions & 39 deletions .eslintrc.json

This file was deleted.

11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,24 @@ jobs:
- 14
- 16
- 18
- 20

steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
cache: pnpm

- name: Install
run: yarn --frozen-lockfile
run: pnpm install

- name: Test
run: yarn mocha
run: pnpm mocha

- name: Perf
run: TIMING=1 yarn lint
run: TIMING=1 pnpm lint
10 changes: 5 additions & 5 deletions .github/workflows/pkg-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2

- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache: pnpm

- name: Package Size Report
uses: pkg-size/action@v1
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Setup Node.js 16
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2

- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache: pnpm

- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm install

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
*.log
.*cache
.yarn/*
!.yarn/plugins
!.yarn/releases
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,md,ts}": ["eslint --cache -f friendly --fix"],
"*.{json,yml}": ["prettier --write"]
}
1 change: 0 additions & 1 deletion .lintstagedrc.js

This file was deleted.

6 changes: 5 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
"@1stg/prettier-config/semi"
{
"arrowParens": "avoid",
"singleQuote": true,
"plugins": ["prettier-plugin-pkg"]
}
1 change: 0 additions & 1 deletion .simple-git-hooks.js

This file was deleted.

4 changes: 4 additions & 0 deletions .simple-git-hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"pre-commit": "npx lint-staged",
"commit-msg": "npx commitlint -e"
}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ Thanks for contributing!
```sh
git clone https://github.com/prettier/eslint-plugin-prettier.git
cd eslint-plugin-prettier
yarn
pnpm install
```

## Running the tests

```sh
yarn test
pnpm test
```

This is an [ESLint](http://eslint.org) plugin. Documentation for the APIs that it uses can be found on ESLint's [Working with Plugins](http://eslint.org/docs/developer-guide/working-with-plugins) page.

This plugin is used to lint itself. The style is checked when `yarn test` is run, and the build will fail if there are any linting errors. You can use `yarn lint --fix` to fix some linting errors. To run the tests without running the linter, you can use `yarn mocha`.
This plugin is used to lint itself. The style is checked when `pnpm test` is run, and the build will fail if there are any linting errors. You can use `pnpm lint --fix` to fix some linting errors. To run the tests without running the linter, you can use `pnpm mocha`.

## Commit messages

Expand All @@ -27,7 +27,7 @@ Please view [commitlint](https://commitlint.js.org) for more details.
## Publishing

```sh
yarn release
pnpm release
```

Please view [changesets](https://github.com/changesets/changesets) and its [action](https://github.com/changesets/action) for more details.
57 changes: 30 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"funding": "https://opencollective.com/prettier",
"license": "MIT",
"packageManager": "yarn@1.22.19",
"packageManager": "pnpm@8.6.7",
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
Expand All @@ -28,12 +28,12 @@
"prettier"
],
"scripts": {
"format": "yarn prettier '**/*.{js,json,md,yml}' --write && yarn lint --fix",
"format": "prettier --write . && pnpm lint --fix",
"lint": "eslint . --cache -f friendly --max-warnings 10",
"prepare": "simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
"prerelease": "yarn format && yarn test",
"prepare": "simple-git-hooks",
"prerelease": "pnpm format && pnpm test",
"release": "changeset publish",
"test": "yarn lint && mocha"
"test": "pnpm lint && mocha"
},
"peerDependencies": {
"@types/eslint": ">=8.0.0",
Expand All @@ -53,29 +53,32 @@
"synckit": "^0.8.5"
},
"devDependencies": {
"@1stg/common-config": "^7.1.1",
"@changesets/changelog-github": "^0.4.6",
"@changesets/cli": "^2.24.4",
"@graphql-eslint/eslint-plugin": "^3.10.7",
"@types/eslint": "^8.4.6",
"@types/prettier": "^2.7.0",
"@1stg/remark-preset": "^2.0.0",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@commitlint/config-conventional": "^17.6.6",
"@eslint-community/eslint-plugin-eslint-comments": "^3.2.1",
"@graphql-eslint/eslint-plugin": "^3.20.0",
"@types/eslint": "^8.44.0",
"@types/prettier-linter-helpers": "^1.0.1",
"@typescript-eslint/parser": "^5.36.1",
"eslint-config-prettier": "^8.5.0",
"eslint-mdx": "^2.0.2",
"eslint-plugin-eslint-plugin": "^5.0.6",
"eslint-plugin-mdx": "^2.0.2",
"eslint-plugin-self": "^1.2.1",
"eslint-plugin-svelte": "^2.7.0",
"eslint-plugin-svelte3": "^4.0.0",
"graphql": "^16.6.0",
"mocha": "^10.0.0",
"svelte": "^3.49.0",
"vue-eslint-parser": "^9.0.3",
"yarn-deduplicate": "^6.0.0"
},
"resolutions": {
"commitlint": "^17.6.6",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-formatter-friendly": "^7.0.0",
"eslint-mdx": "^2.1.0",
"eslint-plugin-eslint-plugin": "^5.1.0",
"eslint-plugin-mdx": "^2.1.0",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-prettier": "link:.",
"prettier": "^3.0.0-alpha.0"
"eslint-plugin-svelte": "^2.32.2",
"eslint-plugin-svelte3": "^4.0.0",
"graphql": "^16.7.1",
"lint-staged": "^13.2.3",
"mocha": "^10.2.0",
"prettier": "^3.0.0",
"prettier-plugin-pkg": "^0.18.0",
"simple-git-hooks": "^2.8.1",
"svelte": "^4.0.5",
"vue-eslint-parser": "^9.3.1"
}
}
Loading