diff --git a/package.json b/package.json index 066b473..68309ec 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "eslint": "^7.0.0 || ^8.0.0" }, "main": "dist/index.js", + "typings": "dist/index.d.ts", "scripts": { "build": "rimraf ./dist && tsc -p tsconfig.build.json", "typecheck": "tsc -p tsconfig.json --noEmit", diff --git a/src/index.ts b/src/index.ts index 7ccbae5..dd10cb4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,8 +2,8 @@ import consistentThisRule, { RULE_NAME as consistentThisRuleName, } from "./lib/rules/eslint-plugin-angular-template-consistent-this"; -export default { - rules: { - [consistentThisRuleName]: consistentThisRule, - }, +const rules = { + [consistentThisRuleName]: consistentThisRule, }; + +export { rules }; diff --git a/tests/rules/eslint-plugin-angular-template-consistent-this.ts b/tests/rules/eslint-plugin-angular-template-consistent-this.ts index 1920f27..ff8ee7d 100644 --- a/tests/rules/eslint-plugin-angular-template-consistent-this.ts +++ b/tests/rules/eslint-plugin-angular-template-consistent-this.ts @@ -2,10 +2,10 @@ import { MESSAGE_IDS } from "../../src/lib/message-ids"; import { RULE_NAME } from "../../src/lib/rules/eslint-plugin-angular-template-consistent-this"; import { RuleTester } from "../external/rule-tester"; import { convertAnnotatedSourceToFailureCase } from "../external/test-helpers"; -import rulesIndex from "../../src/index"; +import { rules } from "../../src/index"; // eslint-disable-next-line security/detect-object-injection -const rule = rulesIndex.rules[RULE_NAME]; +const rule = rules[RULE_NAME]; const ruleTester = new RuleTester({ parser: "@angular-eslint/template-parser", diff --git a/tsconfig.base.json b/tsconfig.base.json index 6048304..8b1710e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -3,8 +3,8 @@ "allowSyntheticDefaultImports": true, "allowUnreachableCode": false, "allowUnusedLabels": false, - "declaration": false, - "declarationMap": false, + "declaration": true, + "declarationMap": true, "esModuleInterop": true, "module": "CommonJS", "moduleResolution": "node",