Skip to content

Instantly share code, notes, and snippets.

@korel-san
Last active January 31, 2018 10:43
Show Gist options
  • Save korel-san/5295621e14e0401b32c8d501798d89f5 to your computer and use it in GitHub Desktop.
Save korel-san/5295621e14e0401b32c8d501798d89f5 to your computer and use it in GitHub Desktop.
Valor Code Quality Checker

Valor Code Quality Checker

Большинство правил будут взяты из:

  • ngx-bootstrap
  • Career Builder

npmrc example

save-exact = true
package-lock=false

editor config example

# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

tsconfig example

tsonfig strict: true ( could be applied by one strict* rule per PR)

{
  "compilerOptions": {
    "strictNullChecks": true, 
    "noImplicitThis": true, 
    "alwaysStrict": true, 
    "strictFunctionTypes": true, 
    "noImplicitAny": true
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true
  }
}

tslint (из конфига Valor, + plugins от @Betrozov) example

engine (package)

  • node LTS >=8.9.4
  • npm >=5.6.0
  • typescript >=2.4.2
  • angular and angular-cli - latest
  • git? >=2.16.1
  • rxjs? >=5.4.3
  • npm-ckeck? >=5.5.2 (global)
  • nvm? >=0.33.8
  • mongo? Stable Release >=3.6.2

unit tests code coverage >=80%

gitignore

# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
*.log
**/*.log
.~*
coverage
.nyc_output
*.js
*.js.map
.idea
yarn.lock
package-lock.json

package.json example

npm run start
npm run test

CD, для всех публичных реп travis (stages, @Mazur) example

  • подготовленные заранее команды
npm run build-prod
npm run test
npm run lint
npm run deploy #optional
  • deploy как минимум из ветки development на staging
  • should be a configured step on CI to deploy after tests

***Позже этот список будет перемещен сюда

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment