Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commit prettier version #694

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ module.exports = {
extends: ['torchbox', 'plugin:@typescript-eslint/recommended'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
sourceType: 'module',
},
rules: {
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }]
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
}
}
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
needs: lint
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
Expand All @@ -55,8 +55,8 @@ jobs:
needs: lint
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
database: ["postgres"]
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
database: ['postgres']

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
- flake8-bugbear
- flake8-comprehensions
- repo: https://github.com/pre-commit/mirrors-prettier
rev: 'v1.18.2'
rev: 'v2.7.1'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeteCoward any chance you could drop the linting dependencies from package.json while at this? This way we keep it just in pre-commit.

https://github.com/wagtail/cookiecutter-wagtail-package/pull/47/files has an example.

If not, will make that a follow-up task

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a go.

I snuck in a change from pip install -e .[testing] -U to pip install -e '.[testing]' -U too, which caught me out following the README.

I did not make the change to the pre-commit run all files README comment, as I was not sure of the rationale behind it.

hooks:
- id: prettier
types_or: [markdown, css, scss, javascript, json, yaml, ts, tsx]
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ With your preferred virtualenv activated, install testing dependencies:

```sh
pip install pip>=21.3
pip install -e .[testing] -U
pip install -e '.[testing]' -U
```

#### Using flit
Expand All @@ -81,8 +81,6 @@ flit install
Note that this project uses [pre-commit](https://github.com/pre-commit/pre-commit). To set up locally:

```shell
# if you don't have it yet, globally
$ pip install pre-commit
# go to the project directory
$ cd wagtail-localize
# initialize pre-commit
Expand Down
Loading