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

Use eslint #710

Merged
merged 4 commits into from
Jun 3, 2022
Merged

Use eslint #710

merged 4 commits into from
Jun 3, 2022

Conversation

ota-meshi
Copy link
Contributor

What kind of changes does this PR include?

  • Minor content fixes (broken links, typos, etc.)
  • New or updated content
  • Translated content
  • Changes to the docs site code
  • Something else!

Description

close #634

  • What does this PR change? Give us a brief description.

This PR introduces ESLint to the project. And, add the npm script "lint:eslint" to run ESLint.
I also made some simple fixes to some of the warned files.

However, the eslint configuration may need to be changed. Currently, it is based on the recommended configuration of eslint and each eslint plugin.

  • Did you change something visual? A before/after screenshot can be helpful.

There are no visual changes.

@netlify
Copy link

netlify bot commented Jun 2, 2022

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 277a6d4
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/6299bc95ba0de2000845ae8b
😎 Deploy Preview https://deploy-preview-710--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ota-meshi
Copy link
Contributor Author

If you are using VS Code and ESLint extension, you can also check in the editor by adding the following settings to .vscode/settings.json.

{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "astro",
    "typescript",
    "typescriptreact"
  ]
}

https://github.com/ota-meshi/eslint-plugin-astro#visual-studio-code

@sarah11918 sarah11918 added the site improvement Some thing that improves the website functionality - ask @delucis for help! label Jun 2, 2022
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Hi @ota-meshi!

Thanks so much for taking the time to add this 🙌

I have a couple of questions about the config/plugin, but in general this looks great.

.eslintignore Outdated Show resolved Hide resolved
.eslintrc.js Show resolved Hide resolved
ota-meshi and others added 2 commits June 3, 2022 12:39
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site improvement Some thing that improves the website functionality - ask @delucis for help!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use new ESLint plugin to dogfood it
3 participants