AtomLinter / linter-jscs

Atom JSCS linter providers
https://atom.io/packages/linter-jscs
69 stars 32 forks source link

Destructing assignment #442

Closed JordanTheDodger closed 4 years ago

JordanTheDodger commented 4 years ago

Version

4.2.2

Issue

I got an error of illegal space before comma while using destructing assignment to assign variables from arrays. Please fix linter-jscs package, it became hard to write even a simple function. Here is the code

//destructing assignment to assign variables from arrays
const [z, x, , y] = [1, 2, 3, 4, 5, 6];
console.log('destructing assignment example 3 :- ' + z, x, y);

The code gives expected output. But linter-jscs pannel shows error. I thought being a novice atom package can't be wrong there might be something that I might be missing. So I ran the code in different text editors, shockingly there were no errors. I am attaching an image from a different editor image

This is even more shocking. The package tells me 4 errors but the code runs and gives expected output. These are the errors thrown by linter -JSCS image

I am no expert in making a package for atom, but let me know what can I do to improve this.

Hoping such bugs get fixed in the next update. Thanks in advance!! Merry Christmas!!

Arcanemagus commented 4 years ago

This would need to be fixed in JSCS, which this package is just a wrapper around. Unfortunately for you JSCS is officially no longer supported, and in fact stopped development years before destructuring assignment was even a thing! You should be moving to ESLint (with linter-eslint in Atom), or finding an alternative linter.

JordanTheDodger commented 4 years ago

Thanks!

On Mon, Dec 23, 2019 at 11:52 PM Landon Abney notifications@github.com wrote:

This would need to be fixed in JSCS, which this package is just a wrapper around. Unfortunately for you JSCS is officially no longer supported https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2#.x0o1xqkk9, and in fact stopped development years before destructuring assignment was even a thing! You should be moving to ESLint https://eslint.org/docs/user-guide/migrating-from-jscs (with linter-eslint https://atom.io/packages/linter-eslint in Atom), or finding an alternative linter.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AtomLinter/linter-jscs/issues/442?email_source=notifications&email_token=ANCI2XZGOLHWK67OGBFHDJDQ2GIPRA5CNFSM4J6ZTCF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHSPEPI#issuecomment-568652349, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANCI2X5MVTDTCCMZDS3EQW3Q2GIPRANCNFSM4J6ZTCFQ .

-- Thanks & Regards, Jordan

JordanTheDodger commented 4 years ago

Hi, Is there a discord channel for atom? If yes then I would love to be part of it.

On Tue, Dec 24, 2019 at 8:58 AM Jordan TheDodger jordanthedodger@gmail.com wrote:

Thanks!

On Mon, Dec 23, 2019 at 11:52 PM Landon Abney notifications@github.com wrote:

This would need to be fixed in JSCS, which this package is just a wrapper around. Unfortunately for you JSCS is officially no longer supported https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2#.x0o1xqkk9, and in fact stopped development years before destructuring assignment was even a thing! You should be moving to ESLint https://eslint.org/docs/user-guide/migrating-from-jscs (with linter-eslint https://atom.io/packages/linter-eslint in Atom), or finding an alternative linter.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AtomLinter/linter-jscs/issues/442?email_source=notifications&email_token=ANCI2XZGOLHWK67OGBFHDJDQ2GIPRA5CNFSM4J6ZTCF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHSPEPI#issuecomment-568652349, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANCI2X5MVTDTCCMZDS3EQW3Q2GIPRANCNFSM4J6ZTCFQ .

-- Thanks & Regards, Jordan

-- Thanks & Regards, Jordan

JordanTheDodger commented 4 years ago

I was reading about linter-eslint package. Do you have to write a config file? I feel like some obvious errors are not thrown by the package. For example:- If I misspelled function as 'fucntion', then an error should be thrown. Luckily, I tested this and no errors were thrown.

Looking forward to your reply.

Thanks & Regards, Jordan

On Tue, Dec 24, 2019 at 11:26 AM Jordan TheDodger jordanthedodger@gmail.com wrote:

Hi, Is there a discord channel for atom? If yes then I would love to be part of it.

On Tue, Dec 24, 2019 at 8:58 AM Jordan TheDodger < jordanthedodger@gmail.com> wrote:

Thanks!

On Mon, Dec 23, 2019 at 11:52 PM Landon Abney notifications@github.com wrote:

This would need to be fixed in JSCS, which this package is just a wrapper around. Unfortunately for you JSCS is officially no longer supported https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2#.x0o1xqkk9, and in fact stopped development years before destructuring assignment was even a thing! You should be moving to ESLint https://eslint.org/docs/user-guide/migrating-from-jscs (with linter-eslint https://atom.io/packages/linter-eslint in Atom), or finding an alternative linter.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AtomLinter/linter-jscs/issues/442?email_source=notifications&email_token=ANCI2XZGOLHWK67OGBFHDJDQ2GIPRA5CNFSM4J6ZTCF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHSPEPI#issuecomment-568652349, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANCI2X5MVTDTCCMZDS3EQW3Q2GIPRANCNFSM4J6ZTCFQ .

-- Thanks & Regards, Jordan

-- Thanks & Regards, Jordan

-- Thanks & Regards, Jordan

Arcanemagus commented 4 years ago

ESLint has a getting started guide here: https://eslint.org/docs/user-guide/getting-started