Skip to content

Commit

Permalink
chore: minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
CCharlieLi committed Feb 21, 2021
1 parent 2ad0ed6 commit d03c423
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 143 deletions.
82 changes: 40 additions & 42 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module',
sourceType: 'module'
},
plugins: ['@typescript-eslint/eslint-plugin', 'simple-import-sort'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
extends: ['plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint', 'plugin:prettier/recommended'],
ignorePatterns: ['node_modules/**', 'dist/**'],
root: true,
env: {
node: true,
jest: true,
jest: true
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
Expand All @@ -24,38 +20,40 @@ module.exports = {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'quote-props': ['error', 'as-needed', { keywords: false }],
curly: ['error', 'multi-line'],
'max-classes-per-file': 'off',
'comma-dangle': ['error', 'never'],
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
'arrow-parens': ['error', 'as-needed'],
semi: ['error', 'never'],
'@typescript-eslint/semi': ['error', 'never'],
'object-shorthand': ['error', 'always'],
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-explicit-any': 'off',
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false,
"argsIgnorePattern": "^_"
}]
},
};
'@typescript-eslint/no-empty-interface': 'off',
'quote-props': ['error', 'as-needed', { keywords: false }],
curly: ['error', 'multi-line'],
'max-classes-per-file': 'off',
'comma-dangle': ['error', 'never'],
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
'arrow-parens': ['error', 'as-needed'],
semi: ['error', 'never'],
'@typescript-eslint/semi': ['error', 'never'],
'object-shorthand': ['error', 'always'],
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
argsIgnorePattern: '^_'
}
]
}
}
200 changes: 99 additions & 101 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,105 +1,103 @@
{
"name": "alicloud-apsara",
"version": "0.0.1",
"description": "A library for AliCloud live-streaming platform - Apsara",
"keywords": [
"AliCloud",
"Aliyun",
"Live",
"Streaming",
"Apsara",
"Video"
],
"engines": {
"name": "alicloud-apsara",
"version": "0.0.1",
"description": "A library for AliCloud live-streaming platform - Apsara",
"keywords": [
"AliCloud",
"Aliyun",
"Live",
"Streaming",
"Apsara",
"Video"
],
"engines": {
"node": ">=10"
},
"author": "Charlie Li <ccharlieli@live.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/CCharlieLi/service-template.git"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"compile": "tsc -b",
"compile:watch": "tsc -w -p .",
"clean": "rimraf dist coverage tsconfig.tsbuildinfo yarn.lock package-lock.json .nyc_output",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"prettier": "prettier --write '{src,test,resources}/**/*.{ts,json,md}'",
"test": "yarn lint:fix && jest --passWithNoTests --collect-coverage",
"prepublishOnly": "yarn test && yarn lint",
"preversion": "yarn lint"
},
"husky": {
"hooks": {
"post-commit": "git update-index --again",
"pre-commit": "lint-staged",
"pre-push": "yarn compile && yarn test",
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"./src/**/*.ts": [
"yarn prettier",
"yarn lint"
]
},
"jest": {
"modulePathIgnorePatterns": [
"./dist"
]
},
"dependencies": {
"axios": "^0.21.1",
"crypto": "^1.0.1",
"http-errors": "^1.8.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-angular": "^11.0.0",
"@types/accept-language-parser": "1.5.1",
"@types/bluebird": "3.5.33",
"@types/body-parser": "1.19.0",
"@types/compression": "1.0.1",
"@types/cors": "2.8.6",
"@types/express": "4.17.3",
"@types/fs-extra": "8.0.1",
"@types/helmet": "0.0.45",
"@types/http-errors": "^1.8.0",
"@types/intl": "1.2.0",
"@types/ioredis": "4.16.4",
"@types/jest": "~25.1.4",
"@types/jsonwebtoken": "8.3.8",
"@types/morgan": "1.9.0",
"@types/node": "~10.14.22",
"@types/node-fetch": "~2.5.5",
"@types/request": "2.48.5",
"@types/supertest": "~2.0.8",
"@types/utf8": "2.1.6",
"@types/uuid": "3.4.6",
"@types/vitalsigns": "0.4.3",
"@types/xml2js": "0.4.5",
"@typescript-eslint/eslint-plugin": "~2.23.0",
"@typescript-eslint/parser": "~2.23.0",
"coveralls": "^3.1.0",
"dotenv": "~8.2.0",
"eslint": "~6.8.0",
"eslint-config-prettier": "~6.10.0",
"eslint-plugin-prettier": "~3.1.2",
"eslint-plugin-simple-import-sort": "^7.0.0",
"husky": "~4.2.3",
"jest": "~25.1.0",
"lint-staged": "10.0.8",
"nock": "^13.0.7",
"nockback-harder": "~4.0.1",
"prettier": "^2.2.1",
"supertest": "~4.0.2",
"ts-jest": "~25.2.1",
"ts-mockery": "^1.2.0",
"ts-node": "8.5.0",
"typescript": "3.8.3"
}
"author": "Charlie Li <ccharlieli@live.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/CCharlieLi/service-template.git"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"compile": "tsc -b",
"compile:watch": "tsc -w -p .",
"clean": "rimraf dist coverage tsconfig.tsbuildinfo yarn.lock package-lock.json .nyc_output",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"prettier": "prettier --write '{src,test,resources}/**/*.{ts,json,md}'",
"test": "yarn lint:fix && jest --passWithNoTests --collect-coverage",
"prepublishOnly": "yarn test && yarn lint",
"preversion": "yarn lint"
},
"husky": {
"hooks": {
"post-commit": "git update-index --again",
"pre-commit": "lint-staged",
"pre-push": "yarn compile && yarn test",
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"*.{ts,js,jsx}": [
"yarn prettier",
"yarn lint"
],
"*.{json,md}": [
"yarn prettier"
]
},
"dependencies": {
"axios": "^0.21.1",
"crypto": "^1.0.1",
"http-errors": "^1.8.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-angular": "^11.0.0",
"@types/accept-language-parser": "1.5.1",
"@types/bluebird": "3.5.33",
"@types/body-parser": "1.19.0",
"@types/compression": "1.0.1",
"@types/cors": "2.8.6",
"@types/express": "4.17.3",
"@types/fs-extra": "8.0.1",
"@types/helmet": "0.0.45",
"@types/http-errors": "^1.8.0",
"@types/intl": "1.2.0",
"@types/ioredis": "4.16.4",
"@types/jest": "~25.1.4",
"@types/jsonwebtoken": "8.3.8",
"@types/morgan": "1.9.0",
"@types/node": "~10.14.22",
"@types/node-fetch": "~2.5.5",
"@types/request": "2.48.5",
"@types/supertest": "~2.0.8",
"@types/utf8": "2.1.6",
"@types/uuid": "3.4.6",
"@types/vitalsigns": "0.4.3",
"@types/xml2js": "0.4.5",
"@typescript-eslint/eslint-plugin": "~2.23.0",
"@typescript-eslint/parser": "~2.23.0",
"coveralls": "^3.1.0",
"dotenv": "~8.2.0",
"eslint": "~6.8.0",
"eslint-config-prettier": "~6.10.0",
"eslint-plugin-prettier": "~3.1.2",
"eslint-plugin-simple-import-sort": "^7.0.0",
"husky": "~4.2.3",
"jest": "~25.1.0",
"lint-staged": "10.0.8",
"nock": "^13.0.7",
"nockback-harder": "~4.0.1",
"prettier": "^2.2.1",
"supertest": "~4.0.2",
"ts-jest": "~25.2.1",
"ts-mockery": "^1.2.0",
"ts-node": "8.5.0",
"typescript": "3.8.3"
}
}

0 comments on commit d03c423

Please sign in to comment.