PHPackages                             lin3s/cs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. lin3s/cs

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

lin3s/cs
========

The coding standards in the LIN3S way

v0.7.5(7y ago)315.0k1[1 PRs](https://github.com/LIN3S/CS/pulls)3MITPHPPHP ^7.1

Since Aug 1Pushed 5y ago2 watchersCompare

[ Source](https://github.com/LIN3S/CS)[ Packagist](https://packagist.org/packages/lin3s/cs)[ RSS](/packages/lin3s-cs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (31)Used By (3)

LIN3S CS
========

[](#lin3s-cs)

> The coding standards in the LIN3S way.

[![SensioLabsInsight](https://camo.githubusercontent.com/e24c26b845d0ef8b26e4893e20bfcdfbb868240879178e6872e67e8e21541b14/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f38353465656536652d313031662d343063612d613362652d6662343162303161626363392f6d696e692e706e67)](https://insight.sensiolabs.com/projects/854eee6e-101f-40ca-a3be-fb41b01abcc9)[![Build Status](https://camo.githubusercontent.com/eaee2f36619174bcaf49297fff4382f6526d3aa9187547817f581a74faa8f2be/68747470733a2f2f7472617669732d63692e6f72672f4c494e33532f43532e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/LIN3S/CS)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/43b38be1e8e84091fa61f04f6eaa43e978990cff7fe94f54330fb0e5bc70d9c7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c494e33532f43532f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/LIN3S/CS/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/661bbea5ffe7275208c931d7c55b3413c16eced2f3ded7f4ca072653ffda98ad/68747470733a2f2f706f7365722e707567782e6f72672f6c696e33732f63732f646f776e6c6f616473)](https://packagist.org/packages/lin3s/cs) [![Latest Stable Version](https://camo.githubusercontent.com/a1c822143eb10abeb696622534208b3567acfa076732f365968267fb299bdc08/68747470733a2f2f706f7365722e707567782e6f72672f6c696e33732f63732f762f737461626c652e737667)](https://packagist.org/packages/lin3s/cs)[![Latest Unstable Version](https://camo.githubusercontent.com/4b35940547efa2b1ccaa06c1468fcf4a6721b70b8402177ca0e507d34e10e956/68747470733a2f2f706f7365722e707567782e6f72672f6c696e33732f63732f762f756e737461626c652e737667)](https://packagist.org/packages/lin3s/cs)

WHY?
----

[](#why)

This package is created to centralize all the checks style of LIN3S projects, in an easy way to install all the tools and improving the maintainability. It is a flexible and customizable solution to automatize all related with coding standards. This library is focused to PHP, Javascript and Sass projects.

- Checks if [Composer](https://getcomposer.org/) json has changes, the lock must be committed too.
- Fixes the PHP code with fully customizable [PHP-CS-Fixer](http://cs.sensiolabs.org/).
- Lints the Twig files with [TwigCS](https://github.com/allocine/twigcs).
- Checks mess detections with [PHPMD](http://phpmd.org/).
- Checks the Sass best practices with [Stylelint](https://stylelint.io/).
- Checks the code quality of Javascript files with [ESLint](http://eslint.org/).

> This library is very focused to use as pre-commit hook so, this is the reason of [Git](https://github.com/LIN3S/CS/blob/master/src/Git/Git.php) PHP class exists. The checkers only validate the files that they are going to commit.

Prerequisites
-------------

[](#prerequisites)

[LIN3S](http://lin3s.com)'s CS is a PHP console application so, it requires [PHP](http://php.net/) itself. Apart of it, this library has the following requirements:

1. [Composer](https://getcomposer.org/)

```
$ curl -sS https://getcomposer.org/installer | php
```

2. [Node.js](https://nodejs.org/download/)

- [Stylelint](https://stylelint.io/)
- [Eslint](http://eslint.org/)

```
$ npm install -g stylelint
```

```
$ npm install -g eslint     # >= v4.0.0
$ npm install -g eslint-plugin-class-property eslint-plugin-react eslint-plugin-babel babel-eslint
```

Getting started
---------------

[](#getting-started)

The recommended and the most suitable way to install is through [Composer](https://getcomposer.org/). Be sure that the tool is installed in your system and execute the following command:

```
$ composer require lin3s/cs --dev

```

Then you have to update the `composer.json` with the following code:

```
"scripts": {
    "lin3scs-scripts": [
        "LIN3S\\CS\\Composer\\Hooks::buildDistFile",
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "LIN3S\\CS\\Composer\\Hooks::addHooks",
        "LIN3S\\CS\\Composer\\Hooks::addFiles"
    ]
},
"extra": {
    "incenteev-parameters": {
        "file": ".lin3s_cs.yml",
        "dist-file": ".lin3s_cs.yml.dist"
    },
    "scripts-dev": {
        "post-install-cmd": [
            "@lin3scs-scripts"
        ],
        "post-update-cmd": [
            "@lin3scs-scripts"
        ]
    }
}

```

> REMEMBER: The `.lin3s_cs.yml` file is generated dynamically with Composer. The best practices recommend that only track the `.dist` file ignoring the `.lin3s_cs.yml` inside `.gitignore`. In the same way, we recommend that, also, dynamically generated `.phpspec_cs`, `.php_cs`, `.stylelintrc.js`, `.eslintrc.js` and `.editorconfig` files, it should be ignored.

Use ESLint in a React.js environment
------------------------------------

[](#use-eslint-in-a-reactjs-environment)

In LIN3S are building a lot of projects with React.js so, keeping in mind the simplicity of the configuration process the following lin3s are our requirements to standardize the JS code inside this environment.

```
# .lin3s_cs.yml

parameters:

    # ...

    eslint_rules:
        plugins:
            # ...
            - react
        rules:
            react/display-name: off
            react/forbid-prop-types: off
            react/jsx-boolean-value: off
            react/jsx-closing-bracket-location: off
            react/jsx-curly-spacing: off
            react/jsx-indent-props: off
            react/jsx-max-props-per-line: off
            react/jsx-no-duplicate-props: error
            react/jsx-no-literals: off
            react/jsx-no-undef: error
            jsx-quotes: error
            react/jsx-sort-props: error
            react/jsx-uses-react: error
            react/jsx-uses-vars: error
            react/no-danger: error
            react/no-did-mount-set-state: error
            react/no-did-update-set-state: error
            react/no-direct-mutation-state: error
            react/no-set-state: off
            react/no-unknown-property: error
            react/prop-types: off
            react/react-in-jsx-scope: off
            react/require-extension: off
            react/self-closing-comp: off
            react/sort-comp: off
            react/sort-prop-types: error
            react/wrap-multilines: off
```

Licensing Options
-----------------

[](#licensing-options)

[![License](https://camo.githubusercontent.com/bafb850585db23818876f17e317d0c39f1bb14cdc96123ad277ec177c87eb048/68747470733a2f2f706f7365722e707567782e6f72672f6c696e33732f63732f6c6963656e73652e737667)](https://github.com/LIN3S/CS/blob/master/LICENSE)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~44 days

Recently: every ~76 days

Total

28

Last Release

2757d ago

PHP version history (2 changes)v0.4.0PHP ^5.5 || ^7.0

v0.5.0PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/b54f0877b7c31df24820fc1c55bd1a4dcda487dbe8ae5b031e6bf8362fecdfe4?d=identicon)[gorkalaucirica](/maintainers/gorkalaucirica)

![](https://www.gravatar.com/avatar/06308bfc15d8774c16d36d727f852c2d29ed8d0d6153637384439747776dc658?d=identicon)[benatespina](/maintainers/benatespina)

---

Top Contributors

[![benatespina](https://avatars.githubusercontent.com/u/3951376?v=4)](https://github.com/benatespina "benatespina (96 commits)")[![gorkalaucirica](https://avatars.githubusercontent.com/u/1749891?v=4)](https://github.com/gorkalaucirica "gorkalaucirica (3 commits)")[![jontorrado](https://avatars.githubusercontent.com/u/6916591?v=4)](https://github.com/jontorrado "jontorrado (1 commits)")

---

Tags

code-stylescoding-standardscomposereslintphp-cs-fixerpre-commitstylelint

### Embed Badge

![Health badge](/badges/lin3s-cs/health.svg)

```
[![Health](https://phpackages.com/badges/lin3s-cs/health.svg)](https://phpackages.com/packages/lin3s-cs)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[drupal/coder

Coder is a library to review Drupal code.

3043.6M461](/packages/drupal-coder)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
