Giter VIP home page Giter VIP logo

eslint-plugin-no-unsafe-chars's Introduction

eslint-plugin-no-unsafe-chars

An eslint plugin that disallows german umlauts and other unsafe characters in function names, variable names and object property names.

Usage

  1. Install eslint-plugin-no-unsafe-chars as a dev-dependency:
$ npm install --save-dev eslint-plugin-no-unsafe-chars
  1. Enable the plugin by adding it to your .eslintrc:
plugins: [
  "no-unsafe-chars"
]

Configuration

You can disallow german umlauts (ä, ö and ü) with the rule no-umlauts.

You can disallow more chars with the custom rule. By default the disallowed custom char is the german ß. You can adjust the disallowed chars to your needs by setting the disallow option in your .eslintrc:

rules: {
    "no-unsafe-chars/no-umlauts": [2],
    "no-unsafe-chars/custom": [2, {"disallow": ['ß', '_', '-', 'é', 'à', 'ï']}]
}

As standard in eslint, set that first element to 1 to make this a warning instead of an error.

rules: {
    "no-unsafe-chars/no-umlauts": [1],
    "no-unsafe-chars/custom": [1]
}

License

MIT © Nils Neumann

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.