Code Monkey home page Code Monkey logo

eslint-config-synacor's Introduction

eslint-config-synacor

npm Build Status Greenkeeper badge

Standard eslint rules for all Synacor javascript projects

Use these rules in your project

Installation

Add eslint-config-synacor as a development dependency for your project: npm i -D eslint-config-synacor

If you aren't already including eslint with your project, install that as a development dependency as well: npm i -D eslint.

Configuration

package.json

To specify for your entire project to use the global rules, add this as a clause in your package.json file:

"eslintConfig": {
	"extends": "eslint-config-synacor"
},

.eslintrc

Optionally (or in addition to your package.json setup), to specify to use the global rules in all subdirectories of a given directory, you can create a .eslintrc file with the contents

{
    extends: 'eslint-config-synacor'
}

Add/Override Rules For Tests test/.eslintrc

There are a set of overrides/rules for directories that contain unit tests. These are available in the test-rules submodule of the package. You can reference them via estlint-config-synacor/test-rules. So, to apply these as overrides in your tests/ directory, you would create a .eslintrc file in tests/. The contents of that file would look like:

{
    extends: 'eslint-config-synacor/test-rules'
}

Developing

All rule definition files are in src/rules. Edit/create rule files there.

Rules that are meant to be used for an entire project should go in files that are included by src/index.js.

Rules that are only meant to be run/overriden in test directories of a project should be included by src/test-rules.js.

eslint-config-synacor's People

Contributors

aneurysm9 avatar billneff79 avatar developit avatar greenkeeper[bot] avatar mesaugat avatar pl12133 avatar ruudud avatar silentsakky avatar

Watchers

 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.