{"id":15096862,"url":"https://github.com/lin3s/cs","last_synced_at":"2026-02-19T02:02:12.767Z","repository":{"id":62517282,"uuid":"39885640","full_name":"LIN3S/CS","owner":"LIN3S","description":"The coding standards in the LIN3S way","archived":false,"fork":false,"pushed_at":"2020-10-02T10:47:45.000Z","size":108,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-19T16:27:03.250Z","etag":null,"topics":["code-styles","coding-standards","composer","eslint","php-cs-fixer","pre-commit","stylelint"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LIN3S.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-29T09:40:16.000Z","updated_at":"2021-03-08T11:35:57.000Z","dependencies_parsed_at":"2022-11-02T13:31:06.170Z","dependency_job_id":null,"html_url":"https://github.com/LIN3S/CS","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/LIN3S/CS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIN3S%2FCS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIN3S%2FCS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIN3S%2FCS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIN3S%2FCS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LIN3S","download_url":"https://codeload.github.com/LIN3S/CS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIN3S%2FCS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29600845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"online","status_checked_at":"2026-02-19T02:00:07.702Z","response_time":117,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-styles","coding-standards","composer","eslint","php-cs-fixer","pre-commit","stylelint"],"created_at":"2024-09-25T16:01:58.134Z","updated_at":"2026-02-19T02:02:12.741Z","avatar_url":"https://github.com/LIN3S.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LIN3S CS\n\u003e The coding standards in the LIN3S way.\n\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/854eee6e-101f-40ca-a3be-fb41b01abcc9/mini.png)](https://insight.sensiolabs.com/projects/854eee6e-101f-40ca-a3be-fb41b01abcc9)\n[![Build Status](https://travis-ci.org/LIN3S/CS.svg?branch=master)](https://travis-ci.org/LIN3S/CS)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/LIN3S/CS/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/LIN3S/CS/?branch=master)\n[![Total Downloads](https://poser.pugx.org/lin3s/cs/downloads)](https://packagist.org/packages/lin3s/cs)\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n[![Latest Stable Version](https://poser.pugx.org/lin3s/cs/v/stable.svg)](https://packagist.org/packages/lin3s/cs)\n[![Latest Unstable Version](https://poser.pugx.org/lin3s/cs/v/unstable.svg)](https://packagist.org/packages/lin3s/cs)\n\n## WHY?\nThis package is created to centralize all the checks style of LIN3S projects, in an easy way to install all the tools\nand improving the maintainability. It is a flexible and customizable solution to automatize all related with coding\nstandards. This library is focused to PHP, Javascript and Sass projects.\n\n* Checks if [Composer][3] json has changes, the lock must be committed too.\n* Fixes the PHP code with fully customizable [PHP-CS-Fixer][8].\n* Lints the Twig files with [TwigCS][12].\n* Checks mess detections with [PHPMD][10].\n* Checks the Sass best practices with [Stylelint][5].\n* Checks the code quality of Javascript files with [ESLint][7].\n\n\u003e This library is very focused to use as pre-commit hook so, this is the reason of [Git][11] PHP class exists. The\ncheckers only validate the files that they are going to commit.\n\n## Prerequisites\n[LIN3S][1]'s CS is a PHP console application so, it requires [PHP][2] itself. Apart of it, this library has the\nfollowing requirements:\n\n1. [Composer][3]\n```bash\n$ curl -sS https://getcomposer.org/installer | php\n```\n2. [Node.js][6]\n * [Stylelint][5]\n * [Eslint][7]\n```bash\n$ npm install -g stylelint\n```\n```bash\n$ npm install -g eslint     # \u003e= v4.0.0\n$ npm install -g eslint-plugin-class-property eslint-plugin-react eslint-plugin-babel babel-eslint\n```\n\n## Getting started\nThe recommended and the most suitable way to install is through [Composer][3]. Be sure that the tool is installed in\nyour system and execute the following command:\n```\n$ composer require lin3s/cs --dev\n```\nThen you have to update the `composer.json` with the following code:\n```\n\"scripts\": {\n    \"lin3scs-scripts\": [\n        \"LIN3S\\\\CS\\\\Composer\\\\Hooks::buildDistFile\",\n        \"Incenteev\\\\ParameterHandler\\\\ScriptHandler::buildParameters\",\n        \"LIN3S\\\\CS\\\\Composer\\\\Hooks::addHooks\",\n        \"LIN3S\\\\CS\\\\Composer\\\\Hooks::addFiles\"\n    ]\n},\n\"extra\": {\n    \"incenteev-parameters\": {\n        \"file\": \".lin3s_cs.yml\",\n        \"dist-file\": \".lin3s_cs.yml.dist\"\n    },\n    \"scripts-dev\": {\n        \"post-install-cmd\": [\n            \"@lin3scs-scripts\"\n        ],\n        \"post-update-cmd\": [\n            \"@lin3scs-scripts\"\n        ]\n    }\n}\n```\n\n\u003e REMEMBER: The `.lin3s_cs.yml` file is generated dynamically with Composer. The best practices recommend that only\ntrack the `.dist` file ignoring the `.lin3s_cs.yml` inside `.gitignore`. In the same way, we recommend that, also,\ndynamically generated `.phpspec_cs`, `.php_cs`, `.stylelintrc.js`, `.eslintrc.js` and `.editorconfig` files, it should\nbe ignored.\n\n## Use ESLint in a React.js environment\nIn LIN3S are building a lot of projects with React.js so, keeping in mind the simplicity of the configuration process\nthe following lin3s are our requirements to standardize the JS code inside this environment.\n\n```yml\n# .lin3s_cs.yml\n\nparameters:\n\n    # ...\n\n    eslint_rules:\n        plugins:\n            # ...\n            - react\n        rules:\n            react/display-name: off\n            react/forbid-prop-types: off\n            react/jsx-boolean-value: off\n            react/jsx-closing-bracket-location: off\n            react/jsx-curly-spacing: off\n            react/jsx-indent-props: off\n            react/jsx-max-props-per-line: off\n            react/jsx-no-duplicate-props: error\n            react/jsx-no-literals: off\n            react/jsx-no-undef: error\n            jsx-quotes: error\n            react/jsx-sort-props: error\n            react/jsx-uses-react: error\n            react/jsx-uses-vars: error\n            react/no-danger: error\n            react/no-did-mount-set-state: error\n            react/no-did-update-set-state: error\n            react/no-direct-mutation-state: error\n            react/no-set-state: off\n            react/no-unknown-property: error\n            react/prop-types: off\n            react/react-in-jsx-scope: off\n            react/require-extension: off\n            react/self-closing-comp: off\n            react/sort-comp: off\n            react/sort-prop-types: error\n            react/wrap-multilines: off\n```\n\n## Licensing Options\n[![License](https://poser.pugx.org/lin3s/cs/license.svg)](https://github.com/LIN3S/CS/blob/master/LICENSE)\n\n[1]: http://lin3s.com\n[2]: http://php.net/\n[3]: https://getcomposer.org/\n[5]: https://stylelint.io/\n[6]: https://nodejs.org/download/\n[7]: http://eslint.org/\n[8]: http://cs.sensiolabs.org/\n[10]: http://phpmd.org/\n[11]: https://github.com/LIN3S/CS/blob/master/src/Git/Git.php\n[12]: https://github.com/allocine/twigcs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flin3s%2Fcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flin3s%2Fcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flin3s%2Fcs/lists"}