-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use antfu/eslint
- Loading branch information
Showing
60 changed files
with
2,324 additions
and
1,466 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,79 +3,21 @@ on: | |
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
sherif: | ||
name: Monorepo Sherif | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Run sherif | ||
run: pnpm dlx sherif@latest | ||
|
||
lint: | ||
name: Lint and Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Lint | ||
run: pnpm run eslint:check | ||
|
||
- name: Format | ||
run: pnpm run prettier:check | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
name: Playwright Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build package | ||
run: pnpm run build-package | ||
|
||
- name: Install Playwright browsers | ||
run: pnpm dlx playwright install --with-deps | ||
|
||
- name: Run tests | ||
run: pnpm test | ||
|
||
node-version: 20 | ||
- run: npm install -g [email protected] | ||
- run: pnpm install --no-frozen-lockfile | ||
- run: pnpm build:package | ||
- run: npx playwright install --with-deps | ||
- run: pnpm test || exit 1 | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
// Enable the ESlint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
|
||
// Disable the default formatter, use eslint instead | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
|
||
// Auto fix | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
|
||
// Silent the stylistic rules in you IDE, but still auto fix them | ||
"eslint.rules.customizations": [ | ||
{ "rule": "style/*", "severity": "off" }, | ||
{ "rule": "format/*", "severity": "off" }, | ||
{ "rule": "*-indent", "severity": "off" }, | ||
{ "rule": "*-spacing", "severity": "off" }, | ||
{ "rule": "*-spaces", "severity": "off" }, | ||
{ "rule": "*-order", "severity": "off" }, | ||
{ "rule": "*-dangle", "severity": "off" }, | ||
{ "rule": "*-newline", "severity": "off" }, | ||
{ "rule": "*quotes", "severity": "off" }, | ||
{ "rule": "*semi", "severity": "off" } | ||
], | ||
|
||
// Enable eslint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml", | ||
"toml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu({ | ||
vue: true, | ||
typescript: true, | ||
rules: { | ||
'unused-imports/no-unused-vars': 'off', // off for now | ||
'@typescript-eslint/no-unused-vars': 'off', // off for now | ||
'node/prefer-global/process': 'off', // off for now | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
{ | ||
"type": "module", | ||
"version": "0.0.0", | ||
"private": true, | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"prettier:check": "prettier --check .", | ||
"prettier:fix": "prettier --write .", | ||
"eslint:check": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore", | ||
"eslint:fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"test": "pnpm -r test", | ||
"release": "pnpm -r release && changeset publish", | ||
"build:package": "pnpm --filter vaul-vue build-only", | ||
"build:playground": "pnpm build:package && pnpm --filter playground build" | ||
}, | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.6.4", | ||
"@changesets/cli": "^2.27.1", | ||
"@playwright/test": "^1.41.2", | ||
"@rushstack/eslint-patch": "^1.3.3", | ||
"@vue/eslint-config-prettier": "^8.0.0", | ||
"@vue/eslint-config-typescript": "^12.0.0", | ||
"eslint": "^8.49.0", | ||
"eslint-plugin-vue": "^9.17.0", | ||
"prettier": "^3.0.3" | ||
"eslint": "^8.56.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.