Giter Club home page Giter Club logo

ls-lint's Introduction

ls-lint

An extremely fast file and directory name linter

Build Status Go Report Card

  • Works for directory and file names (all extensions supported)
  • Linux, MacOS & Windows Support
  • Incredibly fast
  • Full unicode support
  • Almost zero third-party dependencies (only go-yaml)

Demo

command

Example & How-to (vue.js)

  • .ls-lint.yml file must be present in your root directory
  • Multiple rules supported by ,
  • .dir set rules for the current directory and their subdirectories
  • Rules for subdirectories will overwrite the rules for all their subdirectories
  • For Windows you must use backslashs \ instead of slashs /
# .ls-lint.yml

ls:
  .dir: kebab-case
  .js: kebab-case
  .css: kebab-case
  .html: kebab-case
  .json: kebab-case
  .ts: point.case
  .sh: kebab-case

  dist:
    .dir: kebab-case
    .js: point.case

  packages/vue-server-renderer:
    .dir: kebab-case
    .js: point.case
    .json: kebab-case

  types/test:
    .dir: kebab-case
    .js: kebab-case
    .json: kebab-case

ignore:
  - .babelrc.js
  - .eslintrc.js
  - .github
  - .circleci
  - .git
  - benchmarks
  - test

Install & Run

Binary

MacOS

curl -sL -o ls-lint https://github.com/loeffel-io/ls-lint/releases/download/v1.1.0/ls-lint-darwin && chmod +x ls-lint && ./ls-lint

Linux

curl -sL -o ls-lint https://github.com/loeffel-io/ls-lint/releases/download/v1.1.0/ls-lint-linux && chmod +x ls-lint && ./ls-lint

Windows

# (!) First download the .exe from https://github.com/loeffel-io/ls-lint/releases/download/v1.1.0/ls-lint-windows.exe
ls-lint-windows.exe

NPM

Install

# global
npm install -g ls-lint-linux # for Linux
npm install -g ls-lint-darwin # for macOS

# local
npm install ls-lint-linux # for Linux
npm install ls-lint-darwin # for macOS

Run

# global
ls-lint

# local
node_modules/.bin/ls-lint
npx ls-lint

Rules

Rule Alias Description
lowercase - Checks if every letter is lower; Skip non letters
camelcase camelCase Checks if string is camel case; Only letters allowed
pascalcase PascalCase Checks if string is pascal case; Only letters allowed
snakecase snake_case Checks if string is snake case; Only letters and _ allowed
kebabcase kebab-case Checks if string is kebab case; Only letters and - allowed
pointcase point.case Checks if string is "point case"; Only letters and . allowed

Roadmap

  • Npm Windows package
  • Color highlighting
  • Regex Rule
  • Docker support
  • Windows support
  • Npm package
  • Add ignore directories and files

License

ls-lint is open-source software licensed under the MIT license.

ls-lint's People

Contributors

loeffel-io 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.