File tree Expand file tree Collapse file tree 3 files changed +601
-895
lines changed Expand file tree Collapse file tree 3 files changed +601
-895
lines changed Original file line number Diff line number Diff line change 1- version : 2
1+ version : 2.1
2+
3+ supported-eslint-versions : &supported-eslint-versions ["local", "7"]
4+
25jobs :
36 build :
7+ parameters :
8+ eslint-version :
9+ type : string
10+ description : >
11+ Overrides the installed version of ESLint. When set to "local" the version of ESLint set
12+ frozen in the package-lock.json is used.
13+ default : " local"
414 docker :
5- - image : circleci/node:lts
6-
15+ - image : circleci/node
716 steps :
817 - checkout
918
@@ -18,13 +27,23 @@ jobs:
1827 paths :
1928 - node_modules
2029 key : v1-dependencies-{{ checksum "package-lock.json" }}
30+ - when :
31+ condition :
32+ not :
33+ equal : [<<parameters.eslint-version>>, "local"]
34+ steps :
35+ - run :
36+ name : Override version of eslint@<<parameters.eslint-version>>
37+ command : npm install eslint@<<parameters.eslint-version>> --save-dev
2138
2239 - run : npm run format:check
2340 - run : npm run lint
24- - run : npm run test
41+ - run : npm test
2542
2643workflows :
27- version : 2
2844 build_and_test :
2945 jobs :
30- - build
46+ - build :
47+ matrix :
48+ parameters :
49+ eslint-version : *supported-eslint-versions
You can’t perform that action at this time.
0 commit comments