Skip to content

Commit 409dc61

Browse files
authored
feat: Add support for eslint@8 (#9)
* Add support for eslint8 * Fix npm script * Fix npm script
1 parent 04a6287 commit 409dc61

File tree

3 files changed

+601
-895
lines changed

3 files changed

+601
-895
lines changed

.circleci/config.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
version: 2
1+
version: 2.1
2+
3+
supported-eslint-versions: &supported-eslint-versions ["local", "7"]
4+
25
jobs:
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

2643
workflows:
27-
version: 2
2844
build_and_test:
2945
jobs:
30-
- build
46+
- build:
47+
matrix:
48+
parameters:
49+
eslint-version: *supported-eslint-versions

0 commit comments

Comments
 (0)