Skip to content

Commit

Permalink
fix: apply eslint on generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Jan 3, 2025
1 parent 9abed93 commit 3ac5a10
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = [
{
files: ['**/src/grammar.ts'],
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'no-useless-escape': 0,
},
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"scripts": {
"benchmark": "ts-node --transpile-only test/benchmark.ts",
"build": "pnpm run compile-parser && del-cli ./dist && tsc",
"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",
"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",
"dev": "tsc --watch",
"lint": "eslint ./src ./test && tsc --noEmit",
"test": "NODE_ENV=test ava --serial --verbose",
Expand Down
2 changes: 1 addition & 1 deletion src/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type NearleyToken = {
// Generated automatically by nearley, version 2.20.1
// http://github.com/Hardmath123/nearley
// Bypasses TS6133. Allow declared but unused functions.
// @ts-expect-error
//
function id(d: any[]): any {
return d[0];
}
Expand Down

0 comments on commit 3ac5a10

Please sign in to comment.