DSchau / blog

Code for my old (last updated 2020) blog built with Gatsby
https://blog.dustinschau.com
MIT License
170 stars 37 forks source link

Adding linting error #3

Closed lfilho closed 7 years ago

lfilho commented 7 years ago

Hey man, nice work with the blog post and this code! I'm checking it out and trying to play with it and I was trying to add xo for linting my project and prettier for formatting.

But then I get lots of errors, even some like not being able to find modules... Here's the output while running xo in your project:


> @dschau/blog@1.0.0 lint /Users/marelo/workspace/luiz-www
> xo

  src/utils/color.js:14:1
  ✖   14:1   Prefer default export.                                                                             import/prefer-default-export

  jest.transform.js:1:26
  ✖    1:26  Unable to resolve path to module babel-jest.                                                       import/no-unresolved

  src/services/web-fonts.js:13:32
  ✖   13:32  Unable to resolve path to module webfontloader.                                                    import/no-unresolved

  src/utils/__tests__/color.js:1:24
  ✖    1:24  Unable to resolve path to module ../color.                                                         import/no-unresolved

  gatsby-node.js:1:22
  ✖    1:22  Unable to resolve path to module path.                                                             import/no-unresolved
  ✖   69:14  reject is not defined.                                                                             no-undef

  gatsby-config.js:49:9
  ✖   49:9   Identifier short_name is not in camel case.                                                        camelcase
  ✖   50:9   Identifier background_color is not in camel case.                                                  camelcase
  ✖   51:9   Identifier theme_color is not in camel case.                                                       camelcase

  src/pages/404.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:1   react-helmet should be listed in the project's dependencies. Run npm i -S react-helmet to add it   import/no-extraneous-dependencies
  ✖    2:20  Unable to resolve path to module react-helmet.                                                     import/no-unresolved

  src/components/Footer.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to footer.js.                                             unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    4:25  Unable to resolve path to module ./SocialIcons.                                                    import/no-unresolved

  src/components/Date.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to date.js.                                               unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    4:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖   19:39  date is missing in props validation                                                                react/prop-types

  src/components/Content.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to content.js.                                            unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖   17:39  children is missing in props validation                                                            react/prop-types
  ✖   17:49  Footer is missing in props validation                                                              react/prop-types

  src/components/Tags.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to tags.js.                                               unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    3:24  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    5:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖   44:35  list is missing in props validation                                                                react/prop-types

  src/components/About.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to about.js.                                              unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    3:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖    5:25  Unable to resolve path to module ./SocialIcons.                                                    import/no-unresolved
  ✖    7:1   ../images/me.jpeg import should occur before import of ./SocialIcons                               import/order
  ✖    7:16  Unable to resolve path to module ../images/me.jpeg.                                                import/no-unresolved

  src/components/Link.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to link.js.                                               unicorn/filename-case
  ✖    1:8   React is defined but never used.                                                                   no-unused-vars
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    3:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖    4:1   gatsby-link import should occur before import of ../utils/typography                               import/order
  ✖    4:18  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    6:36  Unable to resolve path to module ../utils/color.                                                   import/no-unresolved

  src/components/SocialIcons.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to social-icons.js.                                       unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    4:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖    6:26  Unable to resolve path to module ./SocialButton.                                                   import/no-unresolved
  ✖   23:21  Prop className is forbidden on Components                                                          react/forbid-component-props
  ✖   24:21  Prop className is forbidden on Components                                                          react/forbid-component-props
  ✖   25:21  Prop className is forbidden on Components                                                          react/forbid-component-props

  src/utils/typography.js:1:1
  ✖    1:1   react-dom should be listed in the project's dependencies. Run npm i -S react-dom to add it         import/no-extraneous-dependencies
  ✖    1:8   ReactDOM is defined but never used.                                                                no-unused-vars
  ✖    1:22  Unable to resolve path to module react-dom/server.                                                 import/no-unresolved
  ✖    2:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    2:8   React is defined but never used.                                                                   no-unused-vars
  ✖    2:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    3:24  Unable to resolve path to module typography.                                                       import/no-unresolved
  ✖    4:24  Unable to resolve path to module typography-plugin-code.                                           import/no-unresolved
  ✖    5:36  Unable to resolve path to module typography-breakpoint-constants.                                  import/no-unresolved

  src/components/SocialButton.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to social-button.js.                                      unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    4:24  Unable to resolve path to module react-icons/lib/fa/github.                                        import/no-unresolved
  ✖    5:26  Unable to resolve path to module react-icons/lib/fa/facebook-square.                               import/no-unresolved
  ✖    6:25  Unable to resolve path to module react-icons/lib/fa/twitter.                                       import/no-unresolved
  ✖   27:14  children is missing in props validation                                                            react/prop-types
  ✖   68:40  type is missing in props validation                                                                react/prop-types

  src/components/Preview.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to preview.js.                                            unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    3:18  Unable to resolve path to module ./Post.                                                           import/no-unresolved
  ✖    6:3   children is missing in props validation                                                            react/prop-types
  ✖    7:3   excerpt is missing in props validation                                                             react/prop-types
  ✖    8:3   limit is missing in props validation                                                               react/prop-types
  ✖    8:3   limit is assigned a value but never used.                                                          no-unused-vars
  ✖    9:3   title is missing in props validation                                                               react/prop-types
  ✖   10:3   to is missing in props validation                                                                  react/prop-types

  src/components/PostTitle.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to post-title.js.                                         unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    3:18  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    5:36  Unable to resolve path to module ../utils/color.                                                   import/no-unresolved
  ✖    6:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖   58:37  children is missing in props validation                                                            react/prop-types
  ✖   58:47  title is missing in props validation                                                               react/prop-types
  ✖   58:54  to is missing in props validation                                                                  react/prop-types
  ✖   62:16  Prop className is forbidden on Components                                                          react/forbid-component-props

  src/templates/tags.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    3:24  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    5:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖    6:36  Unable to resolve path to module ../utils/color.                                                   import/no-unresolved
  ✖    8:8   Link is defined but never used.                                                                    no-unused-vars
  ✖    8:18  Unable to resolve path to module ../components/Link.                                               import/no-unresolved
  ✖    9:21  Unable to resolve path to module ../components/Preview.                                            import/no-unresolved
  ✖   43:22  text is missing in props validation                                                                react/prop-types
  ✖   51:32  pathContext is missing in props validation                                                         react/prop-types

  src/components/PostToolbar.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to post-toolbar.js.                                       unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    4:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖    6:30  Unable to resolve path to module ./NavigationButton.                                               import/no-unresolved
  ✖    7:22  Unable to resolve path to module ./Date.                                                           import/no-unresolved
  ✖   15:3   date is missing in props validation                                                                react/prop-types
  ✖   16:3   isPost is missing in props validation                                                              react/prop-types
  ✖   17:3   linkTo is missing in props validation                                                              react/prop-types
  ✖   17:3   linkTo is defined but never used.                                                                  no-unused-vars
  ✖   18:3   next is missing in props validation                                                                react/prop-types
  ✖   19:3   prev is missing in props validation                                                                react/prop-types
  ✖   20:3   title is missing in props validation                                                               react/prop-types

  src/pages/index.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:8   Link is defined but never used.                                                                    no-unused-vars
  ✖    2:18  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    3:1   react-helmet should be listed in the project's dependencies. Run npm i -S react-helmet to add it   import/no-extraneous-dependencies
  ✖    3:8   Helmet is defined but never used.                                                                  no-unused-vars
  ✖    3:20  Unable to resolve path to module react-helmet.                                                     import/no-unresolved
  ✖    5:8   PostDate is defined but never used.                                                                no-unused-vars
  ✖    5:22  Unable to resolve path to module ../components/Date.                                               import/no-unresolved
  ✖    6:21  Unable to resolve path to module ../components/Preview.                                            import/no-unresolved
  ✖    7:8   Tags is defined but never used.                                                                    no-unused-vars
  ✖    7:18  Unable to resolve path to module ../components/Tags.                                               import/no-unresolved
  ✖   19:33  data is missing in props validation                                                                react/prop-types
  ✖   19:39  location is missing in props validation                                                            react/prop-types
  ✖   43:26  graphql is not defined.                                                                            no-undef

  src/components/NavigationButton.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to navigation-button.js.                                  unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    3:18  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    4:22  Unable to resolve path to module react-icons/lib/fa/chevron-left.                                  import/no-unresolved
  ✖    5:25  Unable to resolve path to module react-icons/lib/fa/chevron-right.                                 import/no-unresolved
  ✖    7:36  Unable to resolve path to module ../utils/color.                                                   import/no-unresolved
  ✖    8:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖   57:38  children is missing in props validation                                                            react/prop-types
  ✖   57:48  to is missing in props validation                                                                  react/prop-types
  ✖   57:52  next is missing in props validation                                                                react/prop-types
  ✖   57:58  prev is missing in props validation                                                                react/prop-types
  ✖   61:19  Prop className is forbidden on Components                                                          react/forbid-component-props
  ✖   73:22  Prop className is forbidden on Components                                                          react/forbid-component-props

  src/html.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:1   prop-types should be listed in the project's dependencies. Run npm i -S prop-types to add it       import/no-extraneous-dependencies
  ✖    2:23  Unable to resolve path to module prop-types.                                                       import/no-unresolved
  ✖    3:1   react-helmet should be listed in the project's dependencies. Run npm i -S react-helmet to add it   import/no-extraneous-dependencies
  ✖    3:20  Unable to resolve path to module react-helmet.                                                     import/no-unresolved
  ✖    5:33  Unable to resolve path to module react-typography.                                                 import/no-unresolved
  ✖    6:24  Unable to resolve path to module ./utils/typography.                                               import/no-unresolved
  ✖    8:7   BUILD_TIME is assigned a value but never used.                                                     no-unused-vars
  ✖   12:5   propType "body" is not required, but has no corresponding defaultProp declaration.                 react/require-default-props
  ✖   22:11  Dangerous property dangerouslySetInnerHTML found                                                   react/no-danger
  ✖   23:21  Unexpected ! in !raw!../public/styles.css. Do not use import syntax to configure webpack loaders.  import/no-webpack-loader-syntax
  ✖   23:29  Unable to resolve path to module !raw!../public/styles.css.                                        import/no-unresolved
  ✖   39:23  headComponents is missing in props validation                                                      react/prop-types
  ✖   46:13  Dangerous property dangerouslySetInnerHTML found                                                   react/no-danger
  ✖   48:23  postBodyComponents is missing in props validation                                                  react/prop-types

  src/components/Header.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to header.js.                                             unicorn/filename-case
  ✖    1:34  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:18  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    3:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    5:29  Unable to resolve path to module ../json/particles-config.json.                                    import/no-unresolved
  ✖    5:29  Unexpected use of file extension "json" for "../json/particles-config.json"                        import/extensions
  ✖    7:1   Imported module should be assigned                                                                 import/no-unassigned-import
  ✖    7:8   Unable to resolve path to module ../css/particle-styles.css.                                       import/no-unresolved
  ✖    8:49  Unable to resolve path to module ../css/animations.                                                import/no-unresolved
  ✖   79:7   NoWrap is assigned a value but never used.                                                         no-unused-vars
  ✖   91:36  Unable to resolve path to module particles.js.                                                     import/no-unresolved
  ✖   92:16  A function with a name starting with an uppercase letter should only be used as a constructor.     new-cap
  ✖  108:15  Prop className is forbidden on Components                                                          react/forbid-component-props
  ✖  112:30  Do not use Array index in keys                                                                     react/no-array-index-key
  ✖  119:30  Do not use Array index in keys                                                                     react/no-array-index-key

  src/templates/blog-post.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:1   react-helmet should be listed in the project's dependencies. Run npm i -S react-helmet to add it   import/no-extraneous-dependencies
  ✖    2:20  Unable to resolve path to module react-helmet.                                                     import/no-unresolved
  ✖    3:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    5:18  Unable to resolve path to module ../components/Post.                                               import/no-unresolved
  ✖    6:18  Unable to resolve path to module ../components/Tags.                                               import/no-unresolved
  ✖    7:19  Unable to resolve path to module ../components/About.                                              import/no-unresolved
  ✖    9:30  Unable to resolve path to module ../css/animations.                                                import/no-unresolved
  ✖   11:1   Imported module should be assigned                                                                 import/no-unassigned-import
  ✖   11:1   prismjs should be listed in the project's dependencies. Run npm i -S prismjs to add it             import/no-extraneous-dependencies
  ✖   11:8   Unable to resolve path to module prismjs/themes/prism-okaidia.css.                                 import/no-unresolved
  ✖   22:36  data is missing in props validation                                                                react/prop-types
  ✖   22:47  location is missing in props validation                                                            react/prop-types
  ✖   22:57  pathContext is missing in props validation                                                         react/prop-types
  ✖   94:9   Prop className is forbidden on Components                                                          react/forbid-component-props
  ✖  109:26  graphql is not defined.                                                                            no-undef

  src/layouts/index.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:1   prop-types should be listed in the project's dependencies. Run npm i -S prop-types to add it       import/no-extraneous-dependencies
  ✖    2:23  Unable to resolve path to module prop-types.                                                       import/no-unresolved
  ✖    3:8   Link is defined but never used.                                                                    no-unused-vars
  ✖    3:18  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    4:1   react-helmet should be listed in the project's dependencies. Run npm i -S react-helmet to add it   import/no-extraneous-dependencies
  ✖    4:20  Unable to resolve path to module react-helmet.                                                     import/no-unresolved
  ✖    5:20  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    6:10  rhythm is defined but never used.                                                                  no-unused-vars
  ✖    6:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖    8:26  Unable to resolve path to module ../services/web-fonts.                                            import/no-unresolved
  ✖   10:21  Unable to resolve path to module ../components/Content.                                            import/no-unresolved
  ✖   11:20  Unable to resolve path to module ../components/Footer.                                             import/no-unresolved
  ✖   12:20  Unable to resolve path to module ../components/Header.                                             import/no-unresolved
  ✖   14:1   Imported module should be assigned                                                                 import/no-unassigned-import
  ✖   14:8   Unable to resolve path to module ../css/base.css.                                                  import/no-unresolved
  ✖   24:5   propType "children" is not required, but has no corresponding defaultProp declaration.             react/require-default-props
  ✖   32:23  location is missing in props validation                                                            react/prop-types

  src/components/Post.js:1:1
  ✖    1:1   react should be listed in the project's dependencies. Run npm i -S react to add it                 import/no-extraneous-dependencies
  ✖    1:1   Filename is not in kebab case. Rename it to post.js.                                               unicorn/filename-case
  ✖    1:19  Unable to resolve path to module react.                                                            import/no-unresolved
  ✖    2:38  Unable to resolve path to module styled-components.                                                import/no-unresolved
  ✖    3:1   ../utils/typography import should occur after import of react-icons/lib/md/list                    import/order
  ✖    3:24  Unable to resolve path to module ../utils/typography.                                              import/no-unresolved
  ✖    4:8   Link is defined but never used.                                                                    no-unused-vars
  ✖    4:18  Unable to resolve path to module gatsby-link.                                                      import/no-unresolved
  ✖    5:24  Unable to resolve path to module react-icons/lib/md/list.                                          import/no-unresolved
  ✖    7:23  Unable to resolve path to module ./PostTitle.                                                      import/no-unresolved
  ✖    8:21  Unable to resolve path to module ./PostToolbar.                                                    import/no-unresolved
  ✖    9:24  Unable to resolve path to module ./Link.                                                           import/no-unresolved
  ✖   11:1   Imported module should be assigned                                                                 import/no-unassigned-import
  ✖   11:8   Unable to resolve path to module ../css/posts.css.                                                 import/no-unresolved
  ✖   13:1   Expected an assignment or function call and instead saw an expression.                             no-unused-expressions
  ✖   94:3   children is missing in props validation                                                            react/prop-types
  ✖   95:3   className is missing in props validation                                                           react/prop-types
  ✖   96:3   date is missing in props validation                                                                react/prop-types
  ✖   97:3   html is missing in props validation                                                                react/prop-types
  ✖   98:3   linkTo is missing in props validation                                                              react/prop-types
  ✖   99:3   title is missing in props validation                                                               react/prop-types
  ✖  100:3   next is missing in props validation                                                                react/prop-types
  ✖  101:3   prev is missing in props validation                                                                react/prop-types
  ✖  110:9   now is assigned a value but never used.                                                            no-unused-vars
  ✖  112:11  Prop className is forbidden on Components                                                          react/forbid-component-props
  ✖  124:39  Dangerous property dangerouslySetInnerHTML found                                                   react/no-danger

  251 errors

