diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0981b7c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "printWidth": 120 +} diff --git a/package.json b/package.json index 12ed26a..c8f2b89 100755 --- a/package.json +++ b/package.json @@ -3,19 +3,20 @@ "version": "11.2.6", "description": "[F]ind [R]eal [E]states [d]amn eas[y].", "scripts": { + "prepare": "husky", "start": "node prod.js", "dev": "yarn && rm -rf ./ui/public/* && vite", "ui": "rm -rf ./ui/public/* && vite", "prod": "yarn && vite build --emptyOutDir", - "format": "prettier --write lib/**/*.js ui/src/**/*.jsx test/**/*.js *.js --single-quote --print-width 120", + "format": "prettier --write lib/**/*.js ui/src/**/*.jsx test/**/*.js *.js", "test": "mocha --loader=esmock --timeout 3000000 test/**/*.test.js", - "lint": "eslint ./index.js ./lib/**/*.js ./test/**/*.js ./ui/src/**/*.jsx" + "lint": "eslint index.js lib/**/*.js test/**/*.js ui/src/**/*.jsx --fix" }, "type": "module", "lint-staged": { - "*.js": [ - "eslint ./index.js ./lib/**/*.js ./test/**/*.js", - "prettier --single-quote --print-width 120 --write" + "*.{js,jsx}": [ + "yarn lint", + "yarn format" ] }, "main": "index.js",