Skip to content

Instantly share code, notes, and snippets.

@ndom91
Last active June 21, 2023 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndom91/70d4da6e1b0b50e19bad35f1a967174b to your computer and use it in GitHub Desktop.
Save ndom91/70d4da6e1b0b50e19bad35f1a967174b to your computer and use it in GitHub Desktop.
Example `package.json` with ESLint+Prettier+Typescript
{
"name": "app",
"version": "0.0.1",
"description": "",
"main": "index.js",
"author": "",
"scripts": {
"prepare": "npx simple-git-hooks"
},
"type": "module",
"engines": {
"node": "18.x",
"npm": "9.x"
},
"dependencies": {},
"devDependencies": {
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"lint-staged": "^13.1.0",
"simple-git-hooks": "^2.8.1"
},
"simple-git-hooks": {
"commit-msg": "npx commitlint --edit",
"pre-commit": "npx lint-staged"
},
"lint-staged": {
"*.{js,jsx}": "eslint --cache --fix"
},
"eslintConfig": {
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"env": {
"node": true,
"es6": true
},
"plugins": [
"@typescript-eslint",
"prettier"
],
"rules": {},
"parser": "@typescript-eslint/parser"
},
"prettier": {
"semi": false
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment