Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
env: {
worker: true,
es6: true,
},
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: 'request' }],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should ignore this simply because we don't use it - we should probably just console.log(request) in the template so it's used instead

},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are using recommended, we can probably eliminate .prettierrc

}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"semi": false,
"trailingComma": "all",
"tabWidth": 2,
"printWidth": 80
"printWidth": 100
}
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
{
"private": true,
"name": "{{ project-name }}",
"version": "1.0.0",
"description": "A template for kick starting a Cloudflare Workers project",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --write '**/*.{js,css,json,md}'"
"format": "eslint --fix *.js"
},
"author": "{{ authors }}",
"license": "MIT",
"devDependencies": {
"prettier": "^1.18.2"
"eslint": "^6.5.1",
"eslint-config-prettier": "^6.4.0",
"eslint-plugin-prettier": "^3.1.1",
"husky": "^2.1.0"
},
"husky": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think we want to add husky back - we just recently removed it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"hooks": {
"pre-commit": "npm run format",
"pre-push": "npm run format"
}
}
}