Errors while linting TypeScript
See original GitHub issueI’ve installed prettier-standard
to my monorepo project. When I run prettier-standard --lint
on the root, I get the following errors:
7 | export interface EnvVars {
8 | HOST_SSL?: string
> 9 | HOST_DOMAIN?: string
| ^
10 | SERVER_PORT?: string
11 | WEB_CLIENTS?: string
12 | CORS_WHITELIST?: string
error Parsing error: Unexpected token, expected "]"
10 | export const getRequired = (config: RequiredConfig = {}) => {
11 | return Object.keys(config).reduce((required, key) => {
> 12 | return config[key as keyof EnvVars] ? required.concat(key) : required
| ^
13 | }, [] as string[])
14 | }
error 'Record' is not defined no-undef
error Parsing error: Unexpected token, expected ";"
15 | * Console methods.
16 | */
> 17 | export type ConsoleMethod = keyof Omit<Console, 'Console'>
error Parsing error: Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.
3 |
4 | @Resolver()
> 5 | export class CommonResolver {
Am I missing something?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:12 (2 by maintainers)
Top Results From Across the Web
ESLint not reporting TypeScript compiler type checking errors
Unfortunately ESLint only reports errors from it's own linters, it does not report typescript compilation failures.
Read more >Common React TypeScript ESLint / Lint Errors & Warning ...
In this article, I cover common lint error messages I found in my projects and how I fixed them. Yes, Google and StackOverflow...
Read more >Linting with Type Information | typescript-eslint
With that done, run the same lint command you ran before. You may see new rules reporting errors based on type information!
Read more >ESLint can't detect error from typescript · Issue #352 - GitHub
It's by design I believe. ESLint is not in business of type checking your code. You should rely on TypeScript for checking for...
Read more >Linting TypeScript | WebStorm Documentation - JetBrains
WebStorm highlights errors reported by ESLint in .ts and .tsx files when @typescript-eslint/parser is set as a parser in your project ESLint ...
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
I’m having the same issues as the OP. There’s actually a couple of different scenarios:
Combinations of:
or
Results in eslint parsing errors.
Rolling back to 16.3.0 resolves my issue.
@HoraceShmorace this library doesn’t seem to be maintained anymore