Skip to content

Commit 3ac5a10

Browse files
committed
fix: apply eslint on generated files
1 parent 9abed93 commit 3ac5a10

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

eslint.config.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = [
2323
{
2424
files: ['**/src/grammar.ts'],
2525
rules: {
26-
'@typescript-eslint/ban-ts-comment': 0,
2726
'no-useless-escape': 0,
2827
},
2928
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"scripts": {
5959
"benchmark": "ts-node --transpile-only test/benchmark.ts",
6060
"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",
61+
"compile-parser": "nearleyc src/grammar.ne --out ./src/grammar.ts && sed -i '' 's/loc?: number/loc: number/g' src/grammar.ts && sed -i '' 's/@ts-expect-error//g' src/grammar.ts && sed -i '' 's/@ts-ignore//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",

src/grammar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type NearleyToken = {
3131
// Generated automatically by nearley, version 2.20.1
3232
// http://github.com/Hardmath123/nearley
3333
// Bypasses TS6133. Allow declared but unused functions.
34-
// @ts-expect-error
34+
//
3535
function id(d: any[]): any {
3636
return d[0];
3737
}

0 commit comments

Comments
 (0)