Closed Kikobeats closed 2 years ago
Getting the same issue in https://github.com/microlinkhq/keyv/runs/4864500237?check_suite_focus=true But this issue is not reproduced in my machine ( I am using pnpm if that matters, npm in CI ) ts-standard works as intended in my machine with pnpm
Error from CI:
Run npm test
> @keyvhq/monorepo@ pretest /home/runner/work/keyv/keyv
> npm run lint
> @keyvhq/monorepo@ lint /home/runner/work/keyv/keyv
> ts-standard
ts-standard: Unexpected linter output:
--config » eslint-config-standard-with-typescript#overrides[0]:
Configuration for rule "@typescript-eslint/indent" is invalid:
Value {"SwitchCase":1,"VariableDeclarator":1,"outerIIFEBody":1,"MemberExpression":1,"FunctionDeclaration":{"parameters":1,"body":1},"FunctionExpression":{"parameters":1,"body":1},"CallExpression":{"arguments":1},"ArrayExpression":1,"ObjectExpression":1,"ImportDeclaration":1,"flatTernaryExpressions":false,"ignoreComments":false,"ignoredNodes":["TemplateLiteral *","JSXElement","JSXElement > *","JSXAttribute","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXSpreadAttribute","JSXExpressionContainer","JSXOpeningElement","JSXClosingElement","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXText","JSXEmptyExpression","JSXSpreadChild"],"offsetTernaryExpressions":true} should NOT have additional properties.
: Error: --config » eslint-config-standard-with-typescript#overrides[0]:
Configuration for rule "@typescript-eslint/indent" is invalid:
Value {"SwitchCase":1,"VariableDeclarator":1,"outerIIFEBody":1,"MemberExpression":1,"FunctionDeclaration":{"parameters":1,"body":1},"FunctionExpression":{"parameters":1,"body":1},"CallExpression":{"arguments":1},"ArrayExpression":1,"ObjectExpression":1,"ImportDeclaration":1,"flatTernaryExpressions":false,"ignoreComments":false,"ignoredNodes":["TemplateLiteral *","JSXElement","JSXElement > *","JSXAttribute","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXSpreadAttribute","JSXExpressionContainer","JSXOpeningElement","JSXClosingElement","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXText","JSXEmptyExpression","JSXSpreadChild"],"offsetTernaryExpressions":true} should NOT have additional properties.
at ConfigValidator.validateRuleOptions (/home/runner/work/keyv/keyv/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:144:23)
at /home/runner/work/keyv/keyv/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:199:18
at Array.forEach (<anonymous>)
at ConfigValidator.validateRules (/home/runner/work/keyv/keyv/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:196:34)
at ConfigValidator.validateConfigArray (/home/runner/work/keyv/keyv/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:322:18)
at CascadingConfigArrayFactory._finalizeConfigArray (/home/runner/work/keyv/keyv/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:493:23)
at CascadingConfigArrayFactory.getConfigArrayForFile (/home/runner/work/keyv/keyv/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:299:21)
at FileEnumerator._iterateFilesRecursive (/home/runner/work/keyv/keyv/node_modules/ts-standard/node_modules/eslint/lib/cli-engine/file-enumerator.js:445:49)
at _iterateFilesRecursive.next (<anonymous>)
at FileEnumerator.iterateFiles (/home/runner/work/keyv/keyv/node_modules/ts-standard/node_modules/eslint/lib/cli-engine/file-enumerator.js:296:49)
If you think this is a bug in `ts-standard`, open an issue: https://github.com/standard/ts-standard/issues
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @keyvhq/monorepo@ lint: `ts-standard`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @keyvhq/monorepo@ lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2022-01-19T07_52_42_416Z-debug.log
npm ERR! Test failed. See above for more details.
In my machine:
> @keyvhq/monorepo@ lint keyv
> ts-standard
ts-standard: Typescript Standard Style! (https://github.com/standard/ts-standard)
ts-standard: Run `ts-standard --fix` to automatically fix some problems.
/keyv/packages/core/src/index.js:69:1: Expected indentation of 8 spaces but found 10. (indent)
/keyv/packages/core/src/index.js:70:1: Expected indentation of 8 spaces but found 10. (indent)
/keyv/packages/core/src/index.js:71:1: Expected indentation of 8 spaces but found 10. (indent)
/keyv/packages/sql/src/index.js:73:1: Expected indentation of 10 spaces but found 12. (indent)
/keyv/packages/sql/src/index.js:74:1: Expected indentation of 10 spaces but found 12. (indent)
/keyv/packages/sql/src/index.js:75:1: Expected indentation of 10 spaces but found 12. (indent)
Hello,
I just installed ts-standard and try to run it. The first thing the CLI told me is
and that's right. So I add a little
tsconfig.json
configuration, like:Now, I try to run the command again, and a weird error is reported:
I understand ts-standard mess with some rules merging, but not sure why. I tried other
tsconfig.json
settings but all the time I get this error.Environment