Skip to content

enable eslint for browser code#80

Open
christophgysin wants to merge 1 commit intoserverless:masterfrom
christophgysin:enable-eslint-for-browser
Open

enable eslint for browser code#80
christophgysin wants to merge 1 commit intoserverless:masterfrom
christophgysin:enable-eslint-for-browser

Conversation

@christophgysin
Copy link
Copy Markdown
Contributor

Don't disable eslint globally, and fix issues where needed.

@DavidWells
Copy link
Copy Markdown
Contributor

This will break in older browsers. Might need to hold off on merging this until let and const are supported across the board

Set eslint browser environment instead of listing all globals manually,
and fix issues where needed.
@christophgysin
Copy link
Copy Markdown
Contributor Author

In that case I will make eslint check browser code against an earlier ECMA version. What is considered available in browsers these days?

@christophgysin christophgysin force-pushed the enable-eslint-for-browser branch from 2c298be to 0fdca44 Compare February 10, 2017 11:07
@christophgysin
Copy link
Copy Markdown
Contributor Author

I updated the commit to disable the rule no-var.

The code in aws-node-auth0-custom-authorizers-api/frontend/app.js was already using const, so I left it as is.

But since these are examples used by serverless developers, supporting old browsers might not be necessary at all...

@kaihendry
Copy link
Copy Markdown
Contributor

Sorry for the bike shedding, though can I put a vote in instead for the simpler https://www.npmjs.com/package/standard ?

@DavidWells
Copy link
Copy Markdown
Contributor

We need to make the linting nicer... That is for sure.

I do like standard but it's different than other serverless repos.

I'm going to take a pass at the eslintrc here and relax some of the pedantic rules that require all these damn comments.

Has anyone used https://github.com/jlongster/prettier or https://github.com/kentcdodds/prettier-eslint ?

@christophgysin
Copy link
Copy Markdown
Contributor Author

Should we open a new issue for the discussion around a new coding style?

What shall we do with this in the meantime? Close and abandon or merge until we come up with something better?

@nikgraf
Copy link
Copy Markdown
Contributor

nikgraf commented Feb 13, 2017

@DavidWells haven't tried Prettier yet. Will give it a try this week and can report back then.

The PR looks good to be merged now from my perspective. Any objections to merge it?

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

Successfully merging this pull request may close these issues.

4 participants