Skip to content

Commit

Permalink
feat(types): added types
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherpickering committed Mar 9, 2023
1 parent 3d82602 commit 07f3d82
Show file tree
Hide file tree
Showing 10 changed files with 594 additions and 8,485 deletions.
12 changes: 0 additions & 12 deletions .eslintrc.cjs

This file was deleted.

20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: 12,
sourceType: "module",
},
rules: {},
parser: "@typescript-eslint/parser",
plugins: ["prettier", "@typescript-eslint"],
ignorePatterns: ["*.js"],
};
6 changes: 5 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ jobs:
useLockFile: false

- name: build
run: npm run build
run: |
npm run build
npm run format
npm run lint
npm run typecheck
- name: test
run: node test.js
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build
src
# Created by https://www.toptal.com/developers/gitignore/api/node,macos,windows
# Edit at https://www.toptal.com/developers/gitignore?templates=node,macos,windows

Expand Down
9 changes: 5 additions & 4 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fs = require("fs");
import fs from "fs";

const loadSource = async () => {
const source = await fetch(
Expand All @@ -20,9 +20,10 @@ const loadSource = async () => {
});
});

const content = `module.exports.nameSynonyms = ${JSON.stringify(out)}`;

fs.writeFile("index.js", content, (err) => {
const content = `
module.exports.nameSynonyms = ${JSON.stringify(out)}`;
fs.mkdirSync("src", { recursive: true });
fs.writeFile("src/index.ts", content, (err) => {
if (err) {
console.error(err);
}
Expand Down
Loading

0 comments on commit 07f3d82

Please sign in to comment.