Code Monkey home page Code Monkey logo

study-eslint's Introduction

study-eslint

A template for study how to use ESLint selectors and write your own ESLint rules.

Install

# if you don't have pnpm
$ npm i -g pnpm
$ pnpm install

Run ESLint

$ pnpm lint

Add your own selectors

Edit packages/eslint-plugin/src/configs/selectors.js and run pnpm lint again.

Write your own rules

  1. Add your rule to packages/eslint-plugin/src/rules/your-own-rule.js.
  2. Import your rule into packages/eslint-plugin/index.js.
    rules: {
      'your-own-rule': require('./src/rules/your-own-rule'),
    },
    
  3. Add it into packages/my-app/.eslintrc.js.
    rules: {
      '@study-eslint/your-own-rule': 'error',
    },
    

License

This project is licensed under the terms of the MIT license.

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.