Skip to content

Commit

Permalink
feat: add ESLint plugin for Playwright (#498)
Browse files Browse the repository at this point in the history
* feat: add ESLint plugin for Playwright

BREAKING CHANGE: Add `testing-library` to default frameworks.
  • Loading branch information
connor-baer authored May 3, 2022
1 parent 99b0a80 commit 5c6a74c
Show file tree
Hide file tree
Showing 7 changed files with 950 additions and 164 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ Check code for syntax errors and format it automatically. The preset adds the fo

The preset includes the following tools:

#### Eslint
#### ESLint

[ESLint](https://www.npmjs.com/package/eslint) identifies and fixes problematic patterns in your JavaScript code so you can spot mistakes early.

Eslint's configuration options:
ESLint's configuration options:

| Name | Type | Options | Default |
| ------------ | ------- | -------------------------------------------------------- | ------------ |
| language | string | 'TypeScript', 'JavaScript' | 'TypeScript' |
| environments | array | 'Browser', 'Node' | [] |
| frameworks | array | 'React', 'Emotion', 'Jest', 'Cypress', 'Testing Library' | [] |
| openSource | boolean | true, false | false |
| Name | Type | Options | Default |
| ------------ | ------- | ---------------------------------------------------------------------- | ------------ |
| language | string | 'TypeScript', 'JavaScript' | 'TypeScript' |
| environments | array | 'Browser', 'Node' | [] |
| frameworks | array | 'React', 'Emotion', 'Jest', 'Testing Library', 'Cypress', 'Playwright' | [] |
| openSource | boolean | true, false | false |

#### Prettier

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"eslint-plugin-jsx-a11y": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-playwright": "^0.8.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.0.0",
Expand Down
7 changes: 6 additions & 1 deletion src/cli/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ export const DEFAULT_OPTIONS: Options = {
configDir: '.',
language: Language.TYPESCRIPT,
environments: [Environment.BROWSER],
frameworks: [Framework.REACT, Framework.EMOTION, Framework.EMOTION],
frameworks: [
Framework.REACT,
Framework.EMOTION,
Framework.JEST,
Framework.TESTING_LIBRARY,
],
ci: CI.GITHUB_ACTIONS,
openSource: false,
publish: false,
Expand Down
Loading

0 comments on commit 5c6a74c

Please sign in to comment.