Git Product home page Git Product logo

custom-eslint-config's Introduction

custom-eslint-config

An example repo for customizing eslint config in a custom env

Structure

In this repo we created a new custom-env using bit create react-env custom-env and a simple react component using bit create react-component ui/button;

The ui/button component is configured to use the custom-env (see in the workspace.jsonc file).

custom-env

The custom env is using the new API of useEslint (see more details in (this pr)[teambit/bit#4575]) It's mutating the default react env eslint config, and changing the no-console rule to show error for console.log instead of warning

Run this project

git clone https://github.com/teambit/custom-eslint-config.git
bit install
bit compile
bit lint

The bit lint will show an error in the button files, for the console.log in the button.tsx file. Removing the config.setRule('no-console', ['error']); in the custom-env.extension.ts file (followed by bit compile) will show the console.log as warning in bit lint.

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.