Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of eslint errors (+140) #20

Open
boydkelly opened this issue Dec 16, 2021 · 1 comment
Open

Lots of eslint errors (+140) #20

boydkelly opened this issue Dec 16, 2021 · 1 comment

Comments

@boydkelly
Copy link

boydkelly commented Dec 16, 2021

Hi,
I really like the idea with a lightweight i18n. But trying to integrate it to a project using eslint there are lot of syntax and other errors (sample below but there are more than 140 reported). The --fix option does fix a lot but still leaves at least 18 errors. Fixing this is beyond my capabilities. And I realize this falls into the category if it ain't broken don't fix it. But maybe there is a chance to update this to a tighter syntax could have some benefits. Thank you for an awesome project!

[admin@penguin js]$ npx eslint i18n.js 
    2:10   error  Missing space before function parentheses                                                                   space-before-function-paren
    3:5    error  Expected newline after "use strict" directive                                                               lines-around-directive
    3:17   error  Expected this semicolon to be at the beginning of the next line                                             semi-style
    4:9    error  Expected a function declaration                                                                             func-style
    4:26   error  Missing space before function parentheses                                                                   space-before-function-paren
    4:52   error  Missing space before function parentheses                                                                   space-before-function-paren
    4:77   error  Use the rest parameters instead of 'arguments'                                                              prefer-rest-params
    4:93   error  Expected this semicolon to be at the beginning of the next line                                             semi-style
    6:14   error  Missing space before function parentheses                                                                   space-before-function-paren
    7:45   error  'define' is not defined                                                                                     no-undef
    8:20   error  'define' is not defined                                                                                     no-undef
    8:39   error  Missing space before function parentheses                                                                   space-before-function-paren
    9:17   error  Return statement should not contain assignment                                                              no-return-assign
   12:13   error  Return statement should not contain assignment                                                              no-return-assign
   14:13   error  Return statement should not contain assignment                                                              no-return-assign
   16:25   error  Strings must use singlequote                                                                                quotes
   16:78   error  Missing space before function parentheses                                                                   space-before-function-paren
   17:41   error  Expected this semicolon to be at the beginning of the next line                                             semi-style
   19:31   error  Missing space before function parentheses                                                                   space-before-function-paren
   20:32   error  Missing space before function parentheses                                                                   `space-before-function-paren````
@roddeh
Copy link
Owner

roddeh commented Dec 20, 2021

Hi Boyd,

Glad you are enjoying the project. Yes, there will be a lot of lint errors for the compiled JS, mostly because it was generated from CoffeeScript (not so popular these days).

At some point I will likely re-write in pure JS, or maybe TS, but I wouldn't hold your breath :)

I am curious as to why lint errors are a concerns for a module tho? If you include it through npm/pnpm then you should be able to treat it as a black box. Is this not the case for you?

Cheers,
Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants