Skip to content

Commit

Permalink
Fix new-rule script
Browse files Browse the repository at this point in the history
  • Loading branch information
kebetsi authored and vdiez committed Nov 27, 2024
1 parent d167687 commit 12e9d2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build:cov": "mvn clean && npm run bridge:build:cov && npm run _:plugin:pre-build && npm run plugin:build",
"build:fast": "npm run bridge:build:fast && npm run _:plugin:pre-build && npm run plugin:build:fast",
"bf": "npm run build:fast",
"new-rule": "tsx tools/newRule.ts",
"new-rule": "tsx tools/newRule.mts",
"generate-meta": "tsx tools/generate-meta.ts && cd packages/jsts/src/rules && npm run eslint-docs",
"generate-rules-list": "node tools/generate-rules-list.js",
"ruling": "node tools/prepare-ruling.js && tsx --tsconfig packages/tsconfig.test.json --test packages/ruling/tests/projects/*.ruling.test.ts",
Expand Down
2 changes: 1 addition & 1 deletion tools/newRule.ts → tools/newRule.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import * as fs from 'fs';
import * as path from 'path';

const rootFolder = path.join(__dirname, '../');
const rootFolder = path.join(import.meta.dirname, '../');
const templatesFolder = path.join(rootFolder, 'tools/resources/');
const ruleIndexPath = path.join(templatesFolder, 'rule.index_ts');
const ruleTemplatePath = path.join(templatesFolder, 'rule.template_ts');
Expand Down

0 comments on commit 12e9d2c

Please sign in to comment.