Detalhes do pacote

eslint-plugin-camelcase-ohm

ohmlang165MIT0.2.1

An ESLint plugin that extends the built-in camelcase rule to allow underscores in semantic action names.

eslint, plugin, node, require

readme (leia-me)

eslint-plugin-camelcase-ohm

An ESLint plugin that extends the built-in camelcase rule to allow underscores in semantic action names.

When writing semantic actions for an Ohm grammar, it's typical to have functions with names like AddExp_plus. This plugin allows a single underscore to appear in the middle of an identifier, but otherwise enforces camel-case naming.

Usage

To use this plugin with ESLint:

  • Install this package as a dev dependency, e.g. npm install --save-dev eslint-plugin-camelcase-ohm.

  • Ensure the plugin is loaded, e.g. by adding the following to your .eslintrc file:

    "plugins": [
      "camelcase-ohm"
    ]
    
  • Enable the rule in your ESLint configuration, e.g.:

    "rules": {
      "camelcase-ohm/camelcase-ohm": 2
    }
    

See the ESLint documentation for more information.

changelog (log de mudanças)

!/bin/bash

Script to version, tag, and release a new version of the package.

Arguments are the same as npm version (https://docs.npmjs.com/cli/version).

set -e

function cleanup { echo git tag -d $(git log -1 --pretty=%B) # Delete the last tag git reset --hard HEAD^ exit 1 }

if [ "$#" -ne "1" ]; then echo "usage: $0 <newversion> | major | minor | patch | premajor" echo "<newversion> must be in semver format, e.g. 1.2.0." exit 1 fi

if [ "$(git status --porcelain | grep -v '??')" != "" ]; then echo "Error: git working directory not clean -- run 'git status' for more info." exit 1 fi

npm run prepublish npm version "$@" -m "v%s" trap cleanup INT read -p "Press [Enter] to publish this release..." git push --tags npm publish