ESLint configuration for Trussle

Downloads in past


3.1.48 years ago8 years agoMinified + gzip package size for eslint-config-trussle in KB


ESLint Configuration for Trussle
npm version
This repository collects a bunch of standard ESLint files for Trussle repositories.


Add the package to your devDependencies:
npm install --save-dev eslint-config-trussle

Next, create a file .eslintrc.js in the root directory of your project pointing to the coding standard:
module.exports = {
  extends: "trussle",

  // You will need to set up an environment:
  // see
  // for more information.
  env: {
    // node: true,
    // mocha: true,
    // browser: true,
    // jasmine: true,

ESLint allows nested configuration, allowing you to choose different configurations for your tests, server-side and client-side code. Check out their website for documentation.

Migrating Older Code

For older (ES5) code, try the following:
  • Install eslint-config-trussle.
  • Fix any indentation issues you have with some editor-fu.
  • Run the auto-fixer with eslint --fix .
  • Fix the rest of the violations manually, either by fixing the issue or adding a special rule to your project.

Changing the Rules

  • Have a good reason for changing the rule, and write it as a comment near the rule in .eslint.js.
  • Bump the version number:
- 0.0.0 => 1.0.1 for rule configuration changes. - 0.0.x => 0.1.x for added or removed rules. - 0.x.x => 1.x.x for major changes (new ESLint version, etc.).
  • Commit, push, and update the package in the project you're working on.