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: Opt in more folders to ESLint #2734

Merged
merged 1 commit into from
Feb 1, 2021
Merged

Conversation

nschonni
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

@nschonni nschonni left a comment

Choose a reason for hiding this comment

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

I left out opting in the libs/ since there are some funnier changes like another sub-yarn.lock needed

.eslintrc.js Outdated Show resolved Hide resolved
{
files: ["**/cli.js"],
rules: {
"node/shebang": 0,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This can be removed if #2156 lands, as it just complains if it isn't a registered bin value

.eslintrc.js Outdated
},
],
"node/no-unpublished-import": "off",
"no-undef": "off",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was for the arguments call, and could probably be inline instead

Copy link
Contributor

Choose a reason for hiding this comment

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

What arguments call??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

res = creator.apply(this, arguments);

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this line and wait for #2747
I tested it and it means we don't need to have this rule.

@@ -1,3 +1,4 @@
/* eslint-disable node/no-missing-require */
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the plugin just doesn't understand the local dependencies like "@yari-internal/constants": "file:../../../libs/constants", in the package.json, so ignored at the file level here. A few others under the libs/ so maybe a better solution is needed globally later

@nschonni
Copy link
Collaborator Author

@peterbe I'm guessing this is for your review

.eslintrc.js Show resolved Hide resolved
Copy link
Contributor

@peterbe peterbe left a comment

Choose a reason for hiding this comment

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

Looks very promising. I just don't get the inclusion of the tsx files. create-react-app isn't perfect(*), far from it, but it's quite well maintained and it does take care of setting up its own eslint configuration.

(*) One frustrating thing is that you have to run yarn build to find out what eslint violations you have. Or you can start the webpack dev server (yarn start) and it'll print them out on the terminal. I wish it would ship with something similar to yarn build but basically work like we do with our Node code (much thanks to you!)

.eslintrc.js Outdated Show resolved Hide resolved
Copy link
Contributor

@peterbe peterbe left a comment

Choose a reason for hiding this comment

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

So let's wait for #2747 and wait for @fiji-flo to explain why we have that second unused argument in the Lambda handler function.

@peterbe peterbe merged commit 3fdad98 into mdn:master Feb 1, 2021
@nschonni nschonni deleted the eslint-cleanup branch February 1, 2021 17:03
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.

3 participants