All Projects → ember-cli → Ember Cli Eslint

ember-cli / Ember Cli Eslint

Licence: mit
Ember CLI addon for linting Ember projects with ESLint

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ember Cli Eslint

Ember Cli
The Ember.js command line utility
Stars: ✭ 3,314 (+2756.9%)
Mutual labels:  ember-cli, ember
Sharedrop
Easy P2P file transfer powered by WebRTC - inspired by Apple AirDrop
Stars: ✭ 5,222 (+4401.72%)
Mutual labels:  ember-cli, ember
Ember Decorators
Useful decorators for Ember applications.
Stars: ✭ 360 (+210.34%)
Mutual labels:  ember-cli, ember
eslint-plugin-ember-best-practices
Static analysis tools for enforcing best practices in Ember
Stars: ✭ 77 (-33.62%)
Mutual labels:  ember, eslint
Ember Simple Auth Auth0
Auth0 + lock.js, built on ember-simple-auth
Stars: ✭ 53 (-54.31%)
Mutual labels:  ember-cli, ember
Ember Exam
Run your tests with randomization, splitting, and parallelization for beautiful tests.
Stars: ✭ 262 (+125.86%)
Mutual labels:  ember-cli, ember
Ember Engines
Composable Ember applications for ambitious user experiences
Stars: ✭ 484 (+317.24%)
Mutual labels:  ember-cli, ember
git-task-list
Git Task Lists
Stars: ✭ 25 (-78.45%)
Mutual labels:  ember-cli, ember
Ember Cli Updater
ember-cli addon to help you update your ember-cli application or addon.
Stars: ✭ 32 (-72.41%)
Mutual labels:  ember-cli, ember
Mber
Fast and minimal Ember.js CLI alternative, without broccoli.
Stars: ✭ 30 (-74.14%)
Mutual labels:  ember-cli, ember
ember-credit-card
"make your credit card form dreamy in one line of code"
Stars: ✭ 89 (-23.28%)
Mutual labels:  ember-cli, ember
Ember Cli Bundle Analyzer
Analyze the size and contents of your Ember app's bundles
Stars: ✭ 78 (-32.76%)
Mutual labels:  ember-cli, ember
ember-polaris
An Ember addon for Shopify's Polaris design system
Stars: ✭ 59 (-49.14%)
Mutual labels:  ember-cli, ember
Ember Cli Page Object
This ember-cli addon eases the construction of page objects on your acceptance and integration tests
Stars: ✭ 272 (+134.48%)
Mutual labels:  ember-cli, ember
ember-luxon
🕐 🌐 [deprecated] Addon thats brings Luxon to Ember applications.
Stars: ✭ 20 (-82.76%)
Mutual labels:  ember-cli, ember
Ember Infinity
⚡️ Simple, flexible Infinite Scroll for Ember CLI Apps.
Stars: ✭ 368 (+217.24%)
Mutual labels:  ember-cli, ember
cli-guides
Step-by-step guides and tutorials for using the ember-cli to create apps and addons
Stars: ✭ 22 (-81.03%)
Mutual labels:  ember-cli, ember
ember-cli-new-version
A convention based update notification for Ember. With this addon, you can detect a new version and notify the user to refresh the page
Stars: ✭ 22 (-81.03%)
Mutual labels:  ember-cli, ember
Rfcs
RFCs for changes to Ember
Stars: ✭ 731 (+530.17%)
Mutual labels:  ember-cli, ember
Ember Cli Coffeescript
Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.
Stars: ✭ 72 (-37.93%)
Mutual labels:  ember-cli, ember

ember-cli-eslint

Latest NPM release TravisCI Build Status Ember Observer Score

ESLint for Ember CLI apps and addons

Installation

ESLint 4 (for Node 4 and above):

ember install [email protected]

ESLint 3 (for Node 4 and above):

ember install [email protected]

ESLint 2 (for Node 0.10 and above):

ember install [email protected]

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.

Configuration

ember-cli-eslint can be configured through the eslint key in your ember-cli-build.js file:

let app = new EmberApp(defaults, {
  eslint: {
    testGenerator: 'qunit',
    group: true,
    rulesDir: 'eslint-rules',
    extensions: ['js'],
  }
});
  • testGenerator is automatically detected if ember-qunit/ember-cli-qunit or ember-mocha/ember-cli-mocha are used, but can also be set to qunit and mocha manually.

  • group can be set to false to go back to the previous behavior where every generated test was contained in its own separate module.

  • rulesDir is the name of the directory for your custom eslint rules. It defaults to eslint-rules.

  • extensions is an array containing the file extensions to lint. If you want to lint JavaScript and TypeScript files for example it should be set to ['js', 'ts']. NOTE: If you add Typescript files @typescript/eslint-parser has to be installed and specified as the parser. For more information take a look at the @typescript/eslint-parser

On Build Files

Please note that if you are using this to lint files which are part of the build process (ie. index.js, ember-cli-build.js, config/), whether in an application or as part of an addon, they will not be linted. It is recommended that eslint is setup separately to lint these files and can be setup as an npm script and run as part of a CI process.

Contributing

Installation

  • git clone this repository
  • cd ember-cli-eslint
  • 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
  • ember try:each

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Running the dummy application

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

License

This project is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].