fix: add typescript type declaration to npm bundle

This commit is contained in:
Justin Starry
2020-02-03 21:36:35 +08:00
committed by Michael Vines
parent 4017bd6bfa
commit e03fa4b962
6 changed files with 764 additions and 4 deletions

View File

@ -1,5 +1,4 @@
module.exports = {
// eslint-disable-line import/no-commonjs
env: {
browser: true,
es6: true,
@ -47,4 +46,18 @@ module.exports = {
'require-await': ['error'],
semi: ['error', 'always'],
},
// Used to lint the TypeScript type declaration file
overrides: [
{
files: ['*.d.ts'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
},
],
};