Coder Social home page Coder Social logo

eslint-config-netconomy's Introduction

ESLint Configuration used by Netconomy

This is the ESLint base configuration used by Netconomy for our projects. Included are the following presets:

  • eslint-config-netconomy/react
  • eslint-config-netconomy/jquery
  • eslint-config-netconomy/nodejs

To use, for example, the React preset in your own ESLint configuration, simple add following line to your .eslintrc:

"extends": "netconomy/react"

You can find more information about this ESLint feature in the official documentation.

Note: If you want to use the React base configuration, you will also have to install the eslint-plugin-react package:

npm install --save-dev eslint-plugin-react

We try to keep this as up-to-date as possible with major ESLint releases. For details on how our version numbers relate to ESLint's please take a look at the CHANGELOG.md.

Version pinning

If you want to pin this package and its version to the ESLint version you're using within your project, you can also install both directly within your project ...

npm install --save-dev eslint
npm install --save-dev eslint-config-netconomy

and set the base configuration like this within your .eslintrc:

{
    "extends": "./node_modules/eslint-config-netconomy/react.js"
}

Test cases

In the tests folder you can find a list of files that will be tested against the provided ESLint configurations. Each file's name indicates what base-configuration will be used:

  • base-... will use the base configuration
  • jquery-... for the jQuery configuration
  • react-... for the React configuration
  • nodejs-... for the NodeJS configuration

If you expect rule violations in a test then you have to add a configuration header to that file. Let's say we are expecting the "eqeqeq" rule to be violated twice within the test file. In that case the header of that file should look like this:

//? {"eqeqeq": 2}

To run all the tests, execute npm install && npm test.

Local development and testing

During development you can clone this repo and make that version of eslint-config-netconomy globally available using npm link from within the root folder. After that you can refer to the configuration using something like ...

{
    "extends": "netconomy/react"
}

... within your .eslintrc as described above.

eslint-config-netconomy's People

Contributors

mzollneritsch-nc avatar zerok avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.