Giter Site home page Giter Site logo

eslint-config-vizeat's Introduction

Shareable Eslint Config by the VizEat Team

Shared ESLint config for JavaScript code produced by VizEat's Team.

Most of the rules are fixable and this config also make use of eslint-plug-prettier to configure & pilote prettier through eslint.

For everything to work well, we recommend that you don't use a prettier plugin in your editor alongside this configuration. Using eslint --fix will do it all, combined with format on save and format on paste you will get the most reliable formatting.

vizeat config

it contains generic rules for all JS projects (back & front)

vizeat/react config

it extends vizeat config and add JSX / React specific rules

vizeat/typescript config

it extends vizeat config and add Typescript specific rules as well as overrides for incompatible rules

Usage

The configuration requires a number of peer dependencies to be installed. This is due to how eslint plugin system works and how those dependencies are found in your file system.

Installing all (peer) dependencies for a project using any combination of configs

This is the easiest way of getting it working, but you may not need everything.

yarn add --dev @typescript-eslint/eslint-plugin @typescript-eslint/parser babel-eslint eslint eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-standard prettier

Installing (peer) dependencies for a project using the vizeat config

If you primarily use Node.js & vanilla JS, then this is likely enough

yarn add --dev eslint eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-standard prettier

Installing (peer) dependencies for a project using the vizeat/react config

For your React app

yarn add --dev babel-eslint eslint eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-standard prettier

Installing (peer) dependencies for a project using the vizeat/typescript config

For your TS project

yarn add --dev eslint eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-standard prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser

Configuration

Then, extend vizeat or vizeat/react or vizeat/typescript in your .eslintrc depending on the kind of projects you're working on. vizeat/react and vizeat/typescript extend vizeat config so for mixed projects (React + SSR) vizeat/react is enough.

{ "extends": ["vizeat"] }

or

{ "extends": ["vizeat/react"] }

or

{ 
  "extends": ["vizeat/typescript"],
  "parserOptions": {
    "project": "./tsconfig.json"
  }
}

(see typescript-eslint/parserOptions.project)

Happy hacking !

eslint-config-vizeat's People

Contributors

albanv avatar febeck avatar loun4 avatar p-j avatar renovate-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-config-vizeat's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

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.