anyone made the switch f…

less than 1 minute read

anyone made the switch from tslint to eslint for all their angular projects?


We had been on ESLint, so when I recently moved us to an NX setup I kept us on ESLint. Hasn’t been the most smooth transition since NX doesn’t really allow you to not install TSLint etc.

But basically we added ESLint + our config and any rule plugins needed, then switched the lint architect for each project to something like this:

"lint": { "builder": "@nrwl/workspace:run-commands", "options": { "commands": [ { "command": "yarn run lint:ts 'apps/app-one/**/*.{js,ts}'" } ] } } We reference a yarn command vs using ESLint directly so that we can update our lint command in the future without it causing all projects to be marked as changed.

Currently that yarn command is

"lint:ts": "node --max_old_space_size=8192 node_modules/eslint/bin/eslint.js", We didn’t need that max space adjustment before NX, so I’m currently hoping we can remove that once a few packages can be updated.

cool! I may just wait until the Angular team comes out with a schematic that makes the migration a bit less painful, but it’s good to know I can at least step around it