Skip to content

Commit

Permalink
feat: init project
Browse files Browse the repository at this point in the history
  • Loading branch information
ximing committed Mar 18, 2019
0 parents commit 9d6616a
Show file tree
Hide file tree
Showing 50 changed files with 21,608 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/**/*.js
*.json
dist/**/*.js
typing/**/*.d.ts
typings
89 changes: 89 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"extends": ["airbnb", "prettier"],
"parser": "babel-eslint",
"plugins": ["jest"],
"env": {
"jest/globals": true
},
"globals": {
"Taro": true,
"Page": true,
"Component": true,
"App": true,
"wx": true,
"getApp": true,
"getCurrentPages": true,
"Behavior": true,
"jest": true,
"R": true
},
"settings": {
"react": {
"pragma": "Taro",
"version": "15.0"
}
},
"rules": {
"max-lines": ["error", { "max": 500, "skipComments": true, "skipBlankLines": true }],
"import/no-extraneous-dependencies": "off",
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
"react/react-in-jsx-scope":"off",
"react/jsx-filename-extension": "off",
"react/jsx-no-undef": "off",
"react/jsx-indent": "off",
"react/no-access-state-in-setstate":"off",
"no-shadow": "off",
"calemcase": "off",
"class-methods-use-this": "off",
"react/destructuring-assignment":"off",
"consistent-return": "off",
"array-callback-return": "off",
"import/named": "off",
"import/prefer-default-export": 1,
"one-var": "off",
"no-underscore-dangle": "off",
"no-plusplus": "off",
"camelcase": 1,
"no-console": "off",
"no-empty": 1,
"no-unused-expressions": 1,
"no-multi-assign": "off",
"import/first": 1,
"prefer-promise-reject-errors": 1,
"import/extensions": "off",
"prefer-const": 1,
"no-restricted-properties": [
2,
{
"object": "Proxy"
},
{
"object": "Array",
"property": "includes",
"message": "请使用indexOf代替"
},
{
"object": "String",
"property": "normalize"
},
{
"object": "Object",
"property": "values",
"message": "请使用Object.keys().map()代替"
}
],
"no-unused-vars": "off",
"global-require": "off",
"no-bitwise": "off",
"import/no-dynamic-require": "off",
"no-restricted-syntax": 1,
"no-param-reassign": 1,
"no-nested-ternary": 1,
"no-useless-escape": "off",
"no-control-regex": "off"
}
}
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
node_modules
**/.DS_Store
.idea/*
dist/**/*
dest
.vscode/
npm-debug.log
report-results.html
.nyc_output
.lslogrc
*.log
mmp-dist
mmp-app
.changeMockrc
test.js
dist-cdn
**/*/r.js
!src/utils/r.js
.mtweapp_cache/
typings/wx/r.d.ts
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
registry=https://registry.npmjs.org/
disturl=https://npm.taobao.org/dist
SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
electron_mirror=https://npm.taobao.org/mirrors/electron/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
Empty file added .prettierignore
Empty file.
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 100,
"tabWidth": 4,
"singleQuote": true,
"semi": true,
"arrowParens": "always",
"bracketSpacing": true
}
Empty file added bin/mpb.js
Empty file.
17 changes: 17 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Created by ximing on 2018/7/11.
*/
'use strict';
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'revert']
],
'scope-empty': [1, 'always'],
'subject-full-stop': [0, 'never'],
'subject-case': [0, 'never']
}
};
Loading

0 comments on commit 9d6616a

Please sign in to comment.