Giter Club home page Giter Club logo

eslint-config-ns's Introduction

eslint-config-ns

npm version GitHub license

In August 2018, I published an article with the title "How to create your own shared esLint, prettier and stylelint configuration" on Medium. One of the results of the article, is this shareable eslint-config (and the one for stylelint).

It lints your javascript projects with ease, based on the popular javascript code style from Airbnb.

Features

Installation

The default export contains all default Airbnb ESLint rules, including ECMAScript 6+, and the ones listed below. It requires some peerDependencies as well.

Install the package with

npm install eslint-config-ns --save-dev

# or
yarn add eslint-config-ns -D

Then install the correct versions of each peerDependency package, which are listed by the command:

npm info "eslint-config-ns@latest" peerDependencies

If using npm 5+, use this shortcut:

npx install-peerdeps --dev eslint-config-ns

# or
yarn add eslint-config-ns -D --peer

Usage

Now add the config to either your package.json:

{
  "eslintConfig": {
    "extends": "eslint-config-ns"
  }
}

to your .eslintrc:

{
  "extends": "eslint-config-ns"
}

or .eslintrc.js:

module.exports = {
  extends: 'eslint-config-ns',
}

Assumptions

This ESLint configuration comes with some fundamental assumptions:

  • react and/or node environment
  • jest as the selected test-suite
  • browser and/or node environment
  • parser: babel (used babel-eslint parser)

Even though I made some assumptions, you can easily overwrite, extend and unset rules and any other setting in your custom eslint config.

LICENCE

MIT

Maintainers


Stefan Natter

eslint-config-ns's People

Contributors

dependabot[bot] avatar natterstefan 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.