Skip to content
Draft
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: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ repos:
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.39.1
hooks:
- id: eslint
args: ["--fix"]
exclude: '(^djangoproject\/static\/js\/lib\/.*$)'
require_serial: true
additional_dependencies:
- "@eslint/js@9.39.2"
- "eslint@9.39.2"
- "globals@17.0.0"

- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.7.4
hooks:
Expand Down
17 changes: 17 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const js = require("@eslint/js");
const globals = require("globals");
const defineConfig = require("eslint/config").defineConfig;

module.exports = defineConfig([
{
files: ["**/*.{js,mjs,cjs}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: {
globals: {
...globals.browser,
...globals.jquery,
},
},
},
]);
Loading