Sam Hulick
08/30/2021, 7:06 PM.eslintrc.json
thdxr
08/30/2021, 7:07 PMthdxr
08/30/2021, 7:07 PMSam Hulick
08/30/2021, 7:08 PM.eslintrc.json
per yarn workspace?thdxr
08/30/2021, 7:08 PMthdxr
08/30/2021, 7:08 PMSam Hulick
08/30/2021, 7:08 PMAdrián Mouly
08/30/2021, 7:08 PMAdrián Mouly
08/30/2021, 7:09 PMthdxr
08/30/2021, 7:09 PMAdrián Mouly
08/30/2021, 7:09 PMSam Hulick
08/30/2021, 7:09 PM.eslintrc.json
. if I could choose, I’d rather SST do nothing with ESLint, and I can just set it up myself manuallyAdrián Mouly
08/30/2021, 7:10 PMsst
json file.Sam Hulick
08/30/2021, 7:10 PM"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
Sam Hulick
08/30/2021, 7:11 PMAdrián Mouly
08/30/2021, 7:12 PMSam Hulick
08/30/2021, 7:20 PMyarn start
, it’s using my eslint config just fine. I did a test:
14:16 warning Expected '===' and instead saw '==' eqeqeq
Sam Hulick
08/30/2021, 7:20 PMthdxr
08/30/2021, 7:21 PMSam Hulick
08/30/2021, 7:22 PMSam Hulick
08/30/2021, 7:23 PMSam Hulick
08/30/2021, 7:23 PMSam Hulick
08/30/2021, 7:23 PM.eslintrc.js
and that doesn’t workAdrián Mouly
08/30/2021, 7:25 PMSam Hulick
08/30/2021, 7:27 PMAdrián Mouly
08/30/2021, 7:29 PMSam Hulick
08/30/2021, 7:30 PMSam Hulick
08/30/2021, 7:35 PM"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"eslint": "^7.32.0",
it’s everything VS Code would need, based on the eslintrcSam Hulick
08/30/2021, 7:41 PMSam Hulick
08/30/2021, 7:41 PMAdrián Mouly
08/30/2021, 7:42 PMSam Hulick
08/30/2021, 9:00 PMeslint
, @typescript-eslint/eslint-plugin@latest
and @typescript-eslint/parser@latest
to the project, linting in VS Code works greatAdrián Mouly
08/30/2021, 9:00 PMSam Hulick
08/30/2021, 9:57 PMAdrián Mouly
08/30/2021, 9:59 PMAdrián Mouly
08/30/2021, 9:59 PMAdrián Mouly
08/30/2021, 9:59 PMSam Hulick
08/30/2021, 10:04 PMSam Hulick
08/30/2021, 10:06 PMyarn add -D eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser
and make sure your root level .eslintrc.json
includes those properly:
"root": true,
"env": { "node": true },
"parserOptions": { "ecmaVersion": 2020 },
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
Sam Hulick
08/30/2021, 10:06 PMAdrián Mouly
08/30/2021, 10:06 PMSam Hulick
08/30/2021, 10:07 PM