Skip to content

Commit

Permalink
Load index.ts correctly
Browse files Browse the repository at this point in the history
Add declaration/typings
  • Loading branch information
jerone committed Aug 15, 2022
1 parent 39f0777 commit 33c70d0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
4 changes: 2 additions & 2 deletions tests/rules/eslint-plugin-angular-template-consistent-this.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"allowSyntheticDefaultImports": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"declaration": false,
"declarationMap": false,
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"module": "CommonJS",
"moduleResolution": "node",
Expand Down

0 comments on commit 33c70d0

Please sign in to comment.