Code Monkey home page Code Monkey logo

Comments (6)

jonaskello avatar jonaskello commented on June 2, 2024

I use it like this:

{
  "extends": [
    "tslint-immutable"
  ]
}

Could you post the relevant parts of your tslint.json file?

from tslint-immutable.

michaeljota avatar michaeljota commented on June 2, 2024

I have it like this:

{
  "extends": [
    "./../../../node_modules/tslint-immutable"
  ],
  "rules": {
    "readonly-keyword": true,
    "readonly-array": true,
    "no-let": true
  }
}

But there is a new feature in tslint, rulesDirectory. It does not matter where folder are you, tslint will resolve the path into a node_module.

{
  "rulesDirectory": [
    "tslint-consistent-codestyle"
  ],
  "rules": {
    "early-exit": [
      true,
      {
        "max-length": 0
      }
    ]
  }
}

Both files are in the same sub-folder, but tslint-consistent-codestyle support for rulesDirectory.

from tslint-immutable.

jonaskello avatar jonaskello commented on June 2, 2024

According to the docs, both rulesDirectory and extends uses "node module resolution semantics". Could you try it with extends and just tslint-immutable without any path, like I posted above?

from tslint-immutable.

jonaskello avatar jonaskello commented on June 2, 2024

Looked closer at the docs and for rulesDirectory it says "These values are handled using node module resolution semantics, if an index.js is placed in your rules directory.". So I added an index file. I'll publish it and we'll see if it works.

from tslint-immutable.

jonaskello avatar jonaskello commented on June 2, 2024

@michaeljota I published 4.0.2 which has an index.js file in the rules directory. Could you check if it works with rulesDirectory without patht?

from tslint-immutable.

michaeljota avatar michaeljota commented on June 2, 2024

It works. Thanks you.

from tslint-immutable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.