by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 16 07:56

    dependabot[bot] on npm_and_yarn

    Bump lodash from 4.17.11 to 4.1… (compare)

  • Dec 15 2019 04:36

    dependabot[bot] on npm_and_yarn

    (compare)

  • Dec 15 2019 04:36

    dependabot[bot] on npm_and_yarn

    (compare)

  • Dec 15 2019 04:36

    dependabot[bot] on npm_and_yarn

    (compare)

  • Nov 06 2019 17:40

    dependabot[bot] on npm_and_yarn

    Bump js-yaml from 3.12.0 to 3.1… (compare)

  • Nov 06 2019 17:40

    dependabot[bot] on npm_and_yarn

    Bump lodash from 4.17.11 to 4.1… (compare)

  • Nov 01 2019 16:30

    dependabot[bot] on npm_and_yarn

    Bump mixin-deep from 1.3.1 to 1… (compare)

  • Jul 29 2019 09:34

    IllusionMH on master

    build: enable npm package publi… (compare)

  • Jul 29 2019 09:33

    IllusionMH on master

    feat(rule): Add new rule - reac… (compare)

  • Jul 04 2019 14:11

    JoshuaKGoldberg on master

    fix: In function-name, actually… (compare)

  • Jun 26 2019 22:05

    JoshuaKGoldberg on add-emoji-readme-1

    (compare)

  • May 28 2019 17:52

    JoshuaKGoldberg on add-emoji-readme-1

    Added :sparkle: emoji to README… (compare)

  • May 28 2019 17:52

    JoshuaKGoldberg on add-emoji-readme

    Added :sparkle: emoji to README… (compare)

  • May 24 2019 23:08

    IllusionMH on npm-6.2.0

    (compare)

  • May 24 2019 23:07

    IllusionMH on releases

    v6.2.0 (compare)

  • May 24 2019 23:00

    IllusionMH on 6.2.0

    (compare)

  • May 24 2019 22:58

    IllusionMH on master

    Update CHANGELOG.md and package… (compare)

  • May 19 2019 00:17

    IllusionMH on npm-6.2.0-beta

    (compare)

  • May 19 2019 00:16

    IllusionMH on releases

    v6.2.0-beta (compare)

  • May 18 2019 23:38

    IllusionMH on 6.2.0-beta

    (compare)

loicraux
@loicraux
@HamletDRC @danielmanesku I just added a comment to this #44
Your feedback is welcome !
Hamlet D'Arcy
@HamletDRC
Hi guys
I am publishing the changes needed to support tslint 3.x and typescript 1.7
sadly it is not backwards compatible so we need to bump to version 2.0
people using tslint 2.x will need to use 1.x of our package
people using tslint 3.x will need to use 2.x of our package
bezreyhan
@bezreyhan

hey all, I'm trying to use the tslint:recommended extension but it does not seem to be working.
I am using webpack and my eslint config looks like this:

tslint: {
    configuration: {
      "extends": "tslint:recommended"
    }
  },

Here is some code that should cause ts-lint warnings but does not:

function hello(foo: string) {
  const str : string = 'bar' + foo;
  if (str)
    console.log('blah')
  console.log(str);
}

since tslint:recommended includes curly: true, an error should be raised
when I add

rules: {curly: true}

to my config I do see errors
Any ideas why this is not working?

foklepoint
@foklepoint
How do I use the recommended ruleset? @HamletDRC?
Is there a better way than copy pasting the recommended ruleset? Can I use extends like we do with tslint:recommended
Also copy pasting the rules gives off the following erros for me
/usr/local/lib/node_modules/tslint/lib/ruleLoader.js:29
        throw new Error(ERROR_MESSAGE);
        ^

Error:
            Could not find implementations for the following rules specified in the configuration:
            no-for-in-array
no-unsafe-finally
restrict-plus-operands
arrow-parens
max-file-line-count
no-suspicious-comment
react-a11y-lang
react-a11y-meta
react-a11y-titles
object-literal-key-quotes
            Try upgrading TSLint and/or ensuring that you have all necessary custom rules installed.
            If TSLint was recently upgraded, you may have old rules configured which need to be cleaned up.

    at Object.loadRules (/usr/local/lib/node_modules/tslint/lib/ruleLoader.js:29:15)
    at Linter.lint (/usr/local/lib/node_modules/tslint/lib/tslint.js:25:44)
    at processFile (/usr/local/lib/node_modules/tslint/lib/tslint-cli.js:131:29)
    at Array.forEach (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/tslint/lib/tslint-cli.js:141:41)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
