centiva-conf
v1.0.1
Published
Configurations nécessaires pour suivre les normes de développement PHP, Javascript et SASS
Downloads
10
Readme
Configurations des normes de développement Centiva
Les fichiers présent dans ce repository devrait être installé au même niveau que les projets afin que tous puissent en hériter.
Charger les fichiers du repository centiva-conf dans votre projet
yarn add centiva-conf
Ajouter les scripts de configuration pour yarn dans package.json
"scripts": {
"install:clean": "rm -rf ./node_modules && rm -f ./package-lock.json && yarn install",
"update:clean": "rm -rf ./node_modules && rm -f ./package-lock.json && yarn update",
"config:clear": "rm -f ./.eslintrc.js ./.sass-lint.yml ./phpcs.xml ./tlint.json",
"config:eslint": "ln -s ./node_modules/centiva-conf/.eslintrc.js ./.eslintrc.js",
"config:sasslint": "ln -s ./node_modules/centiva-conf/.sass-lint.yml ./.sass-lint.yml",
"config:phpcs": "ln -s ./node_modules/centiva-conf/phpcs.xml ./phpcs.xml",
"config:tlint": "ln -s ./node_modules/centiva-conf/tlint.json ./tlint.json",
"config": "yarn run config:clear && yarn run config:eslint && yarn run config:sasslint && yarn run config:phpcs && yarn run config:tlint"
},
Installer les dépendences de votre projet
yarn install
Créer les liens symboliques dans votre projet pour utiliser les fichiers de configuration
yarn run config
Mettre à jour le repository npm
yarn login
yarn publish
Eslint
.eslintrc.js
Sass Lint
.sass-lint.yml
Ajouter ce script dans package.json afin d'avoir la même commande pour rouler Sass Lint dans tous les projets:
"scripts": {
"lint:scss": "sass-lint -c .sass-lint.yml -v -q",
}
Installer Sass Lint
yarn install sass-lint --save-dev