Support Typescript
See original GitHub issueCurrently the plugin crashes with typescript-eslint-parser
:
TypeError: Expected `index` to be a number.
at SourceCode.getLocFromIndex (/Users/semenov/tmp/ts-rule/node_modules/eslint/lib/util/source-code.js:436:19)
at maybeReportSorting (/Users/semenov/tmp/ts-rule/node_modules/eslint-plugin-simple-import-sort/src/sort.js:62:27)
at Program (/Users/semenov/tmp/ts-rule/node_modules/eslint-plugin-simple-import-sort/src/sort.js:20:11)
at listeners.(anonymous function).forEach.listener (/Users/semenov/tmp/ts-rule/node_modules/eslint/lib/util/safe-emitter.js:45:58)
at Array.forEach (<anonymous>)
at Object.emit (/Users/semenov/tmp/ts-rule/node_modules/eslint/lib/util/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/Users/semenov/tmp/ts-rule/node_modules/eslint/lib/util/node-event-generator.js:251:26)
at NodeEventGenerator.applySelectors (/Users/semenov/tmp/ts-rule/node_modules/eslint/lib/util/node-event-generator.js:280:22)
at NodeEventGenerator.enterNode (/Users/semenov/tmp/ts-rule/node_modules/eslint/lib/util/node-event-generator.js:294:14)
at CodePathAnalyzer.enterNode (/Users/semenov/tmp/ts-rule/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)
I created the reproduction repo: https://github.com/IlyaSemenov/eslint-plugin-simple-import-sort-typescript-repro
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top Results From Across the Web
TypeScript: JavaScript With Syntax For Types.
TypeScript extends JavaScript by adding types to the language. TypeScript speeds up your development experience by catching errors and providing fixes ...
Read more >TypeScript Programming with Visual Studio Code
VS Code comes with great debugging support for TypeScript, including support for sourcemaps. Set breakpoints, inspect objects, navigate the call stack, and ...
Read more >TypeScript | WebStorm Documentation - JetBrains
WebStorm supports developing, running, and debugging TypeScript source code. WebStorm recognizes .ts and .tsx files and provides full range ...
Read more >TypeScript support in Svelte - Learn web development
TypeScript support in Svelte · Code along with us · TypeScript: optional static typing for JavaScript · Why TypeScript? · Creating a Svelte ......
Read more >TypeScript - Cypress Documentation
ts file. // in cypress/support/index.ts // load type definitions that come with Cypress module /// <reference types ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is super awesome, I’m using it already. Thanks so much for publishing.
Released in v2.1.0. Thanks for the help!