Skip to content

Commit

Permalink
Add husky and lint staged (ThePornDatabase#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyRacer1337 authored Feb 12, 2023
1 parent 0cdd2a2 commit fe3d68b
Show file tree
Hide file tree
Showing 7 changed files with 1,543 additions and 182 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
env:
browser: true
es2021: true
extends: standard
overrides: []
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

./node_modules/.bin/lint-staged
4 changes: 4 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'*.py': 'poetry run flakeheaven lint --format default',
'*.js': './node_modules/eslint/bin/eslint.js --ext .js'
}
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"author": "DirtyRacer",
"main": "",
"scripts": {
"prepare": "husky install",
"build": "webpack --config webpack.prod.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -26,8 +27,15 @@
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.3",
"css-minimizer-webpack-plugin": "^4.2.2",
"eslint": "^8.34.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-promise": "^6.1.1",
"file-loader": "^6.2.0",
"html-minimizer-webpack-plugin": "^4.3.0",
"husky": "^8.0.3",
"lint-staged": "^13.1.1",
"mini-css-extract-plugin": "^2.7.2",
"postcss": "^8.4.21",
"postcss-loader": "^7.0.2",
Expand Down
Loading

0 comments on commit fe3d68b

Please sign in to comment.