← Back to Discord Forum


contrived_exampleposted in #help-playwright
Open in Discord

I just watched a what's new in PW on you tube (https://www.youtube.com/watch?v=mn892dV81_8) that mentions using eslint to catch missing awaits. I installed eslint and added the rule "@typescript-eslint/no-floating-promises": "error" but it doesn't do anything. I see many different ways to apply this rule on the interwebs but no good example specific to PW and Typescript. Does someone have specific example?

This thread is trying to answer question "How can I correctly apply the '@typescript-eslint/no-floating-promises' rule in my PW and Typescript project?"

3 replies

Thanks @4m3r1984 . I already saw that information though. This is my .eslint.json file: { "env": { "browser": true, "es2021": true }, "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended-type-checked", "plugin:@typescript-eslint/no-floating-promises" ], "parser": "@typescript-eslint/parser", "parserOptions": { "project": true, "tsconfigRootDir": ".", "ecmaVersion": "latest", "sourceType": "module" }, "plugins": [ "@typescript-eslint" ], "rules": { "@typescript-eslint/no-floating-promises": "error" } }

Does someone have more complete eslint config file?.

Related Discord Threads

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.