Skip to content

Commit dbb5cf5

Browse files
authored
chore: Add ESLint 7 support (#39)
1 parent bbd7c7b commit dbb5cf5

File tree

3 files changed

+600
-710
lines changed

3 files changed

+600
-710
lines changed

.circleci/config.yml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
version: 2
1+
version: 2.1
2+
23
jobs:
34
build:
45
docker:
5-
- image: circleci/node:10
6+
- image: circleci/node
67

78
steps:
89
- checkout
@@ -11,13 +12,45 @@ jobs:
1112
keys:
1213
- v1-dependencies-{{ checksum "yarn.lock" }}
1314
- v1-dependencies-
14-
15+
1516
- run: yarn install --frozen-lock
1617

1718
- save_cache:
1819
paths:
1920
- node_modules
2021
key: v1-dependencies-{{ checksum "yarn.lock" }}
22+
23+
- run: yarn format:check
24+
- run: yarn lint
25+
- run: yarn test
26+
27+
test_eslint:
28+
docker:
29+
- image: circleci/node
30+
31+
parameters:
32+
eslint:
33+
type: string
34+
35+
steps:
36+
- checkout
37+
38+
- restore_cache:
39+
keys:
40+
- v1-dependencies-{{ checksum "yarn.lock" }}
41+
- v1-dependencies-
2142

22-
- run: yarn format -- --list-different
43+
- run: yarn install --frozen-lock
44+
- run: yarn add --dev eslint@<< parameters.eslint >>
2345
- run: yarn test
46+
47+
workflows:
48+
build_and_test:
49+
jobs:
50+
- build
51+
- test_eslint:
52+
requires:
53+
- build
54+
matrix:
55+
parameters:
56+
eslint: ["6", "7"]

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,26 @@
1212
],
1313
"scripts": {
1414
"format": "prettier --write \"**/*.{js,md}\"",
15+
"format:check": "prettier --check \"**/*.{js,md}\"",
1516
"lint": "eslint",
1617
"test": "mocha"
1718
},
1819
"dependencies": {
1920
"@lwc/eslint-plugin-lwc": "~0.10.0",
2021
"babel-eslint": "~10.1.0",
21-
"eslint-plugin-import": "~2.20.2",
22+
"eslint-plugin-import": "~2.22.1",
2223
"eslint-plugin-jest": "~23.8.2",
2324
"eslint-restricted-globals": "~0.2.0"
2425
},
2526
"devDependencies": {
26-
"eslint": "^6.8.0",
27-
"husky": "^4.2.5",
28-
"lint-staged": "^10.1.6",
29-
"mocha": "^7.1.1",
30-
"prettier": "^2.0.4"
27+
"eslint": "^7.13.0",
28+
"husky": "^4.3.0",
29+
"lint-staged": "^10.5.1",
30+
"mocha": "^8.2.1",
31+
"prettier": "^2.1.2"
3132
},
3233
"peerDependencies": {
33-
"eslint": "^6.0.0"
34+
"eslint": "^6 || ^7"
3435
},
3536
"repository": {
3637
"type": "git",
@@ -48,7 +49,7 @@
4849
],
4950
"husky": {
5051
"hooks": {
51-
"pre-commit": "lint-staged && yarn format"
52+
"pre-commit": "lint-staged"
5253
}
5354
},
5455
"lint-staged": {

0 commit comments

Comments
 (0)