0.0.9 • Published 4 years ago

pustovalov-ls-lint v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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
  • Docker support
  • Incredibly fast
  • Full unicode support
  • Almost zero third-party dependencies (only go-yaml)

Demo

Example & How-to (vue.js)

  • .ls-lint.yml file must be present in your root directory
  • Multiple rules supported by , - They are logicly AND combined
  • .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: regex:[a-z0-9\-]+
  .js: kebab-case
  .css: kebab-case
  .html: kebab-case
  .json: kebab-case
  .ts: kebab-case
  .sh: kebab-case
  .dev.js: kebab-case
  .prod.js: kebab-case
  .d.ts: kebab-case
  .vdom.js: kebab-case
  .spec.js: kebab-case

  dist:
    .js: point.case

  benchmarks/ssr:
    .js: camelCase

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

Install & Run

Binary

MacOS

curl -sL -o ls-lint https://github.com/loeffel-io/ls-lint/releases/download/v1.5.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.5.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.5.0/ls-lint-windows.exe
ls-lint-windows.exe

NPM

Install

# global
npm install -g @ls-lint/ls-lint

# local
npm install @ls-lint/ls-lint

Run

# global
ls-lint

# local
node_modules/.bin/ls-lint # use backslashs for windows

npx @ls-lint/ls-lint

Docker

docker run -t -v /path/to/files:/data lslintorg/ls-lint:1

Rules

RuleAliasDescription
regex-Checks if string matches regex pattern: ^{pattern}$
lowercase-Checks if every letter is lower; Skip non letters
camelcasecamelCaseChecks if string is camel case; Only letters allowed
pascalcasePascalCaseChecks if string is pascal case; Only letters allowed
snakecasesnake_caseChecks if string is snake case; Only letters and _ allowed
kebabcasekebab-caseChecks if string is kebab case; Only letters and - allowed
pointcasepoint.caseChecks if string is "point case"; Only letters and . allowed

Roadmap

  • Public and Private Registry to share configurations
  • Npm Windows package (one package for all os)
  • Docker support
  • Regex Rule
  • Windows support
  • Npm package
  • Add ignore directories and files

Benchmarks (hyperfine)

PackageMean sFile
vuejs/vue14.6 ms ± 1.1 msexamples/vuejs-vue

Logo

Logo created by Anastasia Marx

License

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

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago