-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* config: Add pre-commit rules and linting configuration - Add more extensive pre-commit rules for linting and formatting - Move CSS/SCSS linting to use stylelint - Update prettier to apply to all file types (including Django templates) - Add actionlint for ensuring correctness of GH Actions workflows - Remove custom issue/PR templates in favor of org-global templates from mitodl/.github (cherry picked from commit 917801fcd422e0afd471c4fac12b364fa59e2df5) * fix,style: Apply automated fixes from pre-commit hooks (cherry picked from commit 7babc00de756a9c3d2a8145cf7461872d52bbf52) * fix: Resolve broken tests (cherry picked from commit ed7363bb4a41043ca9c58de1f7667a16d08f68ea) * style: Apply pre-commit changes * config: Fix JS lint configs for pre-commit usage * fix,style: Address lint failures for JS and SCSS * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Pass explicit exception to suppress * fix: Resolve webpack build failure - Fix invalid CSS rules - Fix config path for Prettier in GH Actions - Temporarily ignore unparseable files for Prettier * version: Update Poetry locks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
22472e4
commit dfcc797
Showing
461 changed files
with
17,321 additions
and
14,536 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
instrumentation: | ||
excludes: ['**/*_test.js'] | ||
excludes: ["**/*_test.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,109 @@ | ||
--- | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
ci: | ||
skip: | ||
# Because these are local hooks it seems like they won't easily run in pre-commit CI | ||
- prettier | ||
- eslint | ||
- stylelint | ||
repos: | ||
- repo: git@github.com:Yelp/detect-secrets | ||
rev: v0.13.1 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: detect-secrets | ||
args: ['--baseline', '.secrets.baseline'] | ||
exclude: .*_test.*|yarn\.lock | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
exclude: ".hbs$" | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: debug-statements | ||
- repo: https://github.com/scop/pre-commit-shfmt | ||
rev: v3.8.0-1 | ||
hooks: | ||
- id: shfmt | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.35.1 | ||
hooks: | ||
- id: yamllint | ||
args: [--format, parsable, -d, relaxed] | ||
- repo: https://github.com/Yelp/detect-secrets | ||
rev: v1.4.0 | ||
hooks: | ||
- id: detect-secrets | ||
args: | ||
- --baseline | ||
- .secrets.baseline | ||
- --exclude-files | ||
- .yarn/ | ||
- --exclude-files | ||
- "_test.py$" | ||
- --exclude-files | ||
- "test_.*.py" | ||
- --exclude-files | ||
- poetry.lock | ||
- --exclude-files | ||
- yarn.lock | ||
- --exclude-files | ||
- compliance/test_data/cybersource/ | ||
- --exclude-files | ||
- "_test.js$" | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.4.0" | ||
hooks: | ||
- id: ruff-format | ||
- id: ruff | ||
args: | ||
- --extend-ignore=D1 | ||
- --fix | ||
- repo: local | ||
hooks: | ||
- id: prettier | ||
name: Prettier | ||
language: node | ||
entry: yarn | ||
args: [run, prettier, --write, --ignore-unknown] | ||
types_or: | ||
[ | ||
javascript, | ||
jsx, | ||
ts, | ||
tsx, | ||
json, | ||
scss, | ||
sass, | ||
css, | ||
yaml, | ||
markdown, | ||
html, | ||
] | ||
- id: eslint | ||
name: eslint | ||
description: "Lint JS/TS files and apply automatic fixes" | ||
entry: yarn | ||
language: node | ||
types_or: [javascript, jsx, ts, tsx] | ||
args: [run, eslint, --fix, --quiet] | ||
exclude: "(node_modules/|.yarn/)" | ||
require_serial: false | ||
- id: stylelint | ||
name: stylelint | ||
description: "Lint SCSS files" | ||
entry: yarn | ||
language: node | ||
types_or: [scss, css, sass] | ||
args: [run, stylelint, --allow-empty-input, --fix] | ||
exclude: "(node_modules/|static/css/vendor/)" | ||
require_serial: false | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.10.0.1 | ||
hooks: | ||
- id: shellcheck | ||
args: ["--severity=warning"] | ||
- repo: https://github.com/rhysd/actionlint | ||
rev: v1.6.27 | ||
hooks: | ||
- id: actionlint | ||
name: actionlint | ||
description: Runs actionlint to lint GitHub Actions workflow files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.venv/ | ||
.yarn/ | ||
flow-typed/npm/ | ||
static/js/flow/ | ||
static/js/components/forms/elements/FormError.js | ||
static/js/lib/queries/catalog.js | ||
static/js/containers/pages/profile/ViewProfilePage.js | ||
static/js/lib/courses.js | ||
static/js/store/configureStore.js | ||
static/js/util/integration_test_helper.js | ||
static/js/lib/queries/digitalCredentials.js | ||
static/js/Router.js | ||
static/js/components/forms/ProfileFormFields.js | ||
voucher/templates/enroll.html | ||
mail/templates/product_order_receipt/body.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/prettierrc", | ||
"semi": true, | ||
"overrides": [ | ||
{ | ||
"files": "**/*.js", | ||
"parser": "flow" | ||
} | ||
], | ||
"plugins": ["prettier-plugin-django-alpine"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.