Skip to content
Permalink
Browse files

Prettier & ESLint config

  • Loading branch information
CGamesPlay authored and synhershko committed Dec 19, 2019
1 parent f044e7f commit cf3596e0feb3d65e8341c8fbc678f759c78dac96
Showing with 39,822 additions and 5,665 deletions.
  1. +5 −0 .dockerignore
  2. +24 −0 .eslintrc.base.js
  3. +22 −5 .gitlab-ci.yml
  4. +2 −0 Dockerfile
  5. +3 −0 admin-frontend/.eslintrc.js
  6. +1 −0 admin-frontend/.prettierrc.toml
  7. +697 −0 admin-frontend/package-lock.json
  8. +10 −1 admin-frontend/package.json
  9. +41 −38 admin-frontend/src/App.css
  10. +41 −37 admin-frontend/src/App.js
  11. +104 −85 admin-frontend/src/api.js
  12. +27,617 −1 admin-frontend/src/assets/world-50m.json
  13. +47 −35 admin-frontend/src/components/AuthButtons.js
  14. +234 −163 admin-frontend/src/components/BaseForm.js
  15. +77 −63 admin-frontend/src/components/CommentsList.js
  16. +19 −14 admin-frontend/src/components/ConfirmModal.js
  17. +43 −32 admin-frontend/src/components/ConfirmSocialDialog.js
  18. +93 −96 admin-frontend/src/components/ContentEditor/add-hr-plugin.js
  19. +808 −670 admin-frontend/src/components/ContentEditor/embeds-patched-plugin.js
  20. +71 −63 admin-frontend/src/components/ContentEditor/index.js
  21. +61 −56 admin-frontend/src/components/ContentPageForm.js
  22. +4 −4 admin-frontend/src/components/FAIcon.js
  23. +22 −20 admin-frontend/src/components/Icons/HoverIcon.js
  24. +1 −4 admin-frontend/src/components/Icons/SvgDelete.js
  25. +1 −4 admin-frontend/src/components/Icons/SvgEdit.js
  26. +1 −4 admin-frontend/src/components/Icons/SvgNewWindow.js
  27. +30 −26 admin-frontend/src/components/ImportPostModal.js
  28. +15 −15 admin-frontend/src/components/Layout.js
  29. +113 −69 admin-frontend/src/components/LoggedInLayout.js
  30. +27 −25 admin-frontend/src/components/NavLink.js
  31. +64 −46 admin-frontend/src/components/PostForm.js
  32. +25 −11 admin-frontend/src/components/PrivateRoute.js
  33. +35 −32 admin-frontend/src/components/RedditShareDialog.js
  34. +35 −34 admin-frontend/src/components/SeriesPicker.js
  35. +14 −10 admin-frontend/src/components/SetupWarning.js
  36. +117 −95 admin-frontend/src/components/StatsOverTimeGraph.js
  37. +10 −9 admin-frontend/src/components/TagsInput/index.js
  38. +8 −12 admin-frontend/src/components/TagsInput/style.css
  39. +51 −42 admin-frontend/src/components/VisitsMap.js
  40. +11 −11 admin-frontend/src/config/urls.js
  41. +20 −21 admin-frontend/src/index.js
  42. +462 −19 admin-frontend/src/lib/jquery-sortable-min.js
  43. +156 −1 admin-frontend/src/lib/linkify-jquery.min.js
  44. +629 −1 admin-frontend/src/lib/linkify.min.js
  45. +271 −1 admin-frontend/src/lib/medium-editor-insert-plugin.min.css
  46. +1,835 −2 admin-frontend/src/lib/medium-editor-insert-plugin.min.js
  47. +19 −15 admin-frontend/src/pages/Backup.js
  48. +127 −82 admin-frontend/src/pages/BaseItemsPage.js
  49. +187 −115 admin-frontend/src/pages/Dashboard.js
  50. +71 −58 admin-frontend/src/pages/ItemFormPage.js
  51. +33 −27 admin-frontend/src/pages/ItemStatsPage.js
  52. +45 −40 admin-frontend/src/pages/Login.js
  53. +15 −15 admin-frontend/src/pages/Pages.js
  54. +94 −75 admin-frontend/src/pages/Posts.js
  55. +17 −18 admin-frontend/src/pages/Setup.js
  56. +140 −89 admin-frontend/src/pages/Status.js
  57. +9 −9 admin-frontend/src/pages/index.js
  58. +22 −23 admin-frontend/src/stores/App.js
  59. +7 −7 admin-frontend/src/stores/BaseStore.js
  60. +9 −12 admin-frontend/src/stores/Dashboard.js
  61. +9 −14 admin-frontend/src/stores/ItemsStore.js
  62. +5 −6 admin-frontend/src/stores/Pages.js
  63. +31 −28 admin-frontend/src/stores/Posts.js
  64. +14 −20 admin-frontend/src/stores/Setup.js
  65. +10 −14 admin-frontend/src/stores/Stats.js
  66. +6 −6 admin-frontend/src/stores/index.js
  67. +11 −13 admin-frontend/src/util.js
  68. +3 −3 admin-frontend/webpack.config.js
  69. +3 −0 backend/.eslintrc.js
  70. +1 −0 backend/.prettierrc.toml
  71. +951 −1 backend/package-lock.json
  72. +11 −1 backend/package.json
  73. +182 −150 backend/src/app.js
  74. +1 −1 backend/src/lib/express-handlebars-multi/README.md
  75. +184 −183 backend/src/lib/express-handlebars-multi/index.js
  76. +12 −11 backend/src/lib/multer-gcs-storage.js
  77. +33 −43 backend/src/routes/api.js
  78. +24 −16 backend/src/routes/auth/anonymous.js
  79. +33 −21 backend/src/routes/auth/github.js
  80. +39 −24 backend/src/routes/auth/google.js
  81. +91 −70 backend/src/routes/auth/index.js
  82. +20 −15 backend/src/routes/auth/jwt.js
  83. +267 −234 backend/src/routes/blog.js
  84. +7 −7 backend/src/routes/connect/index.js
  85. +62 −46 backend/src/routes/connect/linkedin.js
  86. +49 −35 backend/src/routes/connect/medium.js
  87. +45 −37 backend/src/routes/connect/reddit.js
  88. +71 −70 backend/src/routes/contact.js
  89. +200 −166 backend/src/routes/content.js
  90. +52 −50 backend/src/routes/dump.js
  91. +38 −36 backend/src/routes/import.js
  92. +84 −70 backend/src/routes/index.js
  93. +52 −49 backend/src/routes/page.js
  94. +7 −7 backend/src/routes/routingTable.js
  95. +22 −18 backend/src/routes/setup.js
  96. +114 −88 backend/src/routes/social.js
  97. +70 −56 backend/src/routes/stats.js
  98. +51 −44 backend/src/routes/status.js
  99. +11 −9 backend/src/routes/uploads.js
  100. +88 −70 backend/src/routes/util.js
  101. +14 −18 backend/src/server.js
  102. +14 −13 backend/src/services/akismet.js
  103. +309 −234 backend/src/services/blogPosts.js
  104. +34 −38 backend/src/services/cache.js
  105. +116 −110 backend/src/services/comments.js
  106. +77 −52 backend/src/services/elasticsearch.js
  107. +54 −39 backend/src/services/emails.js
  108. +5 −5 backend/src/services/events.js
  109. +244 −204 backend/src/services/logging.js
  110. +22 −12 backend/src/services/recaptcha.js
  111. +139 −120 backend/src/services/social.js
  112. +54 −49 backend/src/services/storage.js
  113. +10 −11 backend/src/util.js
  114. +478 −475 backend/src/views/base/public/css/style.css
  115. +12 −12 backend/src/views/base/public/favicon/site.webmanifest
  116. +20 −16 backend/src/views/base/public/js/comments.js
  117. +58 −45 backend/src/views/base/public/js/main.js
  118. +139 −2 backend/src/views/base/public/vendor/shareSelectedText.min.css
  119. +241 −1 backend/src/views/base/public/vendor/shareSelectedText.min.js
  120. +11 −15 backend/webpack.config.js
  121. +7 −0 package.json
  122. +14 −0 scripts/lint.sh
  123. +14 −0 scripts/prettier-check.sh
@@ -0,0 +1,5 @@
admin-frontend/node_modules
backend/node_modules
.git
.dockerignore
Dockerfile
@@ -0,0 +1,24 @@
module.exports = {
env: { browser: true, node: true, "jest/globals": true, es6: true },
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
],
plugins: ["jest"],
rules: {
"react/prop-types": "off",
"react/jsx-no-target-blank": "off",
"require-atomic-updates": "off",
"no-unused-vars": ["error", { ignoreRestSiblings: true }],
"no-console": "off",
},
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
legacyDecorators: true,
},
},
parser: "babel-eslint",
};
@@ -1,22 +1,37 @@
image: docker:stable

stages:
- test
- package
- release

variables:
STAGING_REGISTRY: "registry.gitlab.com"
CONTAINER_TEST_IMAGE: ${STAGING_REGISTRY}/bigdataboutique/${CI_PROJECT_NAME}:commit-${CI_COMMIT_SHA}

services:
- name: docker:dind
command: ["--experimental"]

before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $STAGING_REGISTRY

static-analysis:
stage: test
image: node
cache:
key: ${CI_JOB_NAME}
paths:
- admin-frontend/node_modules
- backend/node_modules
script:
# These are in () to run in a subshell and not modify the real pwd
- (cd admin-frontend && npm install)
- (cd backend && npm install)
- npm run prettier-check
- npm run lint

package:
stage: package
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $STAGING_REGISTRY
script:
- docker build --squash -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
@@ -25,6 +40,8 @@ release:
stage: release
variables:
GIT_STRATEGY: none
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $STAGING_REGISTRY
script:
- IMAGE_NAME=${STAGING_REGISTRY}/bigdataboutique/${CI_PROJECT_NAME}:`date '+%Y-%m-%d-%H%M'`-${CI_COMMIT_SHA:0:9}
- echo $IMAGE_NAME
@@ -53,4 +70,4 @@ dockerhub:
only:
- /^v.*$/
except:
- branches
- branches
@@ -1,6 +1,8 @@
FROM node:10-alpine
LABEL maintainer="info@bigdataboutique.com"

RUN apk add git

WORKDIR /app
COPY . .

@@ -0,0 +1,3 @@
const baseConfig = require("../.eslintrc.base");

module.exports = { ...baseConfig, ignorePatterns: ["src/lib/**/*"] };
@@ -0,0 +1 @@
trailingComma = "es5"

0 comments on commit cf3596e

Please sign in to comment.
You can’t perform that action at this time.