Skip to content

Commit

Permalink
feat: 文件夹黑名单添加dist build;npx过滤添加.开头的basename
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxudong13804 committed Feb 2, 2024
1 parent c3da9bf commit c06cb3f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm
- run: npm ci
- run: npm publish --provenance --access public
- run: npm publish --provenance --access public --tag 2.0.4-beta.1
env:
NODE_AUTH_TOKEN: ${{secrets.AFUTEAM_LINT_PUBLISH_NPM_TOKEN}}
2 changes: 1 addition & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function handleValidPathExtName(supportFileExtNames, targetPath) {
function curPathIsBlackDirectory(targetPath) {
const basename = path.basename(targetPath);

let isBlackFile = BlackFilesList.includes(basename)
let isBlackFile = BlackFilesList.includes(basename) || basename.startsWith('.')
return isBlackFile
}

Expand Down
2 changes: 2 additions & 0 deletions lib/execConfigs/BlackFilesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const BlackFilesList = [
'e2e',
'locales',
'mock',
'build',
'dist',


// 默认一些
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@afuteam/eslint-plugin-fe",
"version": "2.0.4",
"version": "2.0.4-beta.1",
"description": "AfuTeam ESLint Plugin",
"main": "./lib/index.js",
"exports": {
Expand Down

0 comments on commit c06cb3f

Please sign in to comment.