counsel-filename-format

0.4.1 • Public • Published

counsel-filename-format

add's a counsel.check task that enforces filename conventions in your project!

example

  • create your rule
'use strict'

const FilenameFormatRule = require('counsel-filename-format')
const kebab = require('lodash.kebabcase')

module.exports = new FilenameFormatRule({
  fileFormatExtensions: 'js',
  fileFormatExclude: ['*IGNORE*', '*docs/**/*.blah'], // <== `glob` matchers!
  fileFormatFunction: kebab // <== enforces all files are kebab-cased.  best case :)
})
  • run counsel.check(rules) (per counsel docs)

check will reject, and the process will exit w/ code 1 if unhandled.

Readme

Keywords

none

Package Sidebar

Install

npm i counsel-filename-format

Weekly Downloads

2

Version

0.4.1

License

ISC

Last publish

Collaborators

  • cdaringe