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(package): switch to pnpm #376

Merged
merged 6 commits into from
May 31, 2023
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
16 changes: 8 additions & 8 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

- It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.

- Make sure `yarn test` passes. (see [development setup](#development-setup))
- Make sure `pnpm test` passes. (see [development setup](#development-setup))

- If adding new feature:

Expand All @@ -52,23 +52,23 @@

## Development Setup

You will need [Node.js](http://nodejs.org) and [Yarn](https://yarnpkg.com/en/)
You will need [Node.js](http://nodejs.org) and [pnpm](https://pnpm.io/)

After cloning the repo, run:

$ yarn
$ pnpm install

### Commonly used scirpt with Yarn
### Commonly used scirpt with `pnpm`

# lint source codes and docs
$ yarn lint
$ yarn lint:docs
$ pnpm lint
$ pnpm lint:docs

# run the vuepress
$ yarn docs
$ pnpm docs

# run the test suite
$ yarn test
$ pnpm test

There are some other scripts available in the `scripts` section of the `package.json` file.

Expand Down
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ about: Create a report to help us improve
<!--
Before posting the issue, please confirm that the problem you're getting
is not related with your code editor configuration.
To make sure it's not, run: yarn eslint src/your-file.vue
To make sure it's not, run: pnpm eslint src/your-file.vue
-->

**Tell us about your environment**
Expand Down Expand Up @@ -46,5 +46,3 @@ about: Create a report to help us improve
Please share a repository that can reproduce your issue.
If you don't share it, we will most likely add a comment asking you to share the repository.
-->


26 changes: 16 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
- name: Enable corepack
run: corepack enable
- name: Install
run: yarn install
run: pnpm install
- name: Lint
run: yarn lint
run: pnpm lint
- name: Lint docs
run: yarn lint:docs
run: pnpm lint:docs
test:
name: 'Test for ESLint 8 on Node.js ${{ matrix.node }} OS: ${{matrix.os}}'
runs-on: ${{ matrix.os }}
Expand All @@ -38,14 +40,16 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Enable corepack
run: corepack enable
- name: Install
run: yarn install
run: pnpm install
- name: Test
run: yarn test
run: pnpm test
- name: Integration Test
run: |
yarn build
yarn test:integrations
pnpm build
pnpm test:integrations
test-for-eslint:
name: 'Test for ESLint ${{ matrix.eslint }} on ${{ matrix.node }} OS: ${{matrix.os}}'
runs-on: ${{ matrix.os }}
Expand All @@ -61,10 +65,12 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Enable corepack
run: corepack enable
- name: Install
run: yarn add eslint@${{ matrix.eslint }}
run: pnpm add eslint@${{ matrix.eslint }}
- name: Install ts-eslint v5
run: yarn add @typescript-eslint/parser@4 @typescript-eslint/eslint-plugin@4
run: pnpm add @typescript-eslint/parser@4 @typescript-eslint/eslint-plugin@4
if: matrix.eslint == 5
- name: Test
run: yarn test
run: pnpm test
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"eslint.validate": ["javascript", "typescript", "vue", "markdown"],
"eslint.alwaysShowStatus": true,
"eslint.packageManager": "yarn",
"eslint.packageManager": "pnpm",
"eslint.run": "onSave",
"npm.packageManager": "yarn",
"npm.packageManager": "pnpm",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
2 changes: 1 addition & 1 deletion lib/rules/key-format-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const allowedCaseOptions = [
'snake_case',
'SCREAMING_SNAKE_CASE'
] as const
type CaseOption = typeof allowedCaseOptions[number]
type CaseOption = (typeof allowedCaseOptions)[number]

function create(context: RuleContext): RuleListener {
const filename = context.getFilename()
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/casing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const allowedCaseOptions = [
* Return case checker
*/
export function getCasingChecker(
name: typeof allowedCaseOptions[number]
name: (typeof allowedCaseOptions)[number]
): (str: string) => boolean {
return checkersMap[name] || isPascalCase
}
91 changes: 48 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,57 +24,61 @@
}
},
"dependencies": {
"@eslint/eslintrc": "^1.2.0",
"@intlify/core-base": "^9.1.9",
"@intlify/message-compiler": "^9.1.9",
"debug": "^4.3.1",
"glob": "^8.0.0",
"ignore": "^5.0.5",
"@eslint/eslintrc": "^1.4.1",
"@intlify/core-base": "^9.2.2",
"@intlify/message-compiler": "^9.2.2",
"debug": "^4.3.4",
"glob": "^8.1.0",
"ignore": "^5.2.4",
"is-language-code": "^3.1.0",
"js-yaml": "^4.0.0",
"json5": "^2.1.3",
"jsonc-eslint-parser": "^2.0.0",
"lodash": "^4.17.11",
"parse5": "^7.0.0",
"semver": "^7.3.4",
"vue-eslint-parser": "^9.0.0",
"yaml-eslint-parser": "^1.0.0"
"js-yaml": "^4.1.0",
"json5": "^2.2.3",
"jsonc-eslint-parser": "^2.3.0",
"lodash": "^4.17.21",
"parse5": "^7.1.2",
"semver": "^7.5.1",
"vue-eslint-parser": "^9.3.0",
"yaml-eslint-parser": "^1.2.2"
},
"devDependencies": {
"@types/debug": "^4.1.5",
"@types/eslint": "^8.0.0",
"@types/eslint-scope": "^3.7.0",
"@types/debug": "^4.1.7",
"@types/eslint": "^8.37.0",
"@types/eslint-scope": "^3.7.4",
"@types/eslint-visitor-keys": "^1.0.0",
"@types/js-yaml": "^4.0.0",
"@types/glob": "^8.1.0",
"@types/js-yaml": "^4.0.5",
"@types/json-schema": "^7.0.11",
"@types/json5": "^0.0.30",
"@types/lodash": "^4.14.159",
"@types/mocha": "^10.0.0",
"@types/parse5": "^6.0.0",
"@types/prettier": "^2.4.4",
"@types/semver": "^7.3.4",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^5.2.0",
"entities": "^4.4.0",
"eslint": "^8.1.0",
"eslint-config-prettier": "^8.0.0",
"@types/lodash": "^4.14.194",
"@types/mocha": "^10.0.1",
"@types/node": "^20.2.3",
"@types/parse5": "^6.0.3",
"@types/prettier": "^2.7.2",
"@types/semver": "^7.5.0",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"entities": "^4.5.0",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^9.0.0",
"eslint-plugin-vue-libs": "^3.0.0 || ^4.0.0",
"eslint4b": "^7.16.0",
"lerna-changelog": "^2.0.0",
"mocha": "^10.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.13.0",
"eslint-plugin-vue-libs": "^4.0.0",
"eslint4b": "^7.32.0",
"json-schema": "^0.4.0",
"lerna-changelog": "^2.2.0",
"mocha": "^10.2.0",
"monaco-editor": "^0.38.0",
"nyc": "^15.0.0",
"opener": "^1.5.1",
"prettier": "^2.0.5",
"rimraf": "^4.0.0",
"shipjs": "^0.26.0",
"ts-node": "^10.0.0",
"typescript": "^5.0.0",
"nyc": "^15.1.0",
"opener": "^1.5.2",
"prettier": "^2.8.8",
"rimraf": "^4.4.1",
"shipjs": "^0.26.3",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"vue-eslint-editor": "^1.1.0",
"vue-github-button": "^1.2.0",
"vuepress": "^1.8.2"
"vue-github-button": "^1.3.0",
"vuepress": "^1.9.9"
},
"engines": {
"node": "^14.17.0 || >=16.0.0"
Expand Down Expand Up @@ -104,6 +108,7 @@
"type": "git",
"url": "git+https://github.com/intlify/eslint-plugin-vue-i18n.git"
},
"packageManager": "[email protected]",
"scripts": {
"build": "tsc --project ./tsconfig.build.json",
"clean": "rimraf .nyc_output coverage dist docs/.vuepress/dist",
Expand Down
Loading