Skip to content

Commit

Permalink
refactor: Remove old linter and joi schemas to merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz committed Mar 13, 2021
1 parent cfc63d9 commit 94b11ef
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 295 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/lint.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
# TODO Remove npm test when types are validated
- run: npm test
- run: npm run typecheck
7 changes: 4 additions & 3 deletions compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ const processSpec = (file: string) => {
newName += '.js';

const outFilePath = path.resolve('dist', newName);
const outDirname = path.dirname(outFilePath);

if(!fs.existsSync(path.dirname(out)))
fs.mkdirSync(path.dirname(out));
if(!fs.existsSync(outDirname))
fs.mkdirSync(outDirname);

fs.writeFileSync(out, result.outputText);
fs.writeFileSync(outFilePath, result.outputText);
};

// Process all the files in the specs directory
Expand Down
2 changes: 0 additions & 2 deletions copy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copy specfiles to the Fig resource dir
# TODO Remove cp from specs when types are validated
cp ./specs/*.js ~/.fig/autocomplete/
cp ./dist/*.js ~/.fig/autocomplete/
echo "Copied specs to ~/.fig/autocomplete"
90 changes: 0 additions & 90 deletions linter.js

This file was deleted.

99 changes: 0 additions & 99 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
"name": "linter",
"version": "1.0.0",
"description": "Fig Autocomplete Spec Linter",
"main": "linter.js",
"scripts": {
"test": "node linter.js",
"typecheck": "tsc --noEmit",
"test": "tsc --noEmit",
"build": "ts-node-script compiler/compiler.ts"
},
"author": "",
Expand All @@ -14,7 +12,6 @@
"@types/node": "^14.14.33",
"@types/progress": "^2.0.3",
"chalk": "^4.1.0",
"joi": "^17.4.0",
"progress": "^2.0.3",
"ts-node": "^9.1.1",
"typescript": "^4.2.3"
Expand Down
19 changes: 0 additions & 19 deletions schemas/Arg.js

This file was deleted.

18 changes: 0 additions & 18 deletions schemas/Command.js

This file was deleted.

15 changes: 0 additions & 15 deletions schemas/Generator.js

This file was deleted.

15 changes: 0 additions & 15 deletions schemas/Option.js

This file was deleted.

16 changes: 0 additions & 16 deletions schemas/Spec.js

This file was deleted.

12 changes: 0 additions & 12 deletions schemas/Suggestion.js

This file was deleted.

0 comments on commit 94b11ef

Please sign in to comment.