Storage for TRIV settings
Triv documentation
👉How to setup your project
-
Create index.js file in your repository. Put inside instructions for triv.
module.exports = { front: { directories: [ { name: 'es-lint', path: 'src/linters/es-lint', }, ...commonLibs ] }, back: { directories: [ { name: 'es-lint', path: 'src/linters/es-lint-backend', }, ...commonLibs ] }, }
-
Params
front
andback
is the parameter fortech
property in your.triv.json
file. -
Directories
- contains rules, with name and path to this rule -
src folder
contains rules. Rule example:
module.exports = {
devPackages: [
"eslint",
"eslint-config-airbnb-typescript",
"eslint-plugin-import@^2.22.0",
"@typescript-eslint/eslint-plugin@^4.4.1",
"eslint-config-prettier",
],
files: [
'.eslintrc.js'
]
}
- Available properties for rule:
devPackages
(string[]) - contains packages which triv will install to dev dependancy in your repository
files
(string[]) - name and path to file.This file will be coppied to root folder
packageJsonHooks
(object[]) - will add this property in package json file