mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Add eslint and prettier support
This commit is contained in:
parent
95d413a2ce
commit
89f37d738b
20 changed files with 1971 additions and 170 deletions
38
package.json
38
package.json
|
|
@ -10,19 +10,35 @@
|
|||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "node ./dist/test",
|
||||
"tsc": "npx tsc",
|
||||
"cdn:bundle:.js": "simplifyify dist/index.js -s #{REPO_NAME_NO_DASHES}# -o dist/bundle.js --debug --bundle",
|
||||
"cdn:bundle:.js": "simplifyify dist/index.js -s #{REPO_NAME}# -o dist/bundle.js --debug --bundle",
|
||||
"cdn:bundle:.min.js": "terser dist/bundle.js -cmo dist/bundle.min.js",
|
||||
"cdn:bundle": "npm run cdn:bundle:.js && npm run cdn:bundle:.min.js",
|
||||
"cdn:esm": "tsc -p tsconfig.esm.json",
|
||||
"cdn": "npm run cdn:bundle && npm run cdn:esm",
|
||||
"build": "npm run tsc && npm run cdn",
|
||||
"enable_short_import_path": "npm run build && npx denoify_enable_short_npm_import_path",
|
||||
"clean": "rm -rf node_modules dist"
|
||||
"build": "tsc && npm run cdn",
|
||||
"enable_short_import_path": "npm run build && denoify_enable_short_npm_import_path",
|
||||
"lint:check": "eslint . --ext .ts,.tsx",
|
||||
"lint": "npm run lint:check -- --fix",
|
||||
"_format": "prettier '**/*.{ts,tsx,json,md}'",
|
||||
"format": "npm run _format -- --write",
|
||||
"format:check": "npm run _format -- --list-different",
|
||||
"clean": "rm -rf dist deno_dist node_modules mod.ts"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx}": [
|
||||
"eslint --fix"
|
||||
],
|
||||
"*.{ts,tsx,json,md}": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged -v"
|
||||
}
|
||||
},
|
||||
"author": "u/#{USER_OR_ORG}#",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#",
|
||||
"files": [
|
||||
"/dist/*.{d.ts,js,js.map}",
|
||||
"/dist/tools/",
|
||||
|
|
@ -31,12 +47,20 @@
|
|||
"/src/tools/"
|
||||
],
|
||||
"keywords": [],
|
||||
"homepage": "https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#",
|
||||
"devDependencies": {
|
||||
"typescript": "^3.9.0",
|
||||
"@types/node": "^10.0.0",
|
||||
"denoify": "0.2.15",
|
||||
"evt": "1.7.11",
|
||||
"simplifyify": "8.0.1",
|
||||
"terser": "4.6.13"
|
||||
"terser": "4.6.13",
|
||||
"husky": "^4.2.1",
|
||||
"prettier": "^1.19.1",
|
||||
"eslint": "^7.1.0",
|
||||
"@typescript-eslint/parser": "^3.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^3.0.1",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"lint-staged": "^10.2.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue