Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346974
D2708.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D2708.diff
View Options
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -29,6 +29,14 @@
language: system
types: [python]
+- repo: local
+ hooks:
+ - id: eslint
+ name: eslint
+ entry: node_modules/.bin/eslint -c swh/web/assets/config/.eslintrc
+ language: system
+ types: [javascript]
+
# unfortunately, we are far from being able to enable this...
# - repo: https://github.com/PyCQA/pydocstyle.git
# rev: 4.0.0
diff --git a/swh/web/assets/config/.eslintrc b/swh/web/assets/config/.eslintrc
--- a/swh/web/assets/config/.eslintrc
+++ b/swh/web/assets/config/.eslintrc
@@ -303,6 +303,7 @@
"standard/computed-property-even-spacing": ["error", "even"],
"standard/no-callback-literal": "error",
"standard/object-curly-even-spacing": ["error", "either"],
- "chai-friendly/no-unused-expressions": 2
+ "chai-friendly/no-unused-expressions": 2,
+ "object-curly-spacing": ["error", "never"]
}
}
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 4:44 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3222953
Attached To
D2708: pre-commit: Add eslint hook for javascript files
Event Timeline
Log In to Comment