GithubHelp home page GithubHelp logo

TSLint errors question about pnp-js-core HOT 19 CLOSED

pr0peller avatar pr0peller commented on May 29, 2024
TSLint errors question

from pnp-js-core.

Comments (19)

pbjorklund avatar pbjorklund commented on May 29, 2024

Hi @pr0peller. If you paste the output here I can check it tomorrow

from pnp-js-core.

pr0peller avatar pr0peller commented on May 29, 2024

Hi,
Here is the output from my console:

npm test
[email protected] test D:__Source\Repos\PnP-JS-Core
gulp test

(node:14208) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[20:08:50] Using gulpfile D:__Source\Repos\PnP-JS-Core\gulpfile.js
[20:08:50] Starting 'lint'...
[20:08:50] Starting 'build-typings'...
[20:08:50] Starting 'clean'...
[20:08:50] Starting 'build-tests'...
[20:08:51] [gulp-tslint] error (member-ordering) collections/collections.ts[30, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function
[20:08:51] [gulp-tslint] error (member-ordering) configuration/configuration.ts[41, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function
[20:08:51] Finished 'clean' after 603 ms
[20:08:51] [gulp-tslint] error (member-ordering) net/HttpClient.ts[13, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function
[20:08:51] [gulp-tslint] error (member-ordering) utils/storage.ts[197, 5]: Declaration of public instance member variable not allowed to appear after declaration of public instance member function
[20:08:52] [gulp-tslint] error (member-ordering) sharepoint/rest/Queryable.ts[51, 5]: Declaration of public instance member variable not allowed to appear after declaration of public instance member function
[20:08:52] [gulp-tslint] error (eofline) sharepoint/rest/contenttypes.ts[222, 2]: file should end with a newline
[20:08:55] [gulp-tslint] error (member-ordering) sharepoint/rest/search.ts[246, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function
[20:08:55] [gulp-tslint] error (member-ordering) sharepoint/rest/search.ts[309, 5]: Declaration of public instance member variable not allowed to appear after declaration of public instance member function
[20:08:55] [gulp-tslint] error (member-ordering) sharepoint/rest/userprofiles.ts[15, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function
[20:08:56] 'lint' errored after 5.81 s
[20:08:56] Error in plugin 'gulp-tslint'
Message:
Failed to lint: collections/collections.ts[30, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function, configuration/configuration.ts[41, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function, net/HttpClient.ts[13, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function, utils/storage.ts[197, 5]: Declaration of public instance member variable not allowed to appear after declaration of public instance member function, sharepoint/rest/Queryable.ts[51, 5]: Declaration of public instance member variable not allowed to appear after declaration of public instance member function, sharepoint/rest/contenttypes.ts[222, 2]: file should end with a newline, sharepoint/rest/search.ts[246, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function, sharepoint/rest/search.ts[309, 5]: Declaration of public instance member variable not allowed to appear after declaration of public instance member function, sharepoint/rest/userprofiles.ts[15, 5]: Declaration of private instance member variable not allowed to appear after declaration of public instance member function.
[20:08:57] Finished 'build-tests' after 7.05 s
[20:08:57] Finished 'build-typings' after 7.15 s
npm ERR! Test failed. See above for more details.

D:__Source\Repos\PnP-JS-Core (dev) ([email protected])`

Thank you @pbjorklund

from pnp-js-core.

mike-morr avatar mike-morr commented on May 29, 2024

@pbjorklund @pr0peller I got these same errors out of nowhere the other day. I had to move all of the failing items above the constructor to make the errors go away. I assumed the tslint rules changed and that a PR was probably pending already to fix it.

from pnp-js-core.

pr0peller avatar pr0peller commented on May 29, 2024

Same here. Lint was fine yesterday. Thanks for the info @mike-morrison

from pnp-js-core.

pbjorklund avatar pbjorklund commented on May 29, 2024

Is this against the master or dev branch?

from pnp-js-core.

pr0peller avatar pr0peller commented on May 29, 2024

@pbjorklund It is against dev branch

from pnp-js-core.

pr0peller avatar pr0peller commented on May 29, 2024

@pbjorklund Same issue against master branch - just checked!

from pnp-js-core.

patrick-rodgers avatar patrick-rodgers commented on May 29, 2024

I just pulled dev and ran gulp lint and could not reproduce this. tslint rules haven't changed so far as I am aware.

from pnp-js-core.

biste5 avatar biste5 commented on May 29, 2024

I could reproduce it couple of days back from dev branch, while working on my PR.

I didn't commit my tslint.json then, which I used to check successful build. Wanted to raise the issue myself too

from pnp-js-core.

russgove avatar russgove commented on May 29, 2024

I had the isues on Saturday and changed my talking to fix it

from pnp-js-core.

mike-morr avatar mike-morr commented on May 29, 2024

I noticed it for the first time on a Mac, but I am pretty sure I got it on Windows too.

from pnp-js-core.

patrick-rodgers avatar patrick-rodgers commented on May 29, 2024

I just noticed you are doing "npm test" instead of "gulp test". I re-pulled latest from dev and tried that and it worked as expected. So far as I know nothing had changed on my machine, and I am pulling from the dev branch in git with no local changes. tslint.json hasn't been updated in some time. Unsure, if someone who can reproduce this can investigate that would be appreciated but everything appears fine. I have version 3.3.12 of tslint, but haven't done anything special to it (at least that I am aware of).

from pnp-js-core.

biste5 avatar biste5 commented on May 29, 2024

It has to do with an issue in TSLint seems, not with what we were doing.
So it's depending on which version of TSLint is being used and should be fixed soon.

I'm using TSLint 3.8.0 and have the issue.

from pnp-js-core.

pbjorklund avatar pbjorklund commented on May 29, 2024

It has to do with the fact that we use caret ranges for tslint and gulp-tslint. @biste5 is most likely correct that it will be solved upstream soon enough.

We could lock down versions to specific versions in package.json.

For now you can resolve with npm install [email protected] [email protected]

from pnp-js-core.

pr0peller avatar pr0peller commented on May 29, 2024

I'll check my version of TSLint when I get home, but I think I'm running 3.8.0 also. Not 100% sure though ...

from pnp-js-core.

pr0peller avatar pr0peller commented on May 29, 2024

I'm using TSLint 3.9.0 downgraded to 3.6.0 as @pbjorklund advice and now it is working.

from pnp-js-core.

patrick-rodgers avatar patrick-rodgers commented on May 29, 2024

So before I close this want to confirm:

  1. It is now working
  2. this was due to an issue with tslint and not a change in our library somewhere?

from pnp-js-core.

pr0peller avatar pr0peller commented on May 29, 2024

Correct, With TSLint 3.6.0 works. The Issue is in the newer version of TSLint tool.

from pnp-js-core.

patrick-rodgers avatar patrick-rodgers commented on May 29, 2024

Thanks, I'll close this. Appreciate everyone who had a look.

from pnp-js-core.

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.