Add linting & edit scripts
This commit is contained in:
63
.eslintrc
Normal file
63
.eslintrc
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"browser": true,
|
||||||
|
"amd": true,
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"root": true,
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 6,
|
||||||
|
"sourceType": "module",
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"jsx": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-cond-assign": [
|
||||||
|
2,
|
||||||
|
"except-parens"
|
||||||
|
],
|
||||||
|
"no-use-before-define": [
|
||||||
|
2,
|
||||||
|
{
|
||||||
|
"functions": false,
|
||||||
|
"classes": false,
|
||||||
|
"variables": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"new-cap": 0,
|
||||||
|
"no-caller": 2,
|
||||||
|
"no-undef": 2,
|
||||||
|
"no-unused-vars": 1,
|
||||||
|
"no-empty": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"allowEmptyCatch": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"no-console": "off",
|
||||||
|
"prefer-const": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"destructuring": "all"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quotes": [
|
||||||
|
"warn",
|
||||||
|
"single"
|
||||||
|
],
|
||||||
|
"semi": [
|
||||||
|
"warn",
|
||||||
|
"never"
|
||||||
|
],
|
||||||
|
"spaced-comment": "warn"
|
||||||
|
}
|
||||||
|
}
|
||||||
1025
package-lock.json
generated
1025
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,10 @@
|
|||||||
"description": "Add & commit files from a path directly from GitHub Actions",
|
"description": "Add & commit files from a path directly from GitHub Actions",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run compile && npm run compress && rm build/*.js && cp src/*.sh lib",
|
"build": "npm run compile && npm run minify && rm build/*.js",
|
||||||
"compile": "tsc",
|
"compile": "tsc",
|
||||||
"compress": "node-minify --compressor babel-minify --input build/*.js --output lib/main.js",
|
"minify": "minify build -d lib",
|
||||||
|
"dist": "echo \"Preparing for distribution...\" && npm i && npm run build && git add -f node_modules && git add lib && git commit -m \"Commit dist files\"",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -35,6 +36,9 @@
|
|||||||
"@node-minify/cli": "^4.1.2",
|
"@node-minify/cli": "^4.1.2",
|
||||||
"@types/node": "^12.7.12",
|
"@types/node": "^12.7.12",
|
||||||
"@types/shelljs": "^0.8.6",
|
"@types/shelljs": "^0.8.6",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^2.12.0",
|
||||||
|
"@typescript-eslint/parser": "^2.12.0",
|
||||||
|
"eslint": "^6.8.0",
|
||||||
"typescript": "^3.6.4"
|
"typescript": "^3.6.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user