Giter Site home page Giter Site logo

yyz945947732 / eslint-plugin-wittgenstein Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 50 KB

Make sure you use semantic variable names.

Home Page: https://www.npmjs.com/package/eslint-plugin-wittgenstein

License: MIT License

JavaScript 100.00%
eslint eslint-plugin eslintplugin variable wittgenstein eslint-plugin-variable eslint-plugin-variable-name semantic-variable variable-name

eslint-plugin-wittgenstein's Introduction

eslint-plugin-wittgenstein

CI Coverage Status NPM version PRs Welcome License

This plugin intends to let you use semantic variable names when naming variables.

 const show = true;
👌 const isShow = true;

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-wittgenstein:

npm install eslint-plugin-wittgenstein --save-dev

Usage

On your .eslintrc file extend the plugin's recommended configuration:

{
  "extends": ["plugin:wittgenstein/recommended"]
}

If you want to use your own configuration, you can do so by adding the plugin to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["wittgenstein"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "wittgenstein/variable-name-boolean": "warn"
  }
}

Rules

💡 Manually fixable by editor suggestions.

Name                  Description 💡
variable-name-array Make sure your array type variable name ends with List or s. 💡
variable-name-boolean Make sure your boolean type variable name start with is. 💡
variable-name-getter Make sure your getter function name start with get. 💡
variable-name-regex Make sure your regex type variable name ends with Regex. 💡

Contribution

Contribution is welcome! There are many ways you could help:

  • Triaging Issues
  • Writing Code
  • Improving Doc

If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository. Pull requests are also appreciated.

LICENSE

MIT

eslint-plugin-wittgenstein's People

Contributors

yyz945947732 avatar

Stargazers

 avatar

Watchers

 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.