Giter VIP home page Giter VIP logo

devdevdany / turris-reforis-eslint-config-reforis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from turris-cz/reforis-eslint-config-reforis

0.0 0.0 0.0 243 KB

ESLint configuration of reForis project that statically analyzes code to quickly find problems.

Home Page: https://gitlab.nic.cz/turris/reforis/eslint-config-reforis

License: GNU General Public License v3.0

Shell 4.40% JavaScript 88.18% Makefile 7.42%

turris-reforis-eslint-config-reforis's Introduction

eslint-config-reforis

npm version code style: prettier License: GPL v3

ESLint shareable configuration for reForis and its plugins. It lints javascript with ease, based on the popular javascript code style from Airbnb.

The config is built upon Airbnb's ESLint rules with additional rules and optimizations.

Features

Installation

Install the package with

npm install eslint-config-reforis --save-dev

eslint-config-reforis requires you to take care of it's peerDependencies. Install the correct version of each peerDependencies package, which are listed with the following command:

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

If using npm 5+, use this shortcut:

npx install-peerdeps --dev eslint-config-reforis

Usage

Now add eslint-config-reforis to either your package.json:

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

to your .eslintrc:

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

or .eslintrc.js:

module.exports = {
    extends: "eslint-config-reforis",
};

Prettier Config

This is how you can use or extend the eslint-config-reforis prettier config in your app:

// prettier.config.js
module.exports = require("eslint-config-reforis/prettier.config");

Development

Shareable configs are simply npm packages that export a configuration object.

You can also test your shareable config on your computer before publishing by installing or linking your module globally. Type:

Linking module

Go to the local module directory (package you want to install) and enter this command.

npm link

Then, in your project that wants to use your shareable config, type:

npm link eslint-config-reforis

Installing module

In the project where you want to use your shareable config, type:

npm install /path-to-eslint-config-reforis

Using a Shareable Config

Shareable configs are designed to work with the extends feature of .eslintrc files. Instead of using a file path for the value of extends, use your module name. For example, in your project that wants to use your shareable config:

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

LICENSE

GPL-3.0-or-later

turris-reforis-eslint-config-reforis's People

Contributors

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