Any clues of what might be going on and how to fix it? Here's my package.json (basically yours + xo stuff):

  "dependencies": {
    "gatsby": "~1.2.0",
    "gatsby-link": "~1.0.9",
    "gatsby-plugin-catch-links": "~1.0.1",
    "gatsby-plugin-google-analytics": "~1.0.1",
    "gatsby-plugin-manifest": "~1.0.1",
    "gatsby-plugin-offline": "~1.0.1",
    "gatsby-plugin-react-helmet": "~1.0.1",
    "gatsby-plugin-sharp": "~1.3.0",
    "gatsby-plugin-styled-components": "~1.0.1",
    "gatsby-remark-autolink-headers": "~1.0.1",
    "gatsby-remark-copy-linked-files": "~1.3.0",
    "gatsby-remark-images": "~1.3.1",
    "gatsby-remark-prismjs": "~1.2.0",
    "gatsby-remark-smartypants": "~1.0.1",
    "gatsby-source-filesystem": "~1.0.1",
    "gatsby-transformer-remark": "~1.1.0",
    "gatsby-transformer-sharp": "~1.0.1",
    "particles.js": "dschau/particles.js#f421a5bd31efd572842645884c803c0c09d364fe",
    "react-icons": "~2.2.5",
    "react-typography": "^0.15.0",
    "styled-components": "~2.1.1",
    "typography": "^0.15.8",
    "typography-breakpoint-constants": "^0.14.0",
    "typography-plugin-code": "^0.15.9",
    "webfontloader": "~1.6.28"
  },
  "devDependencies": {
    "babel-eslint": "^7.2.3",
    "babel-jest": "^20.0.3",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "eslint-config-prettier": "^2.3.0",
    "eslint-config-xo-react": "^0.13.0",
    "eslint-plugin-jest": "^20.0.3",
    "eslint-plugin-prettier": "^2.1.2",
    "eslint-plugin-react": "^7.1.0",
    "del-cli": "~1.1.0",
    "gh-pages": "^0.12.0",
    "jest": "~20.0.4",
    "prettier": "^1.5.3",
    "xo": "^0.18.2"
  },
  "keywords": [
    "gatsby",
    "blog",
    "react"
  ],
  "license": "MIT",
  "main": "n/a",
  "scripts": {
    "build": "gatsby build --prefix-paths",
    "clean": "del-cli \"public/**/*\" \".cache/**/*\"",
    "predeploy": "npm run clean && gatsby build --prefix-paths",
    "deploy": "deploy-to-ftp-server",
    "develop": "npm run start",
    "preserve": "gatsby build",
    "serve": "gatsby serve",
    "start": "gatsby develop --open",
    "format": "prettier --write --trailing-comma es5 --single-quote --no-semi '**/*.js' *.js",
    "lint": "xo",
    "test": "jest",
    "test:watch": "jest -- --watch"
  },
  "xo": {
    "space": 2,
    "semicolon": false,
    "parser": "babel-eslint",
    "extends": [
      "xo-react",
      "prettier",
      "plugin:jest/recommended",
      "prettier/react"
    ],
    "envs": [
      "es6",
      "node",
      "browser",
      "jest"
    ],
    "plugins": [
      "prettier",
      "jest",
      "react"
    ],
    "settings": {
      "import/resolver": [
        "webpack"
      ]
    },
    "rules": {
      "prettier/prettier": [
        "error",
        {
          "trailingComma": "es5",
          "singleQuote": true,
          "semi": false
        }
      ],
      "jest/no-disabled-tests": "warn",
      "jest/no-focused-tests": "error",
      "jest/no-identical-title": "error",
      "jest/valid-expect": "error"
    }
  }

Thank you in advance

DSchau commented 7 years ago

Hey, I am so sorry, I had this repo's issues muted (not sure why), so just taking a look at this.

I'll take a look tonight and try and get back to you. Thanks!

DSchau commented 7 years ago

Alrighty, I lied, I can just reply to this now.

So it's not really on me to support (sometimes opinionated!) linting rules, although I do think it has identified some real issues, e.g.

etc.

That said, if you're open to it, I'd gladly accept a PR adding linting, and fixing some common issues that many linters expose. I do, however, much prefer to use ESLint for this, rather than XO.

DSchau commented 7 years ago

Did it myself :) If you check out cf3119f, you can get a sense for the new linting rules

lfilho commented 7 years ago

Super! I'll give it a try in a few days, am currently moving to a new continent! 😂 Thank you!

DSchau commented 7 years ago

Safe travels then :) This can wait as long as you want, haha.