Skip to content

Conversation

@inlined
Copy link
Member

@inlined inlined commented Feb 9, 2018

This pull request is intentionally stacked so that robo-changes come before manual changes. I used git ls-files to find all package.json files and node to modify their JSON.

To test all files, I ran:

for i in $(git ls-files | grep 'functions/package.json'); do npm run lint --prefix $(dirname $i); done

The functions/ prefix was to detect cases where package.json was also used for firebase hosting.

Any NPM error meant that a package.json was missing the linter script (e.g. the code sample was added since I first robo-modified package.jsons). Those were manually fixed. Any linter errors were also manually fixed.

@nicolasgarnier
Copy link
Contributor

nicolasgarnier commented Feb 9, 2018

Is this CL a good place to also cleanup the .eslintrc.json files? That would include:

  • remove the duplicate rule "promise/always-return": 2, appears twice
  • Extend the Google lint rule instead of "extends": "eslint:recommended", (we'd also need to import it in the devdependencies of all samples)
  • "Maybe" cleaning up the .eslintrc.json from the rules that are already defined in the Google rules (if any).
@inlined
Copy link
Member Author

inlined commented Feb 9, 2018

That sounds like a good robochange. Let's do separate pull requests with robochanges and have each request document how the change was created.

@inlined
Copy link
Member Author

inlined commented Feb 9, 2018

FWIW, we should also have a robochange that ensures firebase.json wires up the linter in predeploy rules.

@nicolasgarnier
Copy link
Contributor

cool LGTM then!

@inlined inlined merged commit 2a81f4a into master Feb 9, 2018
@kmcnellis kmcnellis deleted the inlined.eslint-enforce branch October 1, 2018 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants