@boehringer-ingelheim/eslint-config
Version:
Shared eslint configuration used at Boehringer Ingelheim for code styling
29 lines • 1.56 kB
JavaScript
import playwright from 'eslint-plugin-playwright';
import { defineConfig } from 'eslint/config';
const playwrightPlugin = playwright;
export default defineConfig({
...playwrightPlugin.configs['flat/recommended'],
rules: {
/**
* At the moment, `eslint-plugin-playwright` does not fully support component testing with type information.
* https://github.com/playwright-community/eslint-plugin-playwright/issues/298
*
* The `mount` function is flagged as an error by the `@typescript-eslint/unbound-method` rule.
* But it is okay to use `mount` in this context for test files.
* https://typescript-eslint.io/rules/unbound-method/#when-not-to-use-it
*
* Hint: `eslint-plugin-jest` has already a customized version of this rule.
* https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md
*/
'@typescript-eslint/unbound-method': 'off',
// eslint-plugin-playwright: https://github.com/playwright-community/eslint-plugin-playwright
...playwrightPlugin.configs['flat/recommended'].rules,
'playwright/prefer-to-be': 'error',
'playwright/prefer-to-have-length': 'error',
'playwright/require-top-level-describe': 'error',
// eslint-plugin-sonarjs: https://github.com/SonarSource/SonarJS/blob/master/packages/analysis/src/jsts/rules/README.md
'sonarjs/no-duplicate-string': 'off',
'sonarjs/slow-regex': 'off',
},
});
//# sourceMappingURL=playwright.js.map