Skip to content

Commit

Permalink
chore: use tsc to type-check the project
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhaenisch committed Jul 2, 2024
1 parent 59c5329 commit 3ea4a81
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ trim_trailing_whitespace = true
[package.json]
indent_style = space

[*.yml]
indent_style = space

[*.md]
indent_style = space
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ jobs:
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm check-types
- run: npm test
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/**
* @todo change these to their new locations (`prettier/plugins/<parser>`) with
* the next major release.
* the next major release. (requires dropping Prettier 2.x support)
*/
// @ts-expect-error
const { parsers: babelParsers } = require('prettier/parser-babel');
// @ts-expect-error
const { parsers: htmlParsers } = require('prettier/parser-html');
// @ts-expect-error
const { parsers: typescriptParsers } = require('prettier/parser-typescript');

const { organize } = require('./lib/organize');
Expand Down
2 changes: 1 addition & 1 deletion lib/service-host.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { dirname } = require('path');
const ts = require('typescript');
const { findTsconfig } = require('./find-tsconfig');

const { getCompilerOptions, getVueCompilerOptions } = require('./get-compiler-options');
const { getCompilerOptions } = require('./get-compiler-options');

/**
* Create the most basic TS language service host for the given file to make import sorting work.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"main": "index.js",
"scripts": {
"test": "ava --verbose",
"check-types": "tsc",
"preversion": "npm test"
},
"files": [
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"module": "commonjs",
"target": "es2015",
"checkJs": true,
"strict": true
"strict": true,
"skipLibCheck": true,
"noEmit": true
},
"vueCompilerOptions": { "plugins": ["@vue/language-plugin-pug"] }
}

0 comments on commit 3ea4a81

Please sign in to comment.