@jenkins-cd/eslint-config-jenkins
v0.0.2
Published
Jenkins JavaScript ESLint configuration
Downloads
6,822
Keywords
Readme
ESLint configurations for Jenkins JavaScript projects.
We are hoping that people will try taking these and using them as they are. It would be nice for all Jenkins related JavaScript code to follow the same standards as much as possible.
Note: If using
@jenkins-cd/js-builder
, there's typically no need to specify a.eslintrc
file.@jenkins-cd/js-builder
will automatically lint using one of the following configurations, using the builder instancelang
setting (defaultes6
), or will usereact
if it detects.jsx
files in the builder source paths.
ES6
.eslintrc
:
{
"extends": "@jenkins-cd/jenkins/es6"
}
Note: Applied by default if using
@jenkins-cd/js-builder
i.e. no need to specify the.eslintrc
file.
ES5
.eslintrc
:
{
"extends": "@jenkins-cd/jenkins/es5"
}
Note: Applied by
@jenkins-cd/js-builder
if the builder instance lang ises5
(builder.lang('es5')
).
React
.eslintrc
:
{
"extends": "@jenkins-cd/jenkins/react"
}
Note: Applied by
@jenkins-cd/js-builder
if the builder instance lang isreact
(builder.lang('react')
), or if.jsx
files are detected in any of the source paths.