Skip to content

Commit

Permalink
refactor: f2elint
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyunhe committed Feb 7, 2024
1 parent bd8af3f commit cd689ef
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ root = true
indent_style = space
indent_size = 2
end_of_line = lf
max_line_length = 100
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
quote_type = single

[*.md]
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.ci
.node
.DS_Store
/build
/coverage
/dist
/es
/lib
node_modules
package-lock.json
pnpm-lock.yaml
yarn.lock
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

PATH=$(pwd)/.node/bin:$(pwd)/node_modules/.bin:$PATH commitlint --edit ${1}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

PATH=$(pwd)/.node/bin:$(pwd)/node_modules/.bin:$PATH lint-staged
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.ci
.node
.DS_Store
/build
/coverage
/dist
/es
/lib
node_modules
package-lock.json
pnpm-lock.yaml
yarn.lock
*.min.js
*.min.css
8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

38 changes: 36 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,51 @@
"name": "f2e-spec",
"private": true,
"description": "阿里巴巴前端规约及配套工具",
"homepage": "https://github.com/alibaba/f2e-spec#readme",
"bugs": {
"url": "https://github.com/alibaba/f2e-spec/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/alibaba/f2e-spec.git"
},
"license": "Apache-2.0",
"scripts": {
"start": "rive start",
"build": "rive build",
"lint": "markdownlint -c .markdownlint.json README.md **/*.md"
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"prepare": "husky install",
"start": "rive start"
},
"commitlint": {
"extends": [
"ali"
]
},
"lint-staged": {
"*.{cjs,cts,js,jsx,mjs,mts,ts,tsx,vue}": "eslint"
},
"prettier": "prettier-config-ali",
"eslintConfig": {
"extends": [
"ali/typescript/node",
"plugin:prettier/recommended"
]
},
"devDependencies": {
"@commitlint/cli": "^18.6.0",
"@mdx-js/react": "^3.0.0",
"@types/node": "^20.11.16",
"commitlint-config-ali": "^1.0.0",
"eslint": "^8.56.0",
"eslint-config-ali": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^8.0.3",
"lint-staged": "^15.2.2",
"markdownlint": "~0.33.0",
"prettier": "^3.2.5",
"prettier-config-ali": "^1.1.0",
"react": "^18.2.0",
"react-doc-ui": "^2.2.1",
"react-dom": "^18.2.0",
Expand Down

0 comments on commit cd689ef

Please sign in to comment.