File tree 4 files changed +50
-8
lines changed
4 files changed +50
-8
lines changed Original file line number Diff line number Diff line change 40
40
run : npm install
41
41
- name : Bundle code
42
42
run : npm run test:prepare ${{ matrix.bundler }}
43
- - name : Run Tests on Browsers
43
+ - name : Run Tests on bundler
44
44
run : npm run test:bundlers ${{ matrix.bundler }}
Original file line number Diff line number Diff line change
1
+ name : Lint
2
+
3
+ on : [push, pull_request]
4
+
5
+ permissions :
6
+ contents : read
7
+
8
+ jobs :
9
+ lint :
10
+ name : Node.js
11
+ runs-on : ${{ matrix.os }}
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ os : [ubuntu-latest]
16
+ node-version : [20.x]
17
+ steps :
18
+ - name : Checkout
19
+ uses : actions/checkout@v3
20
+ - name : Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
21
+ uses : actions/setup-node@v3
22
+ with :
23
+ node-version : ${{ matrix.node-version }}
24
+ - name : Restore cached dependencies
25
+ uses : actions/cache@v3
26
+ with :
27
+ path : node_modules
28
+ key : node-modules-${{ hashFiles('package.json') }}
29
+ - name : Install dependencies
30
+ run : npm install
31
+ - name : Build
32
+ run : npm run build
33
+ - name : Check generated files
34
+ run : |
35
+ # Check if diff is empty
36
+ git diff --exit-code --stat ${{ github.sha }} -- lib/
37
+ - name : Check format
38
+ run : npm run test:format
39
+ - name : Check for lint issues
40
+ run : npm run lint
Original file line number Diff line number Diff line change 1
1
import { FlatCompat } from '@eslint/eslintrc'
2
- const compat = new FlatCompat ( )
3
-
4
2
import eslintPluginLocal from './eslint-plugin-local/index.mjs'
5
3
4
+ const compat = new FlatCompat ( )
5
+
6
6
export default [
7
7
// standard,
8
8
...compat . extends ( 'eslint-config-standard' ) ,
9
9
{
10
10
files : [ '**/**.js' , '**/**.mjs' ] ,
11
11
languageOptions : {
12
12
sourceType : 'module' ,
13
- ecmaVersion : 'latest' ,
13
+ ecmaVersion : 'latest'
14
14
} ,
15
- plugins : { ' local' : eslintPluginLocal } ,
15
+ plugins : { local : eslintPluginLocal } ,
16
16
rules : {
17
17
/*
18
18
This is inserted to make this compatible with prettier.
@@ -21,7 +21,7 @@ export default [
21
21
'space-before-function-paren' : 0 ,
22
22
curly : [ 2 , 'all' ] ,
23
23
'local/no-big-int' : 'error' ,
24
- 'no-undef' : 'warn' ,
25
- } ,
26
- } ,
24
+ 'no-undef' : 'warn'
25
+ }
26
+ }
27
27
]
Original file line number Diff line number Diff line change 42
42
"test:readable-stream-only" : " node readable-stream-test/runner-prepare.mjs" ,
43
43
"coverage" : " c8 -c ./c8.json tap --rcfile=./tap.yml test/parallel/test-*.js test/ours/test-*.js" ,
44
44
"format" : " prettier -w src lib test" ,
45
+ "test:format" : " prettier -c src lib test" ,
45
46
"lint" : " eslint src"
46
47
},
47
48
"dependencies" : {
55
56
"@babel/core" : " ^7.17.10" ,
56
57
"@babel/plugin-proposal-nullish-coalescing-operator" : " ^7.16.7" ,
57
58
"@babel/plugin-proposal-optional-chaining" : " ^7.16.7" ,
59
+ "@eslint/eslintrc" : " ^3.2.0" ,
58
60
"@rollup/plugin-commonjs" : " ^22.0.0" ,
59
61
"@rollup/plugin-inject" : " ^4.0.4" ,
60
62
"@rollup/plugin-node-resolve" : " ^13.3.0" ,
You can’t perform that action at this time.
0 commit comments