Giter Club home page Giter Club logo

ember-cli-eslint's Introduction

ember-cli-eslint

Latest NPM release TravisCI Build Status Ember Observer Score

ESLint for Ember CLI apps and addons

Installation

ESLint 3 (for Node 4 and above):

ember install ember-cli-eslint@3

ESLint 2 (for Node 0.10 and above):

ember install ember-cli-eslint@2

After installation, an .eslintrc.js file will be placed in both the root of your project and the /tests directory.

Furthermore, a .eslintignore file can be used to exclude files from linting while the linter is running. Its syntax is identical to .gitignore files.

Disabling JSHint

Congratulations! You've made the leap into the next generation of JavaScript linting. At the moment, however, ember-cli defaults to generating applications and addons with a jshint configuration.

If you notice the two awkwardly running side by side, click here!

ember-cli >= 2.5.0

As of ember-cli v.2.5.0, jshint is provided through its own ember-cli-jshint addon. Running npm uninstall --save-dev ember-cli-jshint, in addition to removing any .jshintrc files from your project should guarantee that its behavior is disabled.

ember-cli < 2.5.0

Controlling linting is a bit trickier on versions of ember-cli prior to 2.5.0. Within your ember-cli-build.js file, ember-cli-qunit or ember-cli-mocha can be configured to have their default linting process disabled during:

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    'ember-cli-qunit': {
      useLintTree: false
    }
  });
};

or

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    'ember-cli-mocha': {
      useLintTree: false
    }
  });
};

Alongside this setting, the hinting property can then be used to enable/disable globally:

const isTesting = process.env.EMBER_ENV === 'test';

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    hinting: !isTesting,
  });
};

Usage

ESLint will be run by ember-cli-qunit or ember-cli-mocha automatically when you run ember test. If ESLint is not being run automatically, try updating your ember-cli and/or ember-cli-qunit/ember-cli-mocha dependencies.

Contributing

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://ember-cli.com/.

License

This project is licensed under the MIT License.

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.