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

chore: cleanup eslint #5016

Merged
merged 3 commits into from
Sep 27, 2022
Merged

chore: cleanup eslint #5016

merged 3 commits into from
Sep 27, 2022

Conversation

danez
Copy link
Contributor

@danez danez commented Aug 30, 2022

This cleans up two things with eslint:

  1. First commit removes the unused custom rule we have for importing chalk and instead uses a built-in one from eslint to restrict the import of chalk.
  2. Second commit sets the sourceType for babel to unambiguous which makes babel guess the source type. This is done because we do parse node_modules for all the import rules, so that the import rules know what modules actually export. And currently, they do print warnings. With this change, they do not anymore, as babel can parse them correctly.

This is the error:

Error while parsing /home/runner/work/cli/cli/node_modules/netlify/src/index.js
Line 1, column 0: 'import' and 'export' may appear only with 'sourceType: "module"' (1:0)
`parseForESLint` from parser `/home/runner/work/cli/cli/node_modules/@babel/eslint-parser/lib/index.cjs` is invalid and will just be ignored

...

@danez danez added the type: chore work needed to keep the product and development running smoothly label Aug 30, 2022
@github-actions
Copy link

github-actions bot commented Aug 30, 2022

📊 Benchmark results

Comparing with 6cd52d1

Package size: 223 MB

(no change)

^  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB 
│   ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-12    T-11    T-10    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

@danez danez requested review from a team September 27, 2022 04:20
eduardoboucas
eduardoboucas previously approved these changes Sep 27, 2022
@danez danez added the automerge Add to Kodiak auto merge queue label Sep 27, 2022
khendrikse
khendrikse previously approved these changes Sep 27, 2022
//
// after that uncomment the next line
// 'local-rules/no-direct-chalk-import': 2,
'no-restricted-modules': [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice I like cleanup!

@kodiakhq kodiakhq bot removed the automerge Add to Kodiak auto merge queue label Sep 27, 2022
@kodiakhq
Copy link
Contributor

kodiakhq bot commented Sep 27, 2022

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

@danez danez dismissed stale reviews from khendrikse and eduardoboucas via 95bfb9e September 27, 2022 08:54
@danez danez added the automerge Add to Kodiak auto merge queue label Sep 27, 2022
@kodiakhq kodiakhq bot merged commit 138681d into main Sep 27, 2022
@kodiakhq kodiakhq bot deleted the eslint branch September 27, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Add to Kodiak auto merge queue type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants