Skip to content

Instantly share code, notes, and snippets.

@thomasswilliams
Last active November 20, 2019 05:58
Show Gist options
  • Save thomasswilliams/71509330115c50e1fdb9cbb7388ad5a2 to your computer and use it in GitHub Desktop.
Save thomasswilliams/71509330115c50e1fdb9cbb7388ad5a2 to your computer and use it in GitHub Desktop.
Express & TypeScript Pedals API level 2, Nov 2019 - package.json
{
"name": "pedals-api-nov-2019",
"version": "0.0.2",
"scripts": {
"serve": "npm run tsc && node ./dist/server.js",
"tsc": "tsc",
"lint": "eslint \"src/**/*.ts\""
},
"eslintConfig": {
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"node": true
},
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-console": "error"
}
},
"devDependencies": {
"@types/express": "^4.17.2",
"@types/node": "^12.12.8",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"eslint": "^6.6.0",
"typescript": "^3.7.2"
},
"dependencies": {
"express": "^4.17.1"
}
}
@thomasswilliams
Copy link
Author

Added ESLint and a couple of dependencies, a config section for ESLInt, and a "lint" command to implement the most basic linting.

@thomasswilliams
Copy link
Author

Added a rule for "no-console" to show lint catching issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment