Skip to content

Commit

Permalink
feat: modernize project (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Feb 3, 2023
1 parent 108d6f6 commit 6ca8757
Show file tree
Hide file tree
Showing 115 changed files with 34,845 additions and 25,120 deletions.
3 changes: 1 addition & 2 deletions .eslintignore
@@ -1,3 +1,2 @@
lib/
node_modules/
examples/
node_modules/
38 changes: 0 additions & 38 deletions .eslintrc.js

This file was deleted.

25 changes: 25 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,25 @@
{
"root": true,
"env": {
"es6": true,
"node": true,
"browser": true
},
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"globals": {
"jestPuppeteer": "readonly",
"page": "readonly"
},
"overrides": [
{
"files": ["*.test.?(m|t)js"],
"env": {
"jest": true
}
}
]
}
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Expand Up @@ -6,22 +6,22 @@ on:
- master

jobs:

Test:
strategy:
fail-fast: false
matrix:
node_version: [14, 16, 'lts/*', 'node']
node-version: [14, 16, 18, "latest"]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
check-latest: true
- name: Install Dependencies
run: yarn
- name: Run Tests 👩🏽‍💻
run: yarn ci
node-version: ${{ matrix.node-version }}
- name: Install last npm version
if: ${{ matrix.node-version == 14 }}
run: npm install -g npm@latest
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm run test -- --ci
- run: npm run test:incognito -- --ci
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,3 +1,3 @@
node_modules/
lib/
yarn-error.log
screenshots/
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions .swcrc
@@ -0,0 +1,7 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"target": "es2022"
},
"sourceMaps": true
}
49 changes: 4 additions & 45 deletions CONTRIBUTING.md
Expand Up @@ -26,40 +26,13 @@ _Before_ submitting a pull request, please make sure the following is done…

Note: Replace `<your_username>` with your GitHub username

2. jest-puppeteer uses [Yarn](https://code.fb.com/web/yarn-a-new-package-manager-for-javascript/) for running development scripts. If you haven't already done so, please [install yarn](https://yarnpkg.com/en/docs/install).
2. Run `npm install`.

3. Run `yarn install`. On Windows: To install [Yarn](https://yarnpkg.com/en/docs/install#windows-tab) on Windows you may need to download either node.js or Chocolatey<br />
3. If you've changed APIs, update the documentation.

```sh
yarn install
```

To check your version of Yarn and ensure it's installed you can type:

```sh
yarn --version
```

4. If you've added code that should be tested, add tests. You can use watch mode that continuously transforms changed files to make your life easier.

```sh
# in the background
yarn run dev
```

5. If you've changed APIs, update the documentation.

6. Ensure the linting is good via `yarn lint`.

```sh-session
$ yarn lint
```

7. Ensure the test suite passes via `yarn test`.
4. Ensure the linting is good via `npm run lint`.

```sh-session
$ yarn test
```
5. Ensure the test suite passes via `npm run test`.

## Bugs

Expand All @@ -75,20 +48,6 @@ The best way to get your bug fixed is to provide a reduced test case. Please pro

Please follow the `.prettierrc` in the project.

## Credits

This project exists thanks to all the people who [contribute](CONTRIBUTING.md). <a href="graphs/contributors"><img src="https://opencollective.com/jest-puppeteer/contributors.svg?width=890&button=false" /></a>

### [Backers](https://opencollective.com/jest-puppeteer#backer)

Thank you to all our backers! 🙏

<a href="https://opencollective.com/jest-puppeteer#backers" target="_blank"><img src="https://opencollective.com/jest-puppeteer/backers.svg?width=890"></a>

### [Sponsors](https://opencollective.com/jest-puppeteer#sponsor)

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

## License

By contributing to jest-puppeteer, you agree that your contributions will be licensed under its MIT license.

0 comments on commit 6ca8757

Please sign in to comment.