File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,18 @@ module.exports = [
2020 'require-unicode-regexp' : 0 ,
2121 } ,
2222 } ,
23+ {
24+ files : [ '**/src/grammar.ts' ] ,
25+ rules : {
26+ '@typescript-eslint/ban-ts-comment' : 0 ,
27+ 'no-useless-escape' : 0 ,
28+ } ,
29+ } ,
2330 {
2431 ignores : [
2532 'package-lock.json' ,
2633 'dist' ,
2734 'node_modules' ,
28- 'src/pg-formatter' ,
2935 '*.log' ,
3036 '.*' ,
3137 '!.github' ,
Original file line number Diff line number Diff line change 5757 },
5858 "scripts" : {
5959 "benchmark" : " ts-node --transpile-only test/benchmark.ts" ,
60- "build" : " del-cli ./dist && tsc" ,
61- "compile-parser" : " nearleyc src/grammar.ne --out ./src/grammar.ts && sed -i '' 's/loc?: number/loc: number/g' src/grammar.ts" ,
60+ "build" : " pnpm run compile-parser && del-cli ./dist && tsc" ,
61+ "compile-parser" : " nearleyc src/grammar.ne --out ./src/grammar.ts && sed -i '' 's/loc?: number/loc: number/g' src/grammar.ts && eslint --fix src/grammar.ts " ,
6262 "dev" : " tsc --watch" ,
6363 "lint" : " eslint ./src ./test && tsc --noEmit" ,
6464 "test" : " NODE_ENV=test ava --serial --verbose" ,
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ type NearleyToken = {
3030
3131// Generated automatically by nearley, version 2.20.1
3232// http://github.com/Hardmath123/nearley
33+ // Bypasses TS6133. Allow declared but unused functions.
34+ // @ts -expect-error
3335function id ( d : any [ ] ) : any {
3436 return d [ 0 ] ;
3537}
@@ -769,7 +771,7 @@ const grammar: Grammar = {
769771 {
770772 name : 'unquoted_value$ebnf$1' ,
771773 postprocess : ( d ) => d [ 0 ] . concat ( [ d [ 1 ] ] ) ,
772- symbols : [ 'unquoted_value$ebnf$1' , / [ \w # $ * . ? @ - ] / ] ,
774+ symbols : [ 'unquoted_value$ebnf$1' , / [ \w # $ * . ? @ \ -] / ] ,
773775 } ,
774776 {
775777 name : 'unquoted_value' ,
You can’t perform that action at this time.
0 commit comments