Skip to content

Conversation

guoyunhe
Copy link
Contributor

使用 f2elint 工具接入最新的 ESLint, Stylelint, Prettier, Commitlint, Husky 工具链

Copy link
Contributor

github-actions bot commented Apr 26, 2025

Preview is ready

Copy link

socket-security bot commented Apr 26, 2025

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert (click for details)
Warn High
[email protected] is Protestware or potentially unwanted behavior.

Note: The script attempts to run a local post-install script, which could potentially contain malicious code. The error handling suggests that it is designed to fail silently, which is a common tactic in malicious scripts.

Source

ℹ Read more on: This package | This alert | What is protestware?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Consider that consuming this package may come along with functionality unrelated to its primary purpose.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@afc163
Copy link
Member

afc163 commented Apr 26, 2025

ci 挂了,要处理一下。

@afc163 afc163 requested a review from Copilot April 26, 2025 14:20
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the linting toolchain by switching to f2elint for integrating ESLint, Stylelint, Prettier, Commitlint, and Husky. It removes all legacy configuration files and introduces a new ESLint configuration.

Reviewed Changes

Copilot reviewed 6 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
eslint.config.mjs New ESLint configuration integrating react and prettier configs via f2elint
commitlint.config.js Legacy commitlint configuration removed
.stylelintrc.js Legacy stylelint configuration removed
.prettierrc.js Legacy prettier configuration removed
.eslintrc.js Legacy ESLint configuration removed
Files not reviewed (6)
  • .editorconfig: Language not supported
  • .eslintignore: Language not supported
  • .husky/commit-msg: Language not supported
  • .husky/pre-commit: Language not supported
  • .vscode/settings.json: Language not supported
  • package.json: Language not supported

Copy link

cloudflare-workers-and-pages bot commented Apr 26, 2025

Deploying ant-design-mobile with  Cloudflare Pages  Cloudflare Pages

Latest commit: 776dfba
Status:🚫  Build failed.

View logs

Copy link

codecov bot commented Apr 26, 2025

Codecov Report

❌ Patch coverage is 89.62264% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.76%. Comparing base (d3b3bae) to head (776dfba).
⚠️ Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
src/components/form/form-item.tsx 0.00% 6 Missing ⚠️
src/components/floating-panel/floating-panel.tsx 50.00% 2 Missing ⚠️
src/components/collapse/collapse.tsx 80.00% 1 Missing ⚠️
src/components/image-uploader/image-uploader.tsx 80.00% 1 Missing ⚠️
src/components/image-viewer/slides.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6861      +/-   ##
==========================================
- Coverage   92.76%   92.76%   -0.01%     
==========================================
  Files         336      336              
  Lines        7214     7211       -3     
  Branches     1799     1807       +8     
==========================================
- Hits         6692     6689       -3     
- Misses        486      514      +28     
+ Partials       36        8      -28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Apr 26, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
./lib/bundle/antd-mobile.es.js 0 B (-109.12 KB 🔽) 0 ms (-100% 🔽) 0 ms (-100% 🔽) 0 ms
lib/bundle/antd-mobile.es.js 109.49 KB (+109.49 KB 🔺) 2.2 s (+100% 🔺) 308 ms (+100% 🔺) 2.5 s

gulpfile.js Outdated
const packageJson = require('./package.json')
const StatoscopeWebpackPlugin = require('@statoscope/webpack-plugin').default
const pxMultiplePlugin = require('postcss-px-multiple')({ times: 2 })
const gulp = require('gulp');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我不太建议改分号规则,这样 blame 全部会指这个 PR。或者可以考虑配置只格式化提交的文件。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已去除分号和逗号规则,Diff 行数从 37K 减少到了 19K

@guoyunhe guoyunhe changed the title chore: f2elint refactor: f2elint Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants