ChicagoJS / chicagojs.org

Home page of ChicagoJS.org. Pull Requests welcome!
https://chicagojs.org
MIT License
9 stars 13 forks source link

Setup Prettier, eslint, and editorconfig #15

Closed basicdays closed 5 years ago

basicdays commented 5 years ago

Closes issue #14.

Here's the lint output in case we want to remove or change any lint rules.

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/gatsby-node.js
  29:18  error  Expected to return a value at the end of arrow function  consistent-return
  38:13  error  Use object destructuring                                 prefer-destructuring

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/cms/preview-templates/AboutPagePreview.js
  13:3  error  propType "entry" is not required, but has no corresponding defaultProp declaration      react/require-default-props
  16:3  error  propType "widgetFor" is not required, but has no corresponding defaultProp declaration  react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/cms/preview-templates/BlogPostPreview.js
  15:3  error  propType "entry" is not required, but has no corresponding defaultProp declaration      react/require-default-props
  18:3  error  propType "widgetFor" is not required, but has no corresponding defaultProp declaration  react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/cms/preview-templates/ProductPagePreview.js
  50:3  error  propType "entry" is not required, but has no corresponding defaultProp declaration     react/require-default-props
  53:3  error  propType "getAsset" is not required, but has no corresponding defaultProp declaration  react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/components/Content.js
   5:30  warning  Dangerous property 'dangerouslySetInnerHTML' found                                      react/no-danger
  13:3   error    propType "content" is not required, but has no corresponding defaultProp declaration    react/require-default-props
  14:3   error    propType "className" is not required, but has no corresponding defaultProp declaration  react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/components/Features.js
  20:3  error  propType "gridItems" is not required, but has no corresponding defaultProp declaration  react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/components/Layout.js
  4:20  error  Useless path segments for "../components/Navbar", should be "./Navbar"  import/no-useless-path-segments
  7:28  error  'children' is missing in props validation                               react/prop-types

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/components/Pricing.js
  13:14  error  `{price.price}` must be placed on a new line                                       react/jsx-one-expression-per-line
  30:3   error  propType "data" is not required, but has no corresponding defaultProp declaration  react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/components/Testimonials.js
  12:17  error  ` – ` must be placed on a new line                                                         react/jsx-one-expression-per-line
  12:20  error  `{testimonial.author}` must be placed on a new line                                        react/jsx-one-expression-per-line
  20:3   error  propType "testimonials" is not required, but has no corresponding defaultProp declaration  react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/pages/index.js
   3:10  error  'Link' is defined but never used                                                   no-unused-vars
   4:8   error  'Layout' is defined but never used                                                 no-unused-vars
   6:16  error  Component should be written as a pure function                                     react/prefer-stateless-function
   9:20  error  'posts' is assigned a value but never used                                         no-unused-vars
  28:3   error  propType "data" is not required, but has no corresponding defaultProp declaration  react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/pages/tags/index.js
   8:3   error  'data' is missing in props validation               react/prop-types
  29:37  error  ` (` must be placed on a new line                   react/jsx-one-expression-per-line
  29:39  error  `{tag.totalCount}` must be placed on a new line     react/jsx-one-expression-per-line
  29:55  error  `)                  ` must be placed on a new line  react/jsx-one-expression-per-line

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/templates/about-page.js
  30:3  error  propType "content" is not required, but has no corresponding defaultProp declaration           react/require-default-props
  31:3  error  propType "contentComponent" is not required, but has no corresponding defaultProp declaration  react/require-default-props
  49:3  error  Prop type `object` is forbidden                                                                react/forbid-prop-types

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/templates/blog-post.js
  13:3   error  'tags' is missing in props validation                                                          react/prop-types
  35:30  error  Unexpected string concatenation                                                                prefer-template
  51:3   error  propType "contentComponent" is not required, but has no corresponding defaultProp declaration  react/require-default-props
  52:3   error  propType "description" is not required, but has no corresponding defaultProp declaration       react/require-default-props
  53:3   error  propType "title" is not required, but has no corresponding defaultProp declaration             react/require-default-props
  54:3   error  propType "helmet" is not required, but has no corresponding defaultProp declaration            react/require-default-props
  75:3   error  propType "data" is not required, but has no corresponding defaultProp declaration              react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/templates/product-page.js
  111:3  error  propType "image" is not required, but has no corresponding defaultProp declaration         react/require-default-props
  112:3  error  propType "title" is not required, but has no corresponding defaultProp declaration         react/require-default-props
  113:3  error  propType "heading" is not required, but has no corresponding defaultProp declaration       react/require-default-props
  114:3  error  propType "description" is not required, but has no corresponding defaultProp declaration   react/require-default-props
  115:3  error  propType "intro" is not required, but has no corresponding defaultProp declaration         react/require-default-props
  118:3  error  propType "main" is not required, but has no corresponding defaultProp declaration          react/require-default-props
  125:3  error  Prop type `array` is forbidden                                                             react/forbid-prop-types
  125:3  error  propType "testimonials" is not required, but has no corresponding defaultProp declaration  react/require-default-props
  126:3  error  propType "fullImage" is not required, but has no corresponding defaultProp declaration     react/require-default-props
  127:3  error  propType "pricing" is not required, but has no corresponding defaultProp declaration       react/require-default-props
  155:3  error  propType "data" is not required, but has no corresponding defaultProp declaration          react/require-default-props

/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/templates/tags.js
   6:1   error  Component should be written as a pure function                      react/prefer-stateless-function
   8:19  error  Must use destructuring props assignment                             react/destructuring-assignment
   8:30  error  'data' is missing in props validation                               react/prop-types
   8:35  error  'data.allMarkdownRemark' is missing in props validation             react/prop-types
   8:53  error  'data.allMarkdownRemark.edges' is missing in props validation       react/prop-types
  16:11  error  Use object destructuring                                            prefer-destructuring
  16:17  error  Must use destructuring props assignment                             react/destructuring-assignment
  16:28  error  'pageContext' is missing in props validation                        react/prop-types
  16:40  error  'pageContext.tag' is missing in props validation                    react/prop-types
  17:11  error  Use object destructuring                                            prefer-destructuring
  17:19  error  Must use destructuring props assignment                             react/destructuring-assignment
  17:35  error  'data.site' is missing in props validation                          react/prop-types
  17:40  error  'data.site.siteMetadata' is missing in props validation             react/prop-types
  17:53  error  'data.site.siteMetadata.title' is missing in props validation       react/prop-types
  18:11  error  Use object destructuring                                            prefer-destructuring
  18:24  error  Must use destructuring props assignment                             react/destructuring-assignment
  18:58  error  'data.allMarkdownRemark.totalCount' is missing in props validation  react/prop-types

✖ 66 problems (65 errors, 1 warning)
  8 errors and 0 warnings potentially fixable with the `--fix` option.
peterpme commented 5 years ago

Hey @basicdays,

Let me know when this is ready for merge! Awesome job 🔥

basicdays commented 5 years ago

Things should be ready for a merge.

Also this closes issue #16 since I caught that as I was updating parts of the package.json file.