feat: add xima

This commit is contained in:
wuji.xwt 2020-09-07 17:01:00 +08:00
parent f07bc252cc
commit ff1e17a0d7
9 changed files with 66 additions and 3 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
quote_type = single
[*.md]
trim_trailing_whitespace = false

9
.eslintignore Normal file
View File

@ -0,0 +1,9 @@
# 忽略目录
node_modules/
build/
dist/
# 忽略文件
**/*.min.js
**/*-min.js
**/*.bundle.js

3
.eslintrc.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
extends: 'eslint-config-ali/typescript/react',
};

7
.prettierrc.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
printWidth: 100,
tabWidth: 2,
semi: true,
singleQuote: true,
trailingComma: 'all',
};

9
.stylelintignore Normal file
View File

@ -0,0 +1,9 @@
# 忽略目录
node_modules/
build/
dist/
# 忽略文件
**/*.min.css
**/*-min.css
**/*.bundle.css

3
.stylelintrc.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
extends: 'stylelint-config-ali',
};

3
commitlint.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
extends: ['ali'],
};

View File

@ -17,14 +17,17 @@
"start": "./scripts/start.sh",
"start:server": "./scripts/start-server.sh",
"test": "lerna run test --stream",
"test:snapshot": "lerna run test:snapshot"
"test:snapshot": "lerna run test:snapshot",
"xima-scan": "xima scan",
"xima-fix": "xima fix"
},
"devDependencies": {
"ava": "^1.0.1",
"lerna": "^2.11.0",
"ts-node": "^7.0.1",
"tslib": "^1.9.3",
"typescript": "^3.2.2"
"typescript": "^3.2.2",
"xima": "^0.2.15"
},
"engines": {
"node": ">=10.0.0"
@ -32,5 +35,15 @@
"tnpm": {
"mode": "yarn",
"lockfile": "enable"
},
"husky": {
"hooks": {
"commit-msg": "xima exec commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "xima exec lint-staged"
}
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": "xima exec eslint",
"**/*.{css,scss,less}": "xima exec stylelint"
}
}
}

3
xima.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
eslintType: 'typescript/react',
};