Hamlet D'Arcy
@HamletDRC
@foklepoint the recommended ruleset is copied to the NPM deployment as tslint.json
So I think the easiest thing to do is point tslint to ./node_modules/tslint-microsoft-contrib/tslint.json
@bezreyhan I am sorry, I did not see your message earlier. I think you should ask that question in the tslint channel at #palentir/tslint
Hamlet D'Arcy
@HamletDRC
@here we just need a few more pull requests in the next 2 weeks and our little project will be highlighted as one of Microsoft's top 10 OSS projects. Come on @bvancea and @danielmanesku , let's send in some PRs!
foklepoint
@foklepoint
@HamletDRC Can we offer a solution like tslint where all you have to do is extends: ["tslint:latest"]
Also why do I get an exception about missing implementations when I DO decide to copy over the rules from tslint.json? Is the recommended ruleset out of date?
Hamlet D'Arcy
@HamletDRC
@foklepoint You are probably copying the tslint.json rules from the master branch, which is for the next release, but then getting the tslint-microsoft-contrib package from npm, which is for the current release. If you look inside the npm package you will see tslint,json, and that is the full ruleset for your release
@foklepoint so you should maybe configure your grunt task like this: rules: './node_modules/tslint-microsoft-contrib/tslint.json'
@foklepoint how does ["tslint:latest"] work? Is that a javascript thing or something that the tslint project wrote themselves?
Seems a lot easier than doing the steps you mentioned above and the configuration will auto-update if you want to stick with the recommended ruleset
Hamlet D'Arcy
@HamletDRC
I already publish the recommended ruleset in npm as tslint.json.
I think you can just add:
"extends": "./node_modules/tslint-microsoft-contrib/tslint"
@foklepoint ^^
does that not work?
Fredrik Folkesson
@folke123
Hi, I dont understand how to get this to work. On Github it says it need tslint 3.2 or greater. But the latest version of tslint I can get from npm is 3.15
Hamlet D'Arcy
@HamletDRC
hi @folke123 TSLint 3.15 is indeed a few versions newer than 3.2. So 3.15 will work fine.
there should be no issues unless you are on really old versions of typescript or tslint
jacobus-brogly
@jacobus-brogly
hi
my ts lint is rejecting constructs like
 const y = ( x: number ) => x + 2;
it wants me to const y = ( x: number ) => { return x+2; };
please help
i like the 1st format better
HEEEELP
Hamlet D'Arcy
@HamletDRC
Hi @jacobus-brogly , do you know which rule is triggering this violation?
I think this might be a tslint rule and not a tslint-microsoft-contrib rule that is doing this to you.
jacobus-brogly
@jacobus-brogly
he @HamletDRC , thanks for your interest, I solved it (i honestly dont know how)
I think I might have asked this question in the wrong channel, what is the "microsoft-contrib" part?
Hamlet D'Arcy
@HamletDRC
So the main product is "TSLint" - they provide the linter and a set of rules.
"tslint-microsoft-contrib" is a set of valuable rules maintained by Microsoft and the community. I think we have 80 or so rules now and we get 50,000 downloads a month... so we are quite popular.
But the base product is tslint. We are an add-on.
Chris Barr
@chrismbarr
I see the 5.0.1 release was made 2 days ago, but it's still not available on NPM - https://www.npmjs.com/package/tslint-microsoft-contrib
NPM is still on version 5.0.0
Chris Barr
@chrismbarr
@HamletDRC :arrow_up:
Omar Diab
@osdiab
hi! got a question, wondering if anyone can answer
i have a React component that renders a simple HTML checkbox
<input type=checkbox …>
the aria-roles rule is telling me i have to provide a valid aria-checked value
this isn’t a controlled checkbox, as in i believe the default behavior of the browser in this case should work fine with screen readers
is this rule supposed to be that stringent about filling in aria attributes? it seems silly that i would have to provide the checked value if it’s literally just behaving as a normal checkbox without any javascript control or anything.
Echyzen
@GuillaumeUnice
Hi there, I understand why "no-bitwise": true, exist but is it possible to change the error in simple warning?