Files
odoo_source/addons/web/tooling/_package.json
T
Simon Genin (ges) 8d57a5cde9 [ADD] web: prettier and eslint tooling
Provide an opt in js tooling system by adding a node env with prettier and eslint configured.
3 bash scripts are provided: enable.sh, disable.sh and reload.sh.

Enable.sh: add to the community root (and optionaly to the enterprise root) the env.
Disable.sh: remove the env.
Reload.sh: disable then enable.
2021-06-18 21:31:27 +02:00

27 lines
953 B
JSON

{
"name": "odoo-js-config",
"version": "0.0.1",
"description": "JS Config for better DX in javascript",
"scripts": {
"prepare": "husky install",
"format-web": "prettier-eslint --write 'addons/web/static/src/**/*.js' 'addons/web/static/tests/**/*.js' 'addons/web/doc/**/*.md'",
"format-staged": "lint-staged",
"lint-web": "prettier-eslint --list-different 'addons/web/static/src/**/*.js' 'addons/web/static/tests/**/*.js' 'addons/web/doc/**/*.md'",
"format-all": "prettier-eslint --write '**/*.js' '**/*.md'"
},
"devDependencies": {
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^6.0.0",
"lint-staged": "^10.5.4",
"prettier": "2.2.1",
"prettier-eslint-cli": "^5.0.1"
},
"lint-staged": {
"*.{js,md}": [
"prettier-eslint --write"
]
}
}