redux-pluto icon indicating copy to clipboard operation
redux-pluto copied to clipboard

.ts, .tsxファイルに対してeslintが効いていない

Open nk-hashimoto opened this issue 6 years ago • 1 comments

事象

ルートディレクトリで npm run ilnt:js を実行すると一見lintが通っているように見えるが、
どこかの.tsまたは.tsxファイルでセミコロンを外してみてからlintを実行すると、
warningを出すはずのprettierが効いていない。

eslintのコマンドライン引数に --ext .js,.ts,.tsx を追加するとtypescriptファイルに対してもlintが効くようになるはずだが、そうすると今度は以下のエラーが出る。

Error: The prop value with an expression type of TSAsExpression could not be resolved. Please file issue to get this fixed immediately. at Object.extract [as JSXExpressionContainer] (/Users/uu119619/git/redux-pluto/node_modules/jsx-ast-utils/lib/values/expressions/index.js:179:11) at getValue (/Users/uu119619/git/redux-pluto/node_modules/jsx-ast-utils/lib/values/index.js:48:27) at extractValue (/Users/uu119619/git/redux-pluto/node_modules/jsx-ast-utils/lib/getPropValue.js:24:12) at getPropValue (/Users/uu119619/git/redux-pluto/node_modules/jsx-ast-utils/lib/getPropValue.js:41:10) at /Users/uu119619/git/redux-pluto/node_modules/eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-element-interactions.js:90:95 at Array.some (<anonymous>) at JSXOpeningElement (/Users/uu119619/git/redux-pluto/node_modules/eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-element-interactions.js:89:52) at listeners.(anonymous function).forEach.listener (/Users/uu119619/git/redux-pluto/node_modules/eslint/lib/util/safe-emitter.js:45:58) at Array.forEach (<anonymous>) at Object.emit (/Users/uu119619/git/redux-pluto/node_modules/eslint/lib/util/safe-emitter.js:45:38)

関連していそうなissue

https://github.com/evcohen/jsx-ast-utils/issues/42

nk-hashimoto avatar Jan 21 '19 01:01 nk-hashimoto

対応します

mizchi avatar Feb 01 '19 06:02 mizchi