Commit 1cc6dfe1 authored by Diegodlh's avatar Diegodlh
Browse files

Configure linter, formatter and git hooks

parent 1acca6e5
module.exports = {
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
};
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
node_modules
/coverage
/dist
module.exports = {
"src/**/*": [
"eslint --cache --fix",
"prettier --write"
]
};
\ No newline at end of file
This diff is collapsed.
......@@ -9,12 +9,12 @@
],
"scripts": {
"test": "jest",
"prepare": "husky install && npm run build",
"prepublishOnly": "npm test && npm run lint",
"build": "tsc",
"watch": "tsc -w",
"format": "",
"lint": "",
"prepare": "npm run build",
"prepublishOnly": "npm test && npm run lint"
"build:watch": "tsc -w",
"format": "prettier --write src",
"lint": "eslint"
},
"keywords": [
"wikipedia",
......@@ -36,7 +36,14 @@
"homepage": "https://meta.wikimedia.org/wiki/Web2Cit",
"devDependencies": {
"@types/jest": "^27.4.0",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"eslint": "^8.6.0",
"eslint-config-prettier": "^8.3.0",
"husky": "^7.0.4",
"jest": "^27.4.5",
"lint-staged": "^12.1.6",
"prettier": "^2.5.1",
"ts-jest": "^27.1.2",
"typescript": "^4.5.4"
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment