Skip to content

Commit

Permalink
fix: lint error log
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitusun committed Aug 7, 2024
1 parent 97bd102 commit 9fc8993
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,4 @@ dist/
.mfsu
.dumi

#
**/config/typescript/tsconfig.json
**/config/eslint/index.js

pnpm-lock.yaml

publish
3 changes: 2 additions & 1 deletion examples/mp-base/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "esboot-react-mp",
"name": "example-mp-base",
"version": "1.0.0",
"testVersion": 1,
"description": "",
"private": true,
"main": "index.js",
"scripts": {
"esboot": "esboot",
Expand Down
2 changes: 1 addition & 1 deletion examples/sp-base/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "sp-bundler-vite",
"name": "example-sp-base",
"version": "1.0.0",
"testVersion": 1,
"description": "",
Expand Down
11 changes: 11 additions & 0 deletions lerna-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
70 error Error: Command failed with exit code 1: git add -- packages/eslint-plugin-esboot/package.json packages/common/package.json packages/lint/package.json packages/esboot/package.json packages/bundler-common/package.json packages/bundler-rspack/package.json packages/bundler-vite/package.json packages/bundler-webpack/package.json lerna.json pnpm-lock.yaml
70 error The following paths are ignored by one of your .gitignore files:
70 error pnpm-lock.yaml
70 error hint: Use -f if you really want to add them.
70 error hint: Turn this message off by running
70 error hint: "git config advice.addIgnoredFile false"
70 error at makeError (/Users/rocsun/Code/dz-library/esboot/]esboot-next/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:59:11)
70 error at handlePromise (/Users/rocsun/Code/dz-library/esboot/]esboot-next/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:114:26)
70 error at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70 error at async VersionCommand.updatePackageVersions (/Users/rocsun/Code/dz-library/esboot/]esboot-next/node_modules/.pnpm/[email protected][email protected]/node_modules/lerna/dist/index.js:9883:11)
70 error at async Promise.all (index 0)
20 changes: 10 additions & 10 deletions packages/lint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ const importExeca = import('execa');
export async function lint(args: string[] = []) {
const { execa, ExecaError } = await importExeca;

await execa(
require.resolve('stylelint/bin/stylelint'),
['**/*.scss', ...args],
{
stdio: 'inherit',
shell: true,
}
);

try {
await execa(
execa(
require.resolve('stylelint/bin/stylelint'),
['**/*.scss', ...args],
{
stdio: 'inherit',
shell: true,
}
);

execa(
// Special case for eslint
'eslint',
['--ext', '.jsx,.js,.ts,.tsx', resolve(process.cwd(), 'src/'), ...args],
Expand Down

0 comments on commit 9fc8993

Please sign in to comment.