From 4213ff1f75252e9563f4f864ef593d698475336d Mon Sep 17 00:00:00 2001 From: tima101 Date: Thu, 14 Jan 2021 12:42:32 -0800 Subject: [PATCH] consistent .eslintrc.js, few formatting fixes #139 --- .vscode/settings.json | 8 ++++---- book/1-end/app/.eslintrc.js | 2 +- book/10-begin/api/.eslintrc.js | 8 +++----- book/10-begin/app/.eslintrc.js | 2 +- book/10-end/api/.eslintrc.js | 4 +--- book/10-end/app/.eslintrc.js | 2 +- book/2-begin/app/.eslintrc.js | 2 +- book/2-end/app/.eslintrc.js | 2 +- book/3-begin/app/.eslintrc.js | 2 +- book/3-end/api/.eslintrc.js | 9 ++++----- book/3-end/app/.eslintrc.js | 2 +- book/4-begin/api/.eslintrc.js | 9 ++++----- book/4-begin/app/.eslintrc.js | 2 +- book/4-end/api/.eslintrc.js | 9 ++++----- book/4-end/app/.eslintrc.js | 2 +- book/5-begin/api/.eslintrc.js | 9 ++++----- book/5-begin/app/.eslintrc.js | 2 +- book/5-end/api/.eslintrc.js | 9 ++++----- book/5-end/app/.eslintrc.js | 2 +- book/6-begin/api/.eslintrc.js | 9 ++++----- book/6-begin/app/.eslintrc.js | 2 +- book/6-end/api/.eslintrc.js | 8 +++----- book/6-end/app/.eslintrc.js | 2 +- book/7-begin/api/.eslintrc.js | 8 +++----- book/7-begin/app/.eslintrc.js | 2 +- book/7-end/api/.eslintrc.js | 8 +++----- book/7-end/app/.eslintrc.js | 2 +- book/8-begin/api/.eslintrc.js | 8 +++----- book/8-begin/app/.eslintrc.js | 2 +- book/8-end/api/.eslintrc.js | 8 +++----- book/8-end/app/.eslintrc.js | 2 +- book/9-begin/api/.eslintrc.js | 8 +++----- book/9-begin/app/.eslintrc.js | 2 +- book/9-begin/lambda/.eslintrc.js | 8 +++----- book/9-end/api/.eslintrc.js | 8 +++----- book/9-end/app/.eslintrc.js | 2 +- saas/api/.eslintrc.js | 8 +++----- saas/api/server/aws-s3.ts | 7 +------ saas/api/server/models/User.ts | 2 -- saas/app/.eslintrc.js | 2 +- saas/app/components/common/MemberChooser.tsx | 2 +- saas/app/components/posts/PostDetail.tsx | 4 +--- saas/app/pages/invitation.tsx | 5 +++-- 43 files changed, 85 insertions(+), 121 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bce68de6..378d34fc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,14 +16,14 @@ }, "editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.formatOnSave": true, - "eslint.alwaysShowStatus": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, + "eslint.alwaysShowStatus": true, "eslint.workingDirectories": [ - { "directory": "./app", "changeProcessCWD": true }, - { "directory": "./api", "changeProcessCWD": true }, - { "directory": "./lambda", "changeProcessCWD": true }, + { "directory": "./saas/app", "changeProcessCWD": true }, + { "directory": "./saas/api", "changeProcessCWD": true }, + { "directory": "./saas/lambda", "changeProcessCWD": true }, { "directory": "./book/1-end/app", "changeProcessCWD": true }, { "directory": "./book/2-begin/app", "changeProcessCWD": true }, { "directory": "./book/2-end/app", "changeProcessCWD": true }, diff --git a/book/1-end/app/.eslintrc.js b/book/1-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/1-end/app/.eslintrc.js +++ b/book/1-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/10-begin/api/.eslintrc.js b/book/10-begin/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/10-begin/api/.eslintrc.js +++ b/book/10-begin/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/10-begin/app/.eslintrc.js b/book/10-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/10-begin/app/.eslintrc.js +++ b/book/10-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/10-end/api/.eslintrc.js b/book/10-end/api/.eslintrc.js index 4b9302c9..d8ca7f23 100644 --- a/book/10-end/api/.eslintrc.js +++ b/book/10-end/api/.eslintrc.js @@ -5,6 +5,7 @@ module.exports = { "es6": true, "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier", - ] } \ No newline at end of file diff --git a/book/10-end/app/.eslintrc.js b/book/10-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/10-end/app/.eslintrc.js +++ b/book/10-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/2-begin/app/.eslintrc.js b/book/2-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/2-begin/app/.eslintrc.js +++ b/book/2-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/2-end/app/.eslintrc.js b/book/2-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/2-end/app/.eslintrc.js +++ b/book/2-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/3-begin/app/.eslintrc.js b/book/3-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/3-begin/app/.eslintrc.js +++ b/book/3-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/3-end/api/.eslintrc.js b/book/3-end/api/.eslintrc.js index cb9d314c..d8ca7f23 100644 --- a/book/3-end/api/.eslintrc.js +++ b/book/3-end/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,15 +14,13 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/3-end/app/.eslintrc.js b/book/3-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/3-end/app/.eslintrc.js +++ b/book/3-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/4-begin/api/.eslintrc.js b/book/4-begin/api/.eslintrc.js index cb9d314c..d8ca7f23 100644 --- a/book/4-begin/api/.eslintrc.js +++ b/book/4-begin/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,15 +14,13 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/4-begin/app/.eslintrc.js b/book/4-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/4-begin/app/.eslintrc.js +++ b/book/4-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/4-end/api/.eslintrc.js b/book/4-end/api/.eslintrc.js index cb9d314c..d8ca7f23 100644 --- a/book/4-end/api/.eslintrc.js +++ b/book/4-end/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,15 +14,13 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/4-end/app/.eslintrc.js b/book/4-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/4-end/app/.eslintrc.js +++ b/book/4-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/5-begin/api/.eslintrc.js b/book/5-begin/api/.eslintrc.js index cb9d314c..d8ca7f23 100644 --- a/book/5-begin/api/.eslintrc.js +++ b/book/5-begin/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,15 +14,13 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/5-begin/app/.eslintrc.js b/book/5-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/5-begin/app/.eslintrc.js +++ b/book/5-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/5-end/api/.eslintrc.js b/book/5-end/api/.eslintrc.js index cb9d314c..d8ca7f23 100644 --- a/book/5-end/api/.eslintrc.js +++ b/book/5-end/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,15 +14,13 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/5-end/app/.eslintrc.js b/book/5-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/5-end/app/.eslintrc.js +++ b/book/5-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/6-begin/api/.eslintrc.js b/book/6-begin/api/.eslintrc.js index cb9d314c..d8ca7f23 100644 --- a/book/6-begin/api/.eslintrc.js +++ b/book/6-begin/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,15 +14,13 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/6-begin/app/.eslintrc.js b/book/6-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/6-begin/app/.eslintrc.js +++ b/book/6-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/6-end/api/.eslintrc.js b/book/6-end/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/6-end/api/.eslintrc.js +++ b/book/6-end/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/6-end/app/.eslintrc.js b/book/6-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/6-end/app/.eslintrc.js +++ b/book/6-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/7-begin/api/.eslintrc.js b/book/7-begin/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/7-begin/api/.eslintrc.js +++ b/book/7-begin/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/7-begin/app/.eslintrc.js b/book/7-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/7-begin/app/.eslintrc.js +++ b/book/7-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/7-end/api/.eslintrc.js b/book/7-end/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/7-end/api/.eslintrc.js +++ b/book/7-end/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/7-end/app/.eslintrc.js b/book/7-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/7-end/app/.eslintrc.js +++ b/book/7-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/8-begin/api/.eslintrc.js b/book/8-begin/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/8-begin/api/.eslintrc.js +++ b/book/8-begin/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/8-begin/app/.eslintrc.js b/book/8-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/8-begin/app/.eslintrc.js +++ b/book/8-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/8-end/api/.eslintrc.js b/book/8-end/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/8-end/api/.eslintrc.js +++ b/book/8-end/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/8-end/app/.eslintrc.js b/book/8-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/8-end/app/.eslintrc.js +++ b/book/8-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/9-begin/api/.eslintrc.js b/book/9-begin/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/9-begin/api/.eslintrc.js +++ b/book/9-begin/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/9-begin/app/.eslintrc.js b/book/9-begin/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/9-begin/app/.eslintrc.js +++ b/book/9-begin/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/book/9-begin/lambda/.eslintrc.js b/book/9-begin/lambda/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/9-begin/lambda/.eslintrc.js +++ b/book/9-begin/lambda/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/9-end/api/.eslintrc.js b/book/9-end/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/book/9-end/api/.eslintrc.js +++ b/book/9-end/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/book/9-end/app/.eslintrc.js b/book/9-end/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/book/9-end/app/.eslintrc.js +++ b/book/9-end/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/saas/api/.eslintrc.js b/saas/api/.eslintrc.js index 79ba9b84..d8ca7f23 100644 --- a/saas/api/.eslintrc.js +++ b/saas/api/.eslintrc.js @@ -3,8 +3,9 @@ module.exports = { extends: ["plugin:@typescript-eslint/recommended", "prettier"], env: { "es6": true, - "node": true + "node": true, }, + plugins: ["prettier"], rules: { 'prettier/prettier': [ 'error', @@ -13,7 +14,7 @@ module.exports = { trailingComma: 'all', arrowParens: 'always', printWidth: 100, - semi: true + semi: true, }, ], '@typescript-eslint/no-unused-vars': 'off', @@ -22,7 +23,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: [ - "prettier" - ] } \ No newline at end of file diff --git a/saas/api/server/aws-s3.ts b/saas/api/server/aws-s3.ts index 56a4b206..6d50475b 100644 --- a/saas/api/server/aws-s3.ts +++ b/saas/api/server/aws-s3.ts @@ -3,12 +3,7 @@ import * as aws from 'aws-sdk'; async function signRequestForUpload({ fileName, fileType, prefix, bucket }) { const randomStringForPrefix = - Math.random() - .toString(36) - .substring(2, 12) + - Math.random() - .toString(36) - .substring(2, 12); + Math.random().toString(36).substring(2, 12) + Math.random().toString(36).substring(2, 12); const key = `${prefix}/${randomStringForPrefix}/${fileName}`; diff --git a/saas/api/server/models/User.ts b/saas/api/server/models/User.ts index 05f2325d..27dfe36b 100644 --- a/saas/api/server/models/User.ts +++ b/saas/api/server/models/User.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/camelcase */ - import * as _ from 'lodash'; import * as mongoose from 'mongoose'; import Stripe from 'stripe'; diff --git a/saas/app/.eslintrc.js b/saas/app/.eslintrc.js index 80f0e1ba..bf61beaa 100644 --- a/saas/app/.eslintrc.js +++ b/saas/app/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { es6: true, node: true, }, + plugins: ['prettier', 'react'], rules: { 'prettier/prettier': [ 'error', @@ -27,5 +28,4 @@ module.exports = { 'prefer-arrow-callback': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, - plugins: ['prettier', 'react'], }; \ No newline at end of file diff --git a/saas/app/components/common/MemberChooser.tsx b/saas/app/components/common/MemberChooser.tsx index 367f5f04..743c4acd 100644 --- a/saas/app/components/common/MemberChooser.tsx +++ b/saas/app/components/common/MemberChooser.tsx @@ -64,7 +64,7 @@ class MemberChooser extends React.Component { ); } - public handleChange = (event, value, _) => { + public handleChange = (event, value) => { event.preventDefault(); const selectedItems = value; diff --git a/saas/app/components/posts/PostDetail.tsx b/saas/app/components/posts/PostDetail.tsx index ecdad27c..3248aa08 100644 --- a/saas/app/components/posts/PostDetail.tsx +++ b/saas/app/components/posts/PostDetail.tsx @@ -81,9 +81,7 @@ class PostDetail extends React.Component { } public renderPostDetail(post: Post, isMobile) { - const createdDate = moment(post.createdAt) - .local() - .format('MMM Do YYYY'); + const createdDate = moment(post.createdAt).local().format('MMM Do YYYY'); const lastUpdatedDate = moment(post.lastUpdatedAt).fromNow(); return ( diff --git a/saas/app/pages/invitation.tsx b/saas/app/pages/invitation.tsx index 3bec650e..117fbfa2 100644 --- a/saas/app/pages/invitation.tsx +++ b/saas/app/pages/invitation.tsx @@ -56,8 +56,9 @@ class Invitation extends React.Component {