Upgrade npm deps and fix new eslint errors

This commit is contained in:
Phill Sparks 2020-08-17 17:51:02 +01:00
parent 4144d7e7c8
commit 6a8272c7ee
No known key found for this signature in database
GPG Key ID: DA53DF9BB8928B10
5 changed files with 1014 additions and 1861 deletions

View File

@ -1,58 +1,75 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/es6"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.eslint.json"
},
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "error",
"camelcase": "off",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-object-literal-type-assertion": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-interface": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
"plugins": [
"jest",
"@typescript-eslint"
],
"extends": [
"plugin:github/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/func-call-spacing": [
"error",
"never"
],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": [
"error",
"never"
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}

3
dist/index.js vendored
View File

@ -1994,7 +1994,8 @@ const reportFailure = (reported) => {
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
yield runElmFormat().then(issueErrors).then(reportFailure);
const report = yield runElmFormat();
reportFailure(issueErrors(report));
}
catch (error) {
core.setFailed(error.message);

View File

@ -27,26 +27,26 @@
"author": "Phill Sparks <me@phills.me.uk> (https://github.com/sparksp)",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.0",
"@actions/exec": "^1.0.3",
"@actions/core": "^1.2.4",
"@actions/exec": "^1.0.4",
"@actions/glob": "^0.1.0"
},
"devDependencies": {
"@types/jest": "^25.2.1",
"@types/node": "^13.13.1",
"@typescript-eslint/parser": "^2.29.0",
"@zeit/ncc": "^0.22.1",
"@types/jest": "^26.0.10",
"@types/node": "^14.6.0",
"@typescript-eslint/parser": "^3.9.0",
"@zeit/ncc": "^0.22.3",
"elm-format": "^0.8.3",
"eslint": "^6.8.0",
"eslint-plugin-github": "^2.0.0",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prettier": "^3.1.3",
"jest": "^25.4.0",
"jest-circus": "^25.4.0",
"js-yaml": "^3.13.1",
"eslint": "^7.7.0",
"eslint-plugin-github": "^4.1.1",
"eslint-plugin-jest": "^23.20.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.4.0",
"jest-circus": "^26.4.0",
"js-yaml": "^3.14.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.4",
"ts-jest": "^25.4.0",
"typescript": "^3.8.3"
"prettier": "^2.0.5",
"ts-jest": "^26.2.0",
"typescript": "^3.9.7"
}
}

View File

@ -81,7 +81,8 @@ const reportFailure = (reported: number): void => {
async function run(): Promise<void> {
try {
await runElmFormat().then(issueErrors).then(reportFailure)
const report = await runElmFormat()
reportFailure(issueErrors(report))
} catch (error) {
core.setFailed(error.message)
}

2706
yarn.lock

File diff suppressed because it is too large Load Diff