Description
Greetings
I've been trying to make the plugin work with Refined GitHub's .tsx files without success.
First of all, according to this repo, in here it says:
xo
will only lint*.js
files for standard, vanilla config without further plugins.
and
Using non-JS syntax
Typical plugins for ESLint, for example, for TypeScript or Vue, should just work automatically if they're installed locally in your project (defined in the same package.json).
Also, according to the xo repo, in there it says:
TypeScript
XO will automatically lint TypeScript files (
.ts
,.d.ts
and.tsx
)
with the rules defined in eslint-config-xo-typescript#use-with-xo.XO will handle the @typescript-eslint/parser
project
option automatically
even if you don't have atsconfig.json
in your project.
Here is what I have tried:
-
Regarding Refined GitHub I did:
git clone https://github.com/sindresorhus/refined-github cd refined-github npm install
NOTE:
xo
is contained in Refined GitHub package.json'sdevDependencies
, and so it's installed locally in thenpm install
step (i.e. besides my global installation of xo) -
Then I installed locally the TypeScript ESLint Parser via
npm i --save-dev typescript @typescript-eslint/parser
-
finally I added the following to the
.xo-config.json
(located inside therefined-github
folder) :
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
Unfortunately, no errors are highlighted in any tsx file - I only get No lint results
in SublimeLinter' output, e.g.:
My configuration:
- Sublime Text 3.2.2 build 3211 x64 on Windows 10
- SublimeLinter 4.16.2
- SublimeLinter-contrib-xo 3.2.2
- (SublimeLinter-eslint remains disabled)
- Node 15.4.0 x64
- xo 0.38.2 (installed globally)
- TypeScript 4.2.4 (installed globally)
Thank you
Activity