Giter Site home page Giter Site logo

rwjblue / eslint-plugin-ember-best-practices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ember-best-practices/eslint-plugin-ember-best-practices

0.0 2.0 0.0 243 KB

Static analysis tools for enforcing best practices in Ember

License: MIT License

JavaScript 100.00%

eslint-plugin-ember-best-practices's Introduction

Ember Best Practices

Build Status Coverage Status npm version

This adds more guard rails for Ember. Just because something "works" does not mean it is correct or in line with the framework's programming model. These footguns include:

  • Not adhering to Data Down Actions Up
  • Side-effect programming
  • Usage of observers
  • Usage of attrs.*
  • Computed properties without dependent keys

Why

As we've scaled out to over hundreds developers and thousands of lines of code it has become clear that more "development time" guidance is required. While the guides do a good job about getting started, it's good to have some friction to make sure the app code is aligned with how Ember works.

Using the plugin with Ember CLI

Installation

Install the plugin as a dev dependency in your Ember CLI project.

npm install --save-dev eslint-plugin-ember-best-practices

This will make the plugin available to ESLint.

Next, install the ember-cli-eslint addon so that your app can be linted during development and testing. This will also uninstall ember-cli-jshint since there is no need to have both linters running at the same time.

ember install ember-cli-eslint

Configuration

The ember-cli-eslint addon blueprint generates a .eslintrc.js configuration file at the root of the project.

Add the plugin's recommended configuration to the list of extensions:

// .eslintrc.js

module.exports = {
  // ...
  extends: [
    'eslint:recommended',
    'plugin:ember-best-practices/recommended'
  ],
  rules: {
  }
};

eslint-plugin-ember-best-practices's People

Contributors

chadhietala avatar scalvert avatar nlfurniss avatar trentmwillis avatar rwjblue avatar lynchbomb avatar hjdivad avatar mriska avatar shamcode avatar stefanpenner avatar tmquinn avatar bravo-kernel avatar cryrivers avatar ember-tomster avatar steventsao avatar seanjohnson08 avatar sangm avatar tricknotes avatar kturney avatar kategengler avatar jrowlingson avatar knownasilya avatar eflanagan0 avatar eddie-ruva avatar runspired avatar

Watchers

James Cloos avatar  avatar

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.