redhat-developer / yaml-language-server

Language Server for YAML Files
MIT License
1.09k stars 264 forks source link

Include eslint checks in build cycle #278

Closed evidolob closed 4 years ago

evidolob commented 4 years ago

Now we have

✖ 84 problems (21 errors, 63 warnings)
  21 errors and 0 warnings potentially fixable with the `--fix` option.

eslint errors/warnings.

Need to fail build if PR doesn't not follow codestyle.

JPinkney commented 4 years ago

Yeah, we recently switched from tslint to eslint thats why theres so many. I agree, we should add this in. I'm currently re-doing the tests to massively improve them so I can fix up any eslint errors in that folder

evidolob commented 4 years ago

@JPinkney Is any reason to use custom rules for eslint? We can consider to use @typescript-eslint/eslint-recommended and @typescript-eslint/recommended with some modifications. They are pretty good and commonly used for TS projects.

JPinkney commented 4 years ago

I'm fine with using @typescript-eslint/recommended if other projects are using it too

evidolob commented 4 years ago

Yes, that recommended by typescript-eslint.

evidolob commented 4 years ago

@JPinkney Another question is two or four space indentation? It is more common for JS/TS projects to use two, but most people from Java/C# world prefers four. A few links:

WDYT?

JPinkney commented 4 years ago

I think we should probably go with what the JS/TS community uses, so probably 2