reyesoft / ci
Library to fix common errors in php and keep a clean code
Installs: 37 130
Dependents: 10
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Open Issues: 11
Requires
- friendsofphp/php-cs-fixer: ^3.56
- phpmd/phpmd: ^2.15
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1
- phpstan/phpstan-strict-rules: ^1
Requires (Dev)
- phpunit/phpunit: ^10.1.3
Suggests
- larastan/larastan: 2.9.6
- dev-js1.1
- 2.0.1
- 2.0.0
- v1.4.x-dev
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- v1.3.x-dev
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- v1.2.x-dev
- 1.2.0
- v1.1.x-dev
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.2
- 1.0.1
- 1.0.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.5
- 0.0.5-rc1
- 0.0.3
- 0.0.1
- dev-php2.0
- dev-addeed/blank_line_after_opening_tag
- dev-upgrade/php81
- dev-php1.4
- dev-improvement/upgrade-packages
- dev-BE-actualizar-reysoft-ci
- dev-dependabot/npm_and_yarn/json5-2.2.3
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-changed/all-dependecies-upgraded
- dev-dependabot/npm_and_yarn/ws-7.5.5
- dev-FE-290-reyesoft-ci-mejorar-la-libreria-a
- dev-dependabot/npm_and_yarn/tmpl-1.0.5
- dev-changed/dependecies_update
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-update/cs-fixer
- dev-fix/coverage-checker
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-php-codesniffer-updated-version-3.5.8
- dev-phpcpd-updated-to-version-6
- dev-dependabot/npm_and_yarn/y18n-4.0.1
- dev-FE-219-reyesoft-ci-reemplazar-sass-lint-
- dev-changed/ts_lint_upgraded
- dev-changed/packaged_upgraded
- dev-php1.3
- dev-upgrade/sebastian/phpcpd
- dev-remove/unncesary_dependecy
This package is auto-updated.
Last update: 2024-12-03 17:55:05 UTC
README
yarn add --dev reyesoft-ci composer require-dev reyesoft/ci
Backend
Tools
- cs-fixer
Install
composer.json
{ "scripts": { "ci-double-spaces": [ "sh vendor/reyesoft/ci/tools/find-double-spaces.sh app", "sh vendor/reyesoft/ci/tools/find-double-spaces.sh tests" ], "ci-php-cs-fixer": "sh vendor/reyesoft/ci/php/scripts/php-cs-fixer.sh", "phpstan": [ "@phpstan-src", "@phpstan-tests" ], "phpstan-src": "./vendor/bin/phpstan analyse -l 7 -c resources/rules/phpstan.src.neon app ./bootstrap/*.php config", "phpstan-tests": "./vendor/bin/phpstan analyse -l 7 -c resources/rules/phpstan.tests.neon tests", "coverage": [ "ulimit -Sn 50000 && phpdbg -d memory_limit=-1 -qrr ./vendor/bin/phpunit", "php ./vendor/reyesoft/ci/tools/coverage-checker.php" ] }, "extra": { "coverage": { "file": "./bootstrap/cache/clover.xml", "thresholds": { "global": { "lines": 46 }, "/app/Boxer": { "lines": 78 } } } } }
Front End
Tools
- tslint
- sass-lint
- prettier (ts, md and json files)
Install
NX with Angular
package.json
Npm
{ "sasslintConfig": "resources/.sass-lint.yml", "scripts": { "lint": "npm run affected:lint && npm run lint:style", "lint:style": "npm run stylelint \"apps/*/**/*.{css,scss,sass}\"", "fix": "npm run affected:lint --fix && npm run prettier:fix && npm run lint:style --fix", "prettier:fix": "prettier apps/*/**/*.{ts,sass,scss,md} libs/*/**/*.{ts,sass,scss,md} --write", "prettier:check": "bash node_modules/reyesoft-ci/parallel.bash -s \"npm run prettier apps/**/*.{sass,scss,md} libs/**/*.{sass,scss,md} -l\" \"npm run prettier apps/*/src/**/*.ts libs/**/*.ts -l\"", "precommit": "lint-staged", }, "lint-staged": { "*.ts": [ "npm run eslint --fix", "git add" ], "*.{ts,md,scss,sass}": [ "npm run prettier:fix", "git add" ] } }
Only Angular
Npm
{ "sasslintConfig": "resources/.sass-lint.yml", "scripts": { "lint": "npm run lint && npm run lint:style", "lint:style": "npm run stylelint \**/*.{css,scss,sass}\"", "fix": "npm run affected:lint --fix && npm run prettier:fix && npm run lint:style --fix", "prettier:fix": "prettier **/*.{ts,sass,scss,md} --write", "prettier:check": "bash node_modules/reyesoft-ci/parallel.bash -s \"yarn prettier **/*.{sass,scss,md} -l\" \"yarn prettier **/*.ts -l\"", "precommit": "lint-staged", }, "lint-staged": { "*.ts": [ "npm run eslint --fix", "git add" ], "*.{ts,md,scss,sass}": [ "npm run prettier:fix", "git add" ] } }
In case of using yarn you can use:
"lint-staged": { "*.ts": [ "yarn eslint --fix", "git add" ], "*.{ts,md,scss,sass}": [ "yarn prettier:fix", "git add" ], "package.json": [ "node ./node_modules/reyesoft-ci/js/scripts/yarn-install.js", "git add yarn.lock" ] }
yarn fix
for various projects: ng lint project1 --fix && ng lint project2 --fix && yarn prettier:fix