File tree Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 1
1
dist
2
2
node_modules
3
3
/test /fixture
4
+ scripts /docs.ts
Original file line number Diff line number Diff line change 4
4
build :
5
5
name : Build
6
6
runs-on : ubuntu-latest
7
+ strategy :
8
+ matrix :
9
+ node : ["12", "14", "16"]
7
10
steps :
8
11
- uses : actions/checkout@v2
9
12
- uses : actions/setup-node@v2
10
13
with :
11
- node-version : " 14"
12
-
13
- - name : Get yarn cache directory path
14
- id : yarn-cache-dir-path
15
- run : echo "::set-output name=dir::$(yarn cache dir)"
16
- - uses : actions/cache@v2
17
- id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
18
- with :
19
- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
20
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
21
- restore-keys : |
22
- ${{ runner.os }}-yarn-
23
-
14
+ node-version : ${{ matrix.node }}
15
+ cache : " yarn"
24
16
- run : yarn
25
17
- run : yarn build
26
- - run : yarn run eslint
18
+ - run : yarn lint
27
19
- run : yarn test:all
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ const formatLevel = (options) => {
28
28
"0" : "off" ,
29
29
"1" : "a warning" ,
30
30
"2" : "an error" ,
31
+ off : "off" ,
31
32
warn : "a warning" ,
32
33
error : "an error" ,
33
34
} [ options ] ;
@@ -101,7 +102,7 @@ const buildCases = (content, filename) => {
101
102
if ( ! cases ) {
102
103
return content ;
103
104
}
104
- const valid = cases . valid . map ( ( c ) => ( typeof c === "string" ? { code : c } : c ) ) ?? [ ] ;
105
+ const valid = cases . valid ? .map ( ( c ) => ( typeof c === "string" ? { code : c } : c ) ) ?? [ ] ;
105
106
const invalid = cases . invalid ?? [ ] ;
106
107
107
108
const markdown = [
You can’t perform that action at this time.
0 commit comments