Skip to content

Commit

Permalink
Merge pull request #1 from eyea/dev
Browse files Browse the repository at this point in the history
feat: add npmpackage release file
  • Loading branch information
sunlei33 authored Nov 6, 2023
2 parents 5998950 + 1543ce0 commit 4fa0bbe
Show file tree
Hide file tree
Showing 8 changed files with 5,724 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## OS
.DS_Store
.idea
*.log

## Local
node_modules

## Built-files
.cache
dist
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
@eyea:registry=https://npm.pkg.github.com
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# afu-eslint-rule
eslint rule 配置






### 相关参考

1. [GitHub Packages 快速入门](https://docs.github.com/zh/packages/quickstart)
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("Hello, World!");
138 changes: 138 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"name": "@afu/eslint-config-afu",
"version": "1.0.0",
"description": "AfuTeam ESLint Rules",
"main": "index.js",
"scripts": {
"start": "pnpm dev",
"dev": "run-p dev:*",
"dev:eslintrc": "nodemon",
"dev:copyfiles": "pnpm build:copyfiles && chokidar \"site/public/**/*\" -c \"pnpm build:copyfiles\"",
"dev:webpack-dev-server": "webpack serve --open",
"build": "run-s build:*",
"build:eslintrc": "ts-node scripts/build.ts",
"build:clean": "rimraf dist",
"build:copyfiles": "copyfiles -u 2 \"site/public/**/*\" dist/public",
"build:site": "webpack",
"clean": "rimraf dist node_modules && pnpm -r exec rm -rf node_modules dist",
"test": "pnpm lint && ts-node ./test/index.ts",
"lint": "run-s eslint prettier",
"eslint": "eslint --ext .js,.jsx,.ts,.tsx,.vue --ignore-pattern \"bad.*\" .",
"prettier": "prettier -l \"./**/*\"",
"prettier:fix": "prettier --write -l \"./**/*\"",
"prepare": "husky install",
"update": "pnpm up --latest",
"rulesCoverage": "ts-node ./scripts/rulesCoverage.ts"
},
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/afu-fe/afu-eslint-rule.git"
},
"keywords": [
"afu",
"AfuTeam",
"eslint",
"eslintconfig",
"javascript",
"vue",
"react",
"typescript"
],
"author": "eyea <[email protected]>",
"license": "ISC",
"bugs": {
"url": "https://github.com/afu-fe/afu-eslint-rule/issues"
},
"homepage": "https://github.com/afu-fe/afu-eslint-rule#readme",
"lint-staged": {
"package.json": "sort-package-json"
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@babel/eslint-parser": "^7.22.9",
"@babel/preset-react": "^7.22.5",
"@types/cookie": "^0.5.1",
"@types/doctrine": "^0.0.5",
"@types/eslint": "^8.44.1",
"@types/node": "^20.4.5",
"@types/prettier": "^2.7.3",
"@types/react": "^18.2.16",
"@types/react-dom": "^18.2.7",
"@types/xml-escape": "^1.1.1",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"chokidar-cli": "^3.0.0",
"cookie": "^0.5.0",
"copyfiles": "^2.4.1",
"doctrine": "^3.0.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.9.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-vue": "^9.15.1",
"html-webpack-plugin": "^5.5.3",
"husky": "^8.0.3",
"insert-tag": "^0.1.2",
"lint-staged": "^13.2.3",
"mobi-plugin-color": "^1.0.0",
"mobi.css": "^3.1.1",
"nodemon": "^3.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.0",
"querystring": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-tooltip": "4.5.1",
"rimraf": "^5.0.1",
"sort-package-json": "^2.5.1",
"ts-loader": "^9.4.4",
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"url": "^0.11.1",
"vue-eslint-parser": "^9.3.1",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"xml-escape": "^1.1.0"
},
"peerDependencies": {
"@babel/eslint-parser": "7.x",
"@babel/preset-react": "7.x",
"@typescript-eslint/eslint-plugin": ">=5.55.0",
"@typescript-eslint/parser": ">=5.0.0",
"eslint": ">=8.24.0",
"eslint-plugin-react": ">=7.31.8",
"eslint-plugin-vue": ">=9.5.1",
"typescript": "5.x",
"vue-eslint-parser": "9.x"
},
"peerDependenciesMeta": {
"@babel/eslint-parser": {
"optional": true
},
"@babel/preset-react": {
"optional": true
},
"@typescript-eslint/eslint-plugin": {
"optional": true
},
"@typescript-eslint/parser": {
"optional": true
},
"eslint-plugin-react": {
"optional": true
},
"eslint-plugin-vue": {
"optional": true
},
"typescript": {
"optional": true
},
"vue-eslint-parser": {
"optional": true
}
},
"packageManager": "[email protected]",
"publishConfig": {
"@eyea:registry": "https://npm.pkg.github.com"
}
}
Loading

0 comments on commit 4fa0bbe

Please sign in to comment.