Closed akhilpandey95 closed 6 years ago
r? @miketaylr
@miketaylr 2 iquestions : Q1.) Should the eslintrc be removed or not ? Q2.) Should the npm eslint commands in individual add-on directory be updated ?
@miketaylr just another thing forgot to say so basically :
logToConsole (someargument, true) // writes the changes to the disk
logToConsole (someargument, false) // doesn't write the changes to the disk
PS : I forgot to delete L13
in .eslint.js
@miketaylr noted all the changes will notify you once i am done.
@miketaylr I have made all the requested changes, here are some of things which you might be interested to know :
npm run eslint
npm run eslint --info
npm run eslint --writetodisk
npm run eslint --writetodisk somerandomstring
npm run eslint --info --writetodisk
Thanks! A few thoughts:
npm run eslint --writetodisk
Why not just make that a boolean flag? Meaning, if you see the flag it means yes, and if you don't see it it means no? Also, --save
would be less to write.
Also, it seems like we're doing something similar to https://github.com/ratherblue/eslint-html-reporter#usage here. Perhaps we could either use that, or use it's usage patterns? Note that it uses -o filename
, which is a common unix idiom.
By convention, eslint takes a -f
custom formatter argument: http://eslint.org/docs/developer-guide/working-with-custom-formatters.
That said, I probably won't use the save functionality, so I won't block merging on that, but if you'd like to go that route we can clean up the CLI API at least.
@miketaylr i have implemented the changes, sorry for taking this much time.
r? @miketaylr
@AkhilHector when I run npm run eslint
, I get the following errors:
> webcompat-reporter-extensions@ eslint /Users/miket/dev/compat/addons/webcompat-reporter
> node .eslint.js
[
Filepath: /Users/miket/dev/compat/addons/webcompat-reporter/chrome/background.js,
Errors: 1,
Warnings: 0,
Error Message: 0 Parsing error: Unexpected character '`',
Line, Column: [21,9]
]
[
Filepath: /Users/miket/dev/compat/addons/webcompat-reporter/firefox/background.js,
Errors: 1,
Warnings: 0,
Error Message: 0 Parsing error: Unexpected character '`',
Line, Column: [20,9]
]
[
Filepath: /Users/miket/dev/compat/addons/webcompat-reporter/opera/background.js,
Errors: 1,
Warnings: 0,
Error Message: 0 Parsing error: Unexpected character '`',
Line, Column: [21,9]
]
[
Filepath: /Users/miket/dev/compat/addons/webcompat-reporter/.eslint.js,
Errors: 0,
Warnings: 1,
]
Changes saved to the disk: false
Any idea why it's giving an error for a backtick? That's valid in ES6...
@miketaylr looks strange i tried pinging you on IRC to get this problem resolved, honestly i dont understand as to why this error is popping up
honestly i dont understand as to why this error is popping up
Hm, we should probably do a little research to understand, and have a follow-up commit to fix the issues.
I'm hesitant to merge in the code if eslint is saying there are errors.
@miketaylr agreed, let me dig in and look for the reason behind this, give me a day's time
Let's close this, I don't think @akhilpandey95 is working on this right now. :)
Im sorry @miketaylr. I honestly wanted to help, but i am just occupied with other stuff. Hope i could be helpful to the community some other time. ✌️
No worries. Life gets busy. :)
The output looks like this :