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.
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 dorequire.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.