diff --git a/.eslintrc.js b/.eslintrc.js index 2548c8f1..2892878d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,7 +37,7 @@ module.exports = { }, overrides: [ { - files: ['**/*.spec.js'], + files: ['./test/**/*.spec.*'], env: { jest: true, }, diff --git a/package.json b/package.json index 1133d5e7..363565d4 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,9 @@ "lint:fix": "eslint --ext .ts --ext .js --fix src test" }, "files": [ - "lib", - "types/*.d.ts" + "lib" ], - "typings": "./types/index.d.ts", + "typings": "./lib/index.d.ts", "devDependencies": { "@semantic-release/changelog": "^3.0.2", "@semantic-release/commit-analyzer": "^6.1.0", @@ -44,7 +43,7 @@ "eslint-config-airbnb-base": "^13.1.0", "eslint-config-prettier": "^4.2.0", "eslint-plugin-import": "^2.17.3", - "eslint-plugin-jest": "^22.5.1", + "eslint-plugin-jest": "^22.6.4", "eslint-plugin-prettier": "^3.0.1", "jest": "^24.8.0", "prettier": "^1.17.0", diff --git a/types/index.d.ts b/src/declaration.d.ts similarity index 73% rename from types/index.d.ts rename to src/declaration.d.ts index f39cc2e9..a6f2527c 100644 --- a/types/index.d.ts +++ b/src/declaration.d.ts @@ -1,4 +1,4 @@ -import Vue, { ComponentOptions } from 'vue' +import Vue, { ComponentOptions } from 'vue'; declare module 'vue/types/options' { interface ComponentOptions { @@ -8,6 +8,6 @@ declare module 'vue/types/options' { declare module 'vue/types/vue' { interface Vue { - _uid: number + _uid: number; } } diff --git a/src/index.ts b/src/index.ts index 34abea90..a864ac2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import './declaration.d'; import createJsonldMixin from './createMixin'; import decorator from './decorator'; diff --git a/test/decorator_ts.spec.ts b/test/decorator_ts.spec.ts index eb2354d4..08c86c6f 100644 --- a/test/decorator_ts.spec.ts +++ b/test/decorator_ts.spec.ts @@ -3,7 +3,6 @@ import Component from 'vue-class-component'; import Jsonld from '../src/decorator'; describe('Jsonld decorator', () => { - test('typecheck', () => { const checker = {}; @@ -15,7 +14,7 @@ describe('Jsonld decorator', () => { } } - const component = new MockComponent() + const component = new MockComponent(); expect(component.jsonld).toBeUndefined(); expect(component.$options.jsonld()).toBe(checker); diff --git a/tsconfig.json b/tsconfig.json index 09d78dbc..237b2269 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,10 +7,7 @@ "outDir": "./lib/", "target": "es5", "sourceMap": false, - "declaration": true, - "types": [ - "./types/" - ], + "declaration": true }, "include": [ "src/**/*" diff --git a/tsconfig.test.json b/tsconfig.test.json index 03739ae4..5c602e8f 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -7,7 +7,6 @@ "allowJs": true, "noEmit": true, "types": [ - "./types/", "@types/jest" ], }, diff --git a/yarn.lock b/yarn.lock index 6c9d5ea2..05647e4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1971,7 +1971,7 @@ eslint-plugin-import@^2.17.3: read-pkg-up "^2.0.0" resolve "^1.11.0" -eslint-plugin-jest@^22.5.1: +eslint-plugin-jest@^22.6.4: version "22.6.4" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.6.4.tgz#2895b047dd82f90f43a58a25cf136220a21c9104" integrity sha512-36OqnZR/uMCDxXGmTsqU4RwllR0IiB/XF8GW3ODmhsjiITKuI0GpgultWFt193ipN3HARkaIcKowpE6HBvRHNg==