-
Notifications
You must be signed in to change notification settings - Fork 111
Add wrangler type and prettier #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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' }], | ||
| }, | ||
| parserOptions: { | ||
| ecmaVersion: 2018, | ||
| sourceType: 'module', | ||
| }, | ||
| extends: ['eslint:recommended', 'plugin:prettier/recommended'], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we are using recommended, we can probably eliminate |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,5 +3,5 @@ | |
| "semi": false, | ||
| "trailingComma": "all", | ||
| "tabWidth": 2, | ||
| "printWidth": 80 | ||
| "printWidth": 100 | ||
| } | ||
| 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": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "hooks": { | ||
| "pre-commit": "npm run format", | ||
| "pre-push": "npm run format" | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
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