All Projects β†’ PaulRosset β†’ Linter Farch

PaulRosset / Linter Farch

Licence: mit
Make sure the filenames stay the same, control them! πŸ‘

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Linter Farch

Reviewdog
🐢 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+4396.04%)
Mutual labels:  linter, cli
Eslint Watch
ESLint with simple watching capabilities
Stars: ✭ 159 (+57.43%)
Mutual labels:  linter, cli
Eyo
πŸ¦” CLI for restoring the letter Β«Ρ‘Β» (yo) in russian texts
Stars: ✭ 119 (+17.82%)
Mutual labels:  linter, cli
Arkit
JavaScript architecture diagrams and dependency graphs
Stars: ✭ 671 (+564.36%)
Mutual labels:  cli, architecture
Phpinsights
πŸ”° Instant PHP quality checks from your console
Stars: ✭ 4,442 (+4298.02%)
Mutual labels:  cli, architecture
Isort
A Python utility / library to sort imports.
Stars: ✭ 4,377 (+4233.66%)
Mutual labels:  linter, cli
Protolint
A pluggable linter and fixer to enforce Protocol Buffer style and conventions.
Stars: ✭ 142 (+40.59%)
Mutual labels:  linter, cli
Singel
Single Element Pattern
Stars: ✭ 404 (+300%)
Mutual labels:  linter, cli
Undercover
Actionable code coverage - detects untested code blocks in recent changes
Stars: ✭ 574 (+468.32%)
Mutual labels:  linter, cli
Lintly
Automated GitHub PR code reviewer for Python, JavaScript, CSS, and more.
Stars: ✭ 91 (-9.9%)
Mutual labels:  linter, cli
Cryptocurrency Cli
πŸ’° Cryptocurrency Portfolio On The Command Line πŸ’°
Stars: ✭ 99 (-1.98%)
Mutual labels:  cli
Cli
Yet another Crystal library for building command-line interface applications.
Stars: ✭ 99 (-1.98%)
Mutual labels:  cli
Ask Cli
Alexa Skills Kit Command Line Interface
Stars: ✭ 100 (-0.99%)
Mutual labels:  cli
Sysbox
sysadmin/scripting utilities, distributed as a single binary
Stars: ✭ 101 (+0%)
Mutual labels:  cli
Vueneue
DEPRECATED: go to UVue
Stars: ✭ 99 (-1.98%)
Mutual labels:  cli
Cli Engine
Stars: ✭ 100 (-0.99%)
Mutual labels:  cli
Rundeck Cli
CLI tool for Rundeck
Stars: ✭ 98 (-2.97%)
Mutual labels:  cli
Cleanarchitecture
An example of how to implement various clean coding & architecture techniques. Technologies used: .Net Core, Razor Pages, EF Core, Bootstrap 4
Stars: ✭ 98 (-2.97%)
Mutual labels:  architecture
Transit Map
Generate a schematic map (β€œmetro map”) for a given (transit) network graph using Mixed Integer Programming.
Stars: ✭ 98 (-2.97%)
Mutual labels:  cli
Gql
Very simple CLI for many GraphQL schemas in the cloud. Provides autocompletion for GraphQL queries
Stars: ✭ 101 (+0%)
Mutual labels:  cli



farch


Make sure the file-names stay the same, control them! πŸ‘

Travis CI Build Status npm version Code Coverage

Motivation

More and more frameworks that have been created recently gave the possibility to the user to write content in markdown, like Gatsby or Docusaurus, but sometimes if you collaborate with multiples people on these markdown files, keeping a clean file-name is more important than ever. That's why I created this tiny linter to force people to respect a file-name architecture in order the keep everything clean and understandable.
Of course, many other usages can be considered.

Install

yarn add --dev linter-farch

Usage

Once installed, a small and quick configuration is needed in the package.json file.
The package.json file is used here, to avoid creating another file with a purpose of configuration.

Configuration:

For the configuration, two possibles way can be taken, the first is the package.json file like below (essentially for the JS project and if you don't want to create another config file):

In the package.json file:

{
  "farch": {
    "src": "([a-z]*-[0-9]{4})[.]*[a-z]*",
    "src/utilities": "[a-z]*",
    "src/utilities/*.js": "[a-z]"
  }
}

You can use glob as key/path to provide more flexibility to capture the wanted files.

  • Creating regex can be hard or simply boring, that's why you can simply put template placeholder like this:
{
  "farch": {
    "src": "([a-z]*-[0-9]{4})[.]*[a-z]*",
    "src/utilities": ["LOWER_CAMEL_CASE_JS", "[a-z]*"],
    "src/utilities/*.js": "[a-z]"
  }
}

You can find any template placeholder already created here, feel free to contribute by adding more template/placeholder regex. The keys have to be of the following form: "XXXXXX_XXX_YY", where _XXX is the name and YY the extension of the file that we want to test.


But, there is still the possibility to create a farch.json config file at the root of the project, essentially for the non-js project or if you don't want to put the configuration in your package.json.

{
  "farch": {
    "src": "([a-z]*-[0-9]{4})[.]*[a-z]*",
    "src/utilities": "[a-z]*"
  }
}

farch.json file have the priority over the package.json file.

Inside the farch property, insert the directory that you want to test:
Pass as key, the path from the root directory to the target directory, then in value pass regex to match.

Then, you are all set!

Execution

To avoid creating tons of rules if you have a lot of directory nested and they apply to the same assertion you can pass -R, hence it will recursively check all the directory.

At the root of your project:

npx farch

or

Insert it in your package.json file:

{
  "scripts": {
    "test": "farch ((-R))"
  }
}

And run CI on it !

Output

output-farch

License

MIT Paul Rosset

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].