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

ESLint: Added indent rule #2881

Merged
merged 3 commits into from
May 14, 2021
Merged

Conversation

RunDevelopment
Copy link
Member

This adds the indent rule to enforce tabs throughout the codebase.

Since the indent rule will use tabs to align merged variables declarations, I also added the rule one-var to disallow merged variables declarations. This is an easy way to get around the whole smart-tabs problem. You can see this working in plugins/autolinker/prism-autolinker.js and other files.

The reason this PR changes so many lines is that we had a few files (notably prism-core.js) where the IIFE wasn't indented. However, requiring IIFE's to not be indented changes even more lines.

@RunDevelopment RunDevelopment changed the title Eslint indent ESLint indent May 1, 2021
@github-actions
Copy link

github-actions bot commented May 1, 2021

No JS Changes

Generated by 🚫 dangerJS against 20fbf7f

@RunDevelopment RunDevelopment changed the title ESLint indent ESLint: Added indent rule May 1, 2021
@RunDevelopment RunDevelopment merged commit 74edb4e into PrismJS:master May 14, 2021
@RunDevelopment RunDevelopment deleted the eslint-indent branch May 14, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant