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

Add new rule template-indent #1943

Merged
merged 5 commits into from
Nov 3, 2023
Merged

Conversation

patricklx
Copy link
Contributor

@patricklx patricklx commented Aug 23, 2023

uses the base eslint indent rule to make indents for templates.

similar implementation like typescript/indent https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/rules/indent.ts

depends on #1942

@patricklx patricklx force-pushed the template-indent-rule branch 2 times, most recently from 45b1e2a to 81fd18f Compare August 23, 2023 13:28
@patricklx patricklx mentioned this pull request Oct 31, 2023
@patricklx patricklx marked this pull request as ready for review November 2, 2023 10:43
@patricklx patricklx force-pushed the template-indent-rule branch 2 times, most recently from 45a2363 to 92bf323 Compare November 2, 2023 11:03
@patricklx patricklx force-pushed the template-indent-rule branch 2 times, most recently from d042605 to f69523b Compare November 2, 2023 13:43
lib/rules/template-indent.js Outdated Show resolved Hide resolved
type: 'layout',
docs: {
description: 'enforce consistent indentation',
extendsBaseRule: true,
Copy link
Member

Choose a reason for hiding this comment

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

Let's not export non-standard properties. I have not seen extendsBaseRule before.

meta: {
type: 'layout',
docs: {
description: 'enforce consistent indentation',
Copy link
Member

Choose a reason for hiding this comment

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

Let's get a better description. Indentation for what?

@bmish bmish changed the title implement indent for templates Add new rule template-indent Nov 2, 2023
docs/rules/template-indent.md Outdated Show resolved Hide resolved
Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com>
docs/rules/template-indent.md Outdated Show resolved Hide resolved
docs/rules/template-indent.md Outdated Show resolved Hide resolved
Comment on lines 22 to 24
## Rule Details

Enforce consistent indentation for fcct templates
Copy link
Member

Choose a reason for hiding this comment

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

Can you combine this Rule Details section with the summary on lines 7-9? And use complete sentences and put the rule details/summary above the config section.

@bmish bmish merged commit 2b2b24a into ember-cli:master Nov 3, 2023
8 checks passed
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.

None yet

3 participants