Git Product home page Git Product logo

facade-inspector's Introduction

Facade-Inspector

Neighborhoods.com Facade Team style guide & linting rules.

Scss

Uses sass-lint to lint scss files.

package-name: sass-lint-neighborhoods

Javascript

Based on AirBnb's JavaScript Style Guide

package-name: eslint-config-neighborhoods

Releasing

Version Scss and Javascript packages separately via the package.json.

For Github based releases follow semver but base off of both packages.

Example:

eslint-config-neighborhoods 1.2.2 => 2.0.0

release 1.6.2 => 2.0.0

facade-inspector's People

Contributors

cbourdage avatar jrubins avatar mattstypa avatar megan-starr9 avatar tpiecuch avatar zrosenbauer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

facade-inspector's Issues

Add documentation

We need to add docs to our linting for sass & js. I think this should also include desirables (js import order) etc. with a note it is not implemented via the linter

Rename repository

Should be more aptly named

Suggestions:

  • Neighborhoods-Facade-Code-Styles
  • Facade-Code-Styles
  • Neighborhoods-Facade-Code-Styleguide

etc.

Update rules with our conventions

Our Custom Linting Rules

  • displayName must always be included
  • doc Block for esdoc must be correct format
  • fetch and defer on components must be static and include dispatch
  • Static method/props, prop, constructor, LifeCycle methods, everything else, render last
  • Always bind in constructor

Our Available Linting Rules

  • 1 component per file
  • no _ prefixes
  • no extension
  • 140 max line lne
  • global require only
  • underscore dangle
  • react/jsx-boolean-value (remove)
  • require quotes around object literal property names
  • Restrict file extensions that may be required (tweak webpack)
  • only .jsx files may have JSX

Linting Issues & Questions

.eslintrc from Boilerplate...

{
    "import/prefer-default-export": 0,
    "padded-blocks": 0,
    "react/jsx-filename-extension": 0,
    "import/no-extraneous-dependencies": 0,
    "import/extensions": [0, {
      "js": "always",
      "jsx": "always",
      "json": "never"
    }],
    "no-underscore-dangle": 0,
    "space-before-function-paren": 0
 }
  • import/prefer-default-export => prefers a default export per file, which breaks with our action creator files
  • padding-blocks => I think should be up to the dev
  • react/jsx-filename-extension => only issue is the client.js file that contains some XML but is not truly a react file
  • import/no-extraneous-dependencies => redux-mock-store etc. not sure on issue here but seems a nuisance, will look into more this week
  • no-underscore-dangle => breaks any of our system global __SERVER__ || __DEVELOPMENT__
  • space-before-function-paren => do we want to support this? I prefer function() vs function () I think we should change the setting to "never" which would allow only the function()

Add unit tests

We should add unit tests for these at somepoint or at least a better way of testing than iterating via patches....

import-order plugin

It seems having current implementation is still missing the plugin somehow

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.