@apdesign/code-style-react 1.1.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apdesign/code-style-react",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "scripts": {},
5
5
  "bin": {
6
6
  "apdesign-code-style": "cli.js"
@@ -148,7 +148,11 @@ async function runEslint(targetPathArg) {
148
148
  console.log(`🔍 检查目录: ${eslintTarget}`);
149
149
  }
150
150
 
151
- const eslint = new ESLint({ cwd: rootDir });
151
+ const eslint = new ESLint({
152
+ cwd: gitRoot,
153
+ extensions: ['.js', '.jsx', '.ts', '.tsx'], // 等效于 --ext
154
+ reportUnusedDisableDirectives: 'error', // 等效于 --report-unused-disable-directives
155
+ });
152
156
  const files = glob.sync('**/*.{js,jsx,ts,tsx}', { cwd: eslintTarget, absolute: true });
153
157
  if (files.length === 0) {
154
158
  console.log('- 没有需要检查的文件');