chinchiheather / tslint-lines-between-class-members

Custom rule for TSLint to enforce blank lines between class methods - achieves a similar thing to lines-between-class-members in ESLint
18 stars 5 forks source link

feat: add entrypoint #4

Closed croso-df closed 6 years ago

croso-df commented 6 years ago

Thanks for these rules!

I'm trying to load the rules via require.resolve because I'm building a shared lint.json for my company (see for example the ionic tslint rules). The moment I do require.resolve('tslint-lines-between-class-members') I get a problem because Node complains about the package not being a module. Needless to say, this is because it finds no exported module to resolve.

This PR adds a pretty simple entrypoint (index.js) for Node to be able to resolve it correctly. This same entrypoint is used in codelyzer, tslint-eslint-code, and many more popular rule sets.

chinchiheather commented 6 years ago

Thanks for this!