Skip to content

Commit

Permalink
further modify eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
benalleng committed Feb 22, 2024
1 parent 7793dda commit 6cee846
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/internal-rules/lib/rules/check-i18n-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ module.exports = {
function extractKeys(node, parentKey = "") {
const keys = [];
let properties = node.properties;
let fileContent;
let ast;

if (typeof node === "string") {
fileContent = fs.readFileSync(node, "utf8");
ast = parse(fileContent, {
const fileContent = fs.readFileSync(node, "utf8");
const ast = parse(fileContent, {
sourceType: "module",
plugins: ["typescript", "jsx"]
});
Expand Down

0 comments on commit 6cee846

Please sign in to comment.