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

fix: default directory #407

Merged
merged 5 commits into from
Oct 13, 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
16 changes: 8 additions & 8 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,23 @@ jobs:
yes "my-package" | head -n 1 | pnpm create vue@latest . --default --typescript
pnpm add file:${{ github.workspace }}/package/ -D
pnpm install
pnpm vue-mess-detector analyze ./ --output=json --file-output=vmd-output.json
pnpm vue-mess-detector analyze --output=json --file-output=vmd-output.json
elif [ "${{ matrix.package-manager }}" == "yarn" ]; then
yes "my-package" | head -n 1 | yarn --cwd . create vue . --default --typescript
touch ./yarn.lock
yarn add vue-mess-detector@file:${{ github.workspace }}/package/ -D
yarn install
yarn vue-mess-detector analyze ./ --output=json --file-output=vmd-output.json
yarn vue-mess-detector analyze --output=json --file-output=vmd-output.json
elif [ "${{ matrix.package-manager }}" == "bun" ]; then
yes "my-package" | head -n 1 | bun create vue . --default --typescript --cwd=. --ignore-scripts
bun add file:${{ github.workspace }}/package/ --dev
bun install --ignore-scripts
bun run vue-mess-detector analyze ./ --output=json --file-output=vmd-output.json
bun run vue-mess-detector analyze --output=json --file-output=vmd-output.json
else
yes "my-package" | head -n 1 | npm create vue@latest -- . --default --typescript
npm install file:${{ github.workspace }}/package/ --save-dev
npm install
npx vue-mess-detector analyze ./ --output=json --file-output=vmd-output.json
npx vue-mess-detector analyze --output=json --file-output=vmd-output.json
fi
node -e "const fs = require('fs'); try { const data = JSON.parse(fs.readFileSync('vmd-output.json', 'utf8')); console.log(JSON.stringify(data, null, 2)); } catch (e) { throw new Error('Something went wrong'); }"

Expand All @@ -125,23 +125,23 @@ jobs:
echo "my-package" | pnpm create vue@latest . --default --typescript
pnpm add file:${{ github.workspace }}/package/ -D
pnpm install
pnpm vue-mess-detector analyze ./ --output=json --file-output=vmd-output.json
pnpm vue-mess-detector analyze --output=json --file-output=vmd-output.json
} elseif ($Env:matrix_package_manager -eq 'yarn') {
echo "my-package" | yarn create vue . --default --typescript
touch ./yarn.lock
yarn add vue-mess-detector@file:${{ github.workspace }}/package/ -D
yarn install
yarn vue-mess-detector analyze ./ --output=json --file-output=vmd-output.json
yarn vue-mess-detector analyze --output=json --file-output=vmd-output.json
} elseif ($Env:matrix_package_manager -eq 'bun') {
echo "my-package" | bun create vue . --default --typescript --ignore-scripts
bun add file:${{ github.workspace }}/package/ --d
bun install --ignore-scripts
bun run vue-mess-detector analyze ./ --output=json --file-output=vmd-output.json
bun run vue-mess-detector analyze --output=json --file-output=vmd-output.json
} else {
echo "my-package" | npm create vue@latest -- . --default --typescript
npm install file:${{ github.workspace }}/package/ --save-dev
npm install
npx vue-mess-detector analyze ./ --output=json --file-output=vmd-output.json
npx vue-mess-detector analyze --output=json --file-output=vmd-output.json
}
node -e "const fs = require('fs'); try { const data = JSON.parse(fs.readFileSync('vmd-output.json', 'utf8')); console.log(JSON.stringify(data, null, 2)); } catch (e) { throw new Error('Something went wrong'); }"

Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ getProjectRoot(pathArg).then(async (projectRoot) => {
builder: yargs => yargs
.positional('path', {
describe: 'path to the Vue files',
default: './src',
default: pathArg,
})
.option('apply', {
alias: 'a',
Expand Down
1 change: 0 additions & 1 deletion src/helpers/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const getConfigFileContent = async (filePath: string) => {

export const getConfig = async (projectRoot: string): Promise<Config> => {
const defaultConfig: Config = {
path: './',
apply: Object.values(RULESETS).join(','),
ignore: '',
exclude: '',
Expand Down
2 changes: 1 addition & 1 deletion src/types/Config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { OverrideConfig } from './Override'

export interface Config {
path: string
path?: string
apply: string
ignore: string
exclude: string
Expand